亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? localcharset.c

?? Linux下文件工具。
?? C
字號:
/* Determine a canonical name for the current locale's character encoding.   Copyright (C) 2000-2002 Free Software Foundation, Inc.   This program is free software; you can redistribute it and/or modify it   under the terms of the GNU Library General Public License as published   by the Free Software Foundation; either version 2, or (at your option)   any later version.   This program is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU   Library General Public License for more details.   You should have received a copy of the GNU Library General Public   License along with this program; if not, write to the Free Software   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,   USA.  *//* Written by Bruno Haible <haible@clisp.cons.org>.  */#ifdef HAVE_CONFIG_H# include <config.h>#endif#if HAVE_STDDEF_H# include <stddef.h>#endif#include <stdio.h>#if HAVE_STRING_H# include <string.h>#else# include <strings.h>#endif#if HAVE_STDLIB_H# include <stdlib.h>#endif#if defined _WIN32 || defined __WIN32__# undef WIN32   /* avoid warning on mingw32 */# define WIN32#endif#if defined __EMX__/* Assume EMX program runs on OS/2, even if compiled under DOS.  */# define OS2#endif#if !defined WIN32# if HAVE_LANGINFO_CODESET#  include <langinfo.h># else#  if HAVE_SETLOCALE#   include <locale.h>#  endif# endif#elif defined WIN32# define WIN32_LEAN_AND_MEAN# include <windows.h>#endif#if defined OS2# define INCL_DOS# include <os2.h>#endif#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__  /* Win32, OS/2, DOS */# define ISSLASH(C) ((C) == '/' || (C) == '\\')#endif#ifndef DIRECTORY_SEPARATOR# define DIRECTORY_SEPARATOR '/'#endif#ifndef ISSLASH# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)#endif#ifdef HAVE_GETC_UNLOCKED# undef getc# define getc getc_unlocked#endif/* The following static variable is declared 'volatile' to avoid a   possible multithread problem in the function get_charset_aliases. If we   are running in a threaded environment, and if two threads initialize   'charset_aliases' simultaneously, both will produce the same value,   and everything will be ok if the two assignments to 'charset_aliases'   are atomic. But I don't know what will happen if the two assignments mix.  */#if __STDC__ != 1# define volatile /* empty */#endif/* Pointer to the contents of the charset.alias file, if it has already been   read, else NULL.  Its format is:   ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0'  */static const char * volatile charset_aliases;/* Return a pointer to the contents of the charset.alias file.  */static const char *get_charset_aliases (){  const char *cp;  cp = charset_aliases;  if (cp == NULL)    {#if !defined WIN32      FILE *fp;      const char *dir = LIBDIR;      const char *base = "charset.alias";      char *file_name;      /* Concatenate dir and base into freshly allocated file_name.  */      {	size_t dir_len = strlen (dir);	size_t base_len = strlen (base);	int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));	file_name = (char *) malloc (dir_len + add_slash + base_len + 1);	if (file_name != NULL)	  {	    memcpy (file_name, dir, dir_len);	    if (add_slash)	      file_name[dir_len] = DIRECTORY_SEPARATOR;	    memcpy (file_name + dir_len + add_slash, base, base_len + 1);	  }      }      if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL)	/* Out of memory or file not found, treat it as empty.  */	cp = "";      else	{	  /* Parse the file's contents.  */	  int c;	  char buf1[50+1];	  char buf2[50+1];	  char *res_ptr = NULL;	  size_t res_size = 0;	  size_t l1, l2;	  for (;;)	    {	      c = getc (fp);	      if (c == EOF)		break;	      if (c == '\n' || c == ' ' || c == '\t')		continue;	      if (c == '#')		{		  /* Skip comment, to end of line.  */		  do		    c = getc (fp);		  while (!(c == EOF || c == '\n'));		  if (c == EOF)		    break;		  continue;		}	      ungetc (c, fp);	      if (fscanf (fp, "%50s %50s", buf1, buf2) < 2)		break;	      l1 = strlen (buf1);	      l2 = strlen (buf2);	      if (res_size == 0)		{		  res_size = l1 + 1 + l2 + 1;		  res_ptr = (char *) malloc (res_size + 1);		}	      else		{		  res_size += l1 + 1 + l2 + 1;		  res_ptr = (char *) realloc (res_ptr, res_size + 1);		}	      if (res_ptr == NULL)		{		  /* Out of memory. */		  res_size = 0;		  break;		}	      strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);	      strcpy (res_ptr + res_size - (l2 + 1), buf2);	    }	  fclose (fp);	  if (res_size == 0)	    cp = "";	  else	    {	      *(res_ptr + res_size) = '\0';	      cp = res_ptr;	    }	}      if (file_name != NULL)	free (file_name);#else      /* To avoid the troubles of installing a separate file in the same	 directory as the DLL and of retrieving the DLL's directory at	 runtime, simply inline the aliases here.  */# if defined WIN32      cp = "CP936" "\0" "GBK" "\0"	   "CP1361" "\0" "JOHAB" "\0";# endif#endif      charset_aliases = cp;    }  return cp;}/* Determine the current locale's character encoding, and canonicalize it   into one of the canonical names listed in config.charset.   The result must not be freed; it is statically allocated.   If the canonical name cannot be determined, the result is a non-canonical   name.  */#ifdef STATICSTATIC#endifconst char *locale_charset (){  const char *codeset;  const char *aliases;#if !(defined WIN32 || defined OS2)# if HAVE_LANGINFO_CODESET  /* Most systems support nl_langinfo (CODESET) nowadays.  */  codeset = nl_langinfo (CODESET);# else  /* On old systems which lack it, use setlocale or getenv.  */  const char *locale = NULL;  /* But most old systems don't have a complete set of locales.  Some     (like SunOS 4 or DJGPP) have only the C locale.  Therefore we don't     use setlocale here; it would return "C" when it doesn't support the     locale name the user has set.  */#  if HAVE_SETLOCALE && 0  locale = setlocale (LC_CTYPE, NULL);#  endif  if (locale == NULL || locale[0] == '\0')    {      locale = getenv ("LC_ALL");      if (locale == NULL || locale[0] == '\0')	{	  locale = getenv ("LC_CTYPE");	  if (locale == NULL || locale[0] == '\0')	    locale = getenv ("LANG");	}    }  /* On some old systems, one used to set locale = "iso8859_1". On others,     you set it to "language_COUNTRY.charset". In any case, we resolve it     through the charset.alias file.  */  codeset = locale;# endif#elif defined WIN32  static char buf[2 + 10 + 1];  /* Win32 has a function returning the locale's codepage as a number.  */  sprintf (buf, "CP%u", GetACP ());  codeset = buf;#elif defined OS2  const char *locale;  static char buf[2 + 10 + 1];  ULONG cp[3];  ULONG cplen;  /* Allow user to override the codeset, as set in the operating system,     with standard language environment variables.  */  locale = getenv ("LC_ALL");  if (locale == NULL || locale[0] == '\0')    {      locale = getenv ("LC_CTYPE");      if (locale == NULL || locale[0] == '\0')	locale = getenv ("LANG");    }  if (locale != NULL && locale[0] != '\0')    {      /* If the locale name contains an encoding after the dot, return it.  */      const char *dot = strchr (locale, '.');      if (dot != NULL)	{	  const char *modifier;	  dot++;	  /* Look for the possible @... trailer and remove it, if any.  */	  modifier = strchr (dot, '@');	  if (modifier == NULL)	    return dot;	  if (modifier - dot < sizeof (buf))	    {	      memcpy (buf, dot, modifier - dot);	      buf [modifier - dot] = '\0';	      return buf;	    }	}      /* Resolve through the charset.alias file.  */      codeset = locale;    }  else    {      /* OS/2 has a function returning the locale's codepage as a number.  */      if (DosQueryCp (sizeof (cp), cp, &cplen))	codeset = "";      else	{	  sprintf (buf, "CP%u", cp[0]);	  codeset = buf;	}    }#endif  if (codeset == NULL)    /* The canonical name cannot be determined.  */    codeset = "";  /* Resolve alias. */  for (aliases = get_charset_aliases ();       *aliases != '\0';       aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)    if (strcmp (codeset, aliases) == 0	|| (aliases[0] == '*' && aliases[1] == '\0'))      {	codeset = aliases + strlen (aliases) + 1;	break;      }  return codeset;}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美一区二区不卡| 91精品黄色片免费大全| 亚洲精品成人悠悠色影视| 成人中文字幕合集| 国产精品乱人伦| 99精品1区2区| 一区二区三区欧美亚洲| 欧美日韩视频在线观看一区二区三区| 亚洲一区二区综合| 欧美一区二区三区爱爱| 韩国成人福利片在线播放| 久久久不卡影院| 99在线热播精品免费| 亚洲无线码一区二区三区| 欧美一区二区免费视频| 国产成+人+日韩+欧美+亚洲| 亚洲另类色综合网站| 91精选在线观看| 丁香激情综合国产| 一区二区三区日韩精品| 久久综合丝袜日本网| 91丝袜美腿高跟国产极品老师| 亚洲成人在线免费| 国产午夜精品福利| 欧美日韩久久久| 东方欧美亚洲色图在线| 亚洲国产一区二区三区| 久久蜜桃一区二区| 欧美图片一区二区三区| 国产精品一二三四五| 亚洲国产一区二区在线播放| 国产色一区二区| 欧美日韩一卡二卡| 国产激情精品久久久第一区二区| 亚洲午夜日本在线观看| 久久久国产综合精品女国产盗摄| 在线精品视频小说1| 国产在线国偷精品免费看| 亚洲欧洲日韩女同| 欧美va亚洲va| 欧美美女网站色| 北条麻妃一区二区三区| 久久精品国产一区二区三区免费看 | 亚洲精品国产a久久久久久| 日韩女优视频免费观看| 在线亚洲高清视频| 国产98色在线|日韩| 婷婷开心久久网| 亚洲日本丝袜连裤袜办公室| 久久亚洲私人国产精品va媚药| 在线观看网站黄不卡| 成人av在线资源网| 久久99国产精品麻豆| 香蕉成人啪国产精品视频综合网| 国产日韩欧美综合一区| 日韩午夜电影在线观看| 91 com成人网| 欧美色综合网站| 91免费国产在线| 大桥未久av一区二区三区中文| 毛片基地黄久久久久久天堂| 亚洲线精品一区二区三区八戒| 日韩美女啊v在线免费观看| 欧美国产日韩精品免费观看| 久久先锋资源网| 精品国产一二三区| 精品免费日韩av| 日韩午夜在线观看视频| 91精品欧美一区二区三区综合在| 欧美专区亚洲专区| 日本韩国一区二区三区| 91小视频在线免费看| 99精品久久只有精品| 99视频精品在线| 色综合天天综合狠狠| 91免费版在线| 欧美亚洲一区二区在线| 欧美亚洲国产一区在线观看网站| 91蜜桃在线观看| 欧美午夜电影在线播放| 欧美日韩激情一区二区| 在线不卡欧美精品一区二区三区| 欧美高清性hdvideosex| 欧美日韩国产精选| 日韩无一区二区| 26uuu欧美| 国产精品免费视频一区| 亚洲美女在线国产| 亚洲宅男天堂在线观看无病毒| 亚洲一区二区五区| 丝袜美腿亚洲色图| 狠狠色丁香九九婷婷综合五月| 国模大尺度一区二区三区| 国产精品自拍网站| 不卡一区二区在线| 在线观看欧美黄色| 欧美一区二区久久久| 久久婷婷色综合| 中文字幕一区二区不卡| 一区二区三区久久久| 日韩精品国产精品| 国产精品99久久久久久久女警| 粗大黑人巨茎大战欧美成人| 91免费看`日韩一区二区| 欧美男男青年gay1069videost| 欧美www视频| 亚洲欧洲成人自拍| 免费精品99久久国产综合精品| 韩国av一区二区三区四区| 波多野结衣中文一区| 欧美美女黄视频| 久久精品日韩一区二区三区| 亚洲精品美腿丝袜| 看片网站欧美日韩| 色婷婷综合久久久中文一区二区| 91麻豆精品国产自产在线| 久久久九九九九| 亚洲国产视频一区二区| 国产河南妇女毛片精品久久久| 日本高清免费不卡视频| 欧美大片免费久久精品三p| 国产精品久久久久国产精品日日 | 欧美一级淫片007| 中文字幕精品—区二区四季| 午夜精品一区二区三区三上悠亚 | 一区二区三区中文免费| 久久av资源站| 欧美中文字幕久久| 国产欧美精品一区aⅴ影院 | 亚洲成人动漫精品| 懂色一区二区三区免费观看| 4438x亚洲最大成人网| 国产精品久久久久天堂| 精品写真视频在线观看 | 日韩一区二区视频在线观看| 最新成人av在线| 国产一区免费电影| 欧美日韩精品一区视频| 亚洲精品午夜久久久| 国产成人午夜视频| 日韩精品中文字幕在线不卡尤物| 亚洲精品乱码久久久久久久久| 国产一区二区三区四区五区美女| 91麻豆精品国产91久久久资源速度| 中文字幕中文字幕一区| 国产一区二区不卡| 欧美成va人片在线观看| 亚洲成人免费影院| 在线观看视频一区| 亚洲日本护士毛茸茸| www.在线成人| 亚洲国产精品成人久久综合一区| 国产一区二区三区免费播放 | 26uuu色噜噜精品一区二区| 日本一道高清亚洲日美韩| 欧美色图激情小说| 一区二区视频免费在线观看| 不卡的av在线播放| 亚洲欧洲成人精品av97| 高清免费成人av| 国产女主播在线一区二区| 精品亚洲欧美一区| 久久午夜羞羞影院免费观看| 久久国产乱子精品免费女| 日韩一区二区三区视频在线| 日一区二区三区| 欧美一区二区三区婷婷月色| 日韩精品视频网| 日韩欧美一卡二卡| 精品综合久久久久久8888| 亚洲精品一区二区在线观看| 紧缚奴在线一区二区三区| 欧美大尺度电影在线| 免费看日韩精品| www国产成人| 国产精品99精品久久免费| 国产精品污污网站在线观看| 成人综合在线观看| 亚洲色图都市小说| 欧美日韩国产在线播放网站| 免费在线观看视频一区| 精品国产乱码久久| 国产不卡在线播放| 亚洲色欲色欲www| 欧美日本免费一区二区三区| 日本一道高清亚洲日美韩| 精品成人在线观看| 高清不卡在线观看av| 亚洲激情在线播放| 91精品国产91久久综合桃花| 黄色日韩网站视频| 成人欧美一区二区三区| 欧美日韩一级二级三级| 九九九久久久精品| |精品福利一区二区三区| 欧美日韩免费观看一区三区| 精品一区二区精品| 亚洲精品乱码久久久久久黑人| 7777精品伊人久久久大香线蕉 | 国产精品免费免费|