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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? localcharset.c

?? 多語言轉化工具庫
?? 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 <bruno@clisp.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#ifdef __cplusplus/* When compiling with "gcc -x c++", produce a function with C linkage.  */extern "C" const char * locale_charset (void);#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"	   "CP20127" "\0" "ASCII" "\0"	   "CP20866" "\0" "KOI8-R" "\0"	   "CP21866" "\0" "KOI8-RU" "\0"	   "CP28591" "\0" "ISO-8859-1" "\0"	   "CP28592" "\0" "ISO-8859-2" "\0"	   "CP28593" "\0" "ISO-8859-3" "\0"	   "CP28594" "\0" "ISO-8859-4" "\0"	   "CP28595" "\0" "ISO-8859-5" "\0"	   "CP28596" "\0" "ISO-8859-6" "\0"	   "CP28597" "\0" "ISO-8859-7" "\0"	   "CP28598" "\0" "ISO-8859-8" "\0"	   "CP28599" "\0" "ISO-8859-9" "\0"	   "CP28605" "\0" "ISO-8859-15" "\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];  /* Woe32 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;      }  /* Don't return an empty string.  GNU libc and GNU libiconv interpret     the empty string as denoting "the locale's character encoding",     thus GNU libiconv would call this function a second time.  */  if (codeset[0] == '\0')    codeset = "ASCII";  return codeset;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产午夜精品在线观看| 精品夜夜嗨av一区二区三区| 久久精品久久综合| 99久久免费视频.com| 91精品麻豆日日躁夜夜躁| 国产精品久久久久一区| 国模少妇一区二区三区| 91精品在线免费| 亚洲男人的天堂网| 风流少妇一区二区| 日韩视频国产视频| 亚洲一区二区影院| 91丨九色丨尤物| 国产亚洲一区二区三区| 久久成人免费网| 91精品国产丝袜白色高跟鞋| 一区二区三区美女视频| av电影在线观看不卡| 久久久久久久久久久久久女国产乱| 亚洲成人先锋电影| 在线观看av不卡| 亚洲一二三四久久| 一本大道av一区二区在线播放| 国产精品欧美精品| 国产v综合v亚洲欧| 久久久久久久久久久久电影| 国产麻豆一精品一av一免费| 欧美mv日韩mv亚洲| 久久99国产精品免费网站| 欧美成人伊人久久综合网| 奇米综合一区二区三区精品视频 | 国产福利视频一区二区三区| 日韩欧美一区中文| 精一区二区三区| 久久在线观看免费| 国产精一品亚洲二区在线视频| 26uuu色噜噜精品一区| 韩国中文字幕2020精品| 久久久久久97三级| 国产69精品久久777的优势| 国产无人区一区二区三区| 国产成人aaaa| 亚洲免费观看高清完整版在线观看| 91麻豆swag| 亚洲国产综合91精品麻豆| 日本韩国欧美国产| 午夜精品久久久久久久久| 欧美电视剧免费观看| 国产麻豆日韩欧美久久| 中文字幕在线一区二区三区| 日本韩国欧美在线| 日本女优在线视频一区二区| 久久新电视剧免费观看| 波多野结衣中文字幕一区二区三区| 亚洲免费观看高清完整版在线观看熊 | 一区二区三区日本| 88在线观看91蜜桃国自产| 国产真实乱子伦精品视频| 国产精品国产三级国产有无不卡| 在线国产亚洲欧美| 美女看a上一区| 久久久精品2019中文字幕之3| 91麻豆精品秘密| 久88久久88久久久| 亚洲人亚洲人成电影网站色| 91精品国产综合久久精品性色 | 色综合激情五月| 奇米色一区二区| 国产精品久久久久久久久久免费看| 99在线精品视频| 久久电影网电视剧免费观看| 亚洲图片你懂的| 精品国产伦一区二区三区免费| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 亚洲一卡二卡三卡四卡无卡久久| 精品日韩一区二区三区免费视频| 色老汉一区二区三区| 国产一区二区91| 午夜电影一区二区| 国产精品久久久久久久久快鸭| 日韩片之四级片| 在线观看亚洲成人| 成人精品免费看| 麻豆成人免费电影| 午夜伊人狠狠久久| 亚洲色图制服丝袜| 久久久久久一二三区| 欧美一级日韩不卡播放免费| 99这里只有久久精品视频| 国产裸体歌舞团一区二区| 人人超碰91尤物精品国产| 亚洲宅男天堂在线观看无病毒| 中文字幕一区二区三区四区不卡 | 欧美成人猛片aaaaaaa| 91成人网在线| 92国产精品观看| 丁香激情综合五月| 国产一区二区三区免费播放| 麻豆国产精品777777在线| 亚洲成人av一区二区三区| 亚洲一区二区在线播放相泽| 一区二区三区91| 亚洲乱码中文字幕| 亚洲人成精品久久久久| 国产精品高清亚洲| 国产情人综合久久777777| 久久久www成人免费无遮挡大片| 日韩欧美在线网站| 日韩欧美在线1卡| 日韩免费观看高清完整版在线观看| 3d成人动漫网站| 欧美一级黄色大片| 6080亚洲精品一区二区| 欧美一区二区三区不卡| 678五月天丁香亚洲综合网| 欧美一区二区美女| 日韩你懂的电影在线观看| 日韩欧美一区二区视频| 日韩一区二区精品| 久久久久久久久久久久久久久99| 国产亚洲成aⅴ人片在线观看 | k8久久久一区二区三区| www.欧美色图| 在线亚洲+欧美+日本专区| 777午夜精品视频在线播放| 91.com在线观看| 久久婷婷色综合| 久久精品一区八戒影视| 最新欧美精品一区二区三区| 一区二区三区四区亚洲| 日本不卡一二三区黄网| 国产在线视频精品一区| 成人av在线观| 欧美日韩一级片网站| 久久一区二区三区国产精品| 中文字幕一区日韩精品欧美| 亚洲影视在线观看| 九一九一国产精品| a亚洲天堂av| 欧美日韩精品系列| 久久精品一区二区三区不卡| 亚洲免费观看高清完整版在线观看 | 中文字幕日韩精品一区| 亚洲国产一区二区视频| 精品一区二区三区日韩| 91性感美女视频| 精品国产伦一区二区三区观看方式| 中文字幕一区二区三区不卡在线 | 欧美制服丝袜第一页| 欧美本精品男人aⅴ天堂| 亚洲欧洲一区二区在线播放| 日韩成人av影视| 成人h版在线观看| 3d动漫精品啪啪一区二区竹菊| 国产人久久人人人人爽| 五月综合激情网| 99精品视频在线观看免费| 91精品国产色综合久久| 亚洲男人的天堂av| 国产伦精品一区二区三区免费迷| 欧洲精品一区二区三区在线观看| 亚洲精品一区二区在线观看| 亚洲国产精品影院| 成人午夜精品在线| 日韩免费电影网站| 亚洲国产成人精品视频| 丁香一区二区三区| 欧美va在线播放| 亚洲va欧美va人人爽| 成人短视频下载| 久久久精品综合| 美腿丝袜在线亚洲一区| 欧美性受xxxx| 亚洲免费av观看| 不卡高清视频专区| 久久久无码精品亚洲日韩按摩| 日韩av午夜在线观看| 欧美性猛交xxxxxxxx| 国产精品久久久久久久久免费樱桃 | 日av在线不卡| 欧美日韩成人激情| 亚洲激情自拍偷拍| 91在线视频免费观看| 国产偷国产偷精品高清尤物| 精品在线观看免费| 欧美一级欧美一级在线播放| 夜夜嗨av一区二区三区中文字幕| 成人av影视在线观看| 国产精品美女久久久久久久久 | 国产精品一区二区久久精品爱涩| 欧美一区中文字幕| 天堂成人免费av电影一区| 欧美亚洲国产怡红院影院| 亚洲精品久久久蜜桃| 91成人免费网站| 亚洲午夜成aⅴ人片| 欧美日韩国产经典色站一区二区三区| 伊人一区二区三区| 欧美在线免费播放| 香港成人在线视频|