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

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

?? pango-language.c

?? linux
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* Pango * pango-language.c: Language handling routines * * Copyright (C) 2000 Red Hat Software * * This library 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 of the License, or (at your option) any later version. * * This library 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 library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */#include <config.h>#include <errno.h>#include <string.h>#include <stdlib.h>#include <math.h>#include <locale.h>#include "pango-language.h"#include "pango-impl-utils.h"#define LANGUAGE_SEPARATORS ";:, \t"static const char canon_map[256] = {   0,   0,   0,   0,   0,   0,   0,   0,    0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,    0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,    0,   0,   0,   0,   0,  '-',  0,   0,  '0', '1', '2', '3', '4', '5', '6', '7',  '8', '9',  0,   0,   0,   0,   0,   0,   0,  'a', 'b', 'c', 'd', 'e', 'f', 'g',  'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',  'p', 'q', 'r', 's', 't', 'u', 'v', 'w',  'x', 'y', 'z',  0,   0,   0,   0,  '-',   0,  'a', 'b', 'c', 'd', 'e', 'f', 'g',  'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',  'p', 'q', 'r', 's', 't', 'u', 'v', 'w',  'x', 'y', 'z',  0,   0,   0,   0,   0};static gbooleanlang_equal (gconstpointer v1,	    gconstpointer v2){  const guchar *p1 = v1;  const guchar *p2 = v2;  while (canon_map[*p1] && canon_map[*p1] == canon_map[*p2])    {      p1++, p2++;    }  return (canon_map[*p1] == canon_map[*p2]);}static guintlang_hash (gconstpointer key){  const guchar *p = key;  guint h = 0;  while (canon_map[*p])    {      h = (h << 5) - h + canon_map[*p];      p++;    }  return h;}static PangoLanguage *pango_language_copy (PangoLanguage *language){  return language; /* language tags are const */}static voidpango_language_free (PangoLanguage *language){  return; /* nothing */}GTypepango_language_get_type (void){  static GType our_type = 0;  if (G_UNLIKELY (our_type == 0))    our_type = g_boxed_type_register_static (I_("PangoLanguage"),					     (GBoxedCopyFunc)pango_language_copy,					     (GBoxedFreeFunc)pango_language_free);  return our_type;}/** * _pango_get_lc_ctype: * * Return the Unix-style locale string for the language currently in * effect. On Unix systems, this is the return value from * <literal>setlocale(LC_CTYPE, NULL)</literal>, and the user can * affect this through the environment variables LC_ALL, LC_CTYPE or * LANG (checked in that order). The locale strings typically is in * the form lang_COUNTRY, where lang is an ISO-639 language code, and * COUNTRY is an ISO-3166 country code. For instance, sv_FI for * Swedish as written in Finland or pt_BR for Portuguese as written in * Brazil. * * On Windows, the C library doesn't use any such environment * variables, and setting them won't affect the behavior of functions * like ctime(). The user sets the locale through the Regional Options * in the Control Panel. The C library (in the setlocale() function) * does not use country and language codes, but country and language * names spelled out in English. * However, this function does check the above environment * variables, and does return a Unix-style locale string based on * either said environment variables or the thread's current locale. * * Return value: a dynamically allocated string, free with g_free(). */static gchar *_pango_get_lc_ctype (void){#ifdef G_OS_WIN32  /* Somebody might try to set the locale for this process using the   * LANG or LC_ environment variables. The Microsoft C library   * doesn't know anything about them. You set the locale in the   * Control Panel. Setting these env vars won't have any affect on   * locale-dependent C library functions like ctime(). But just for   * kicks, do obey LC_ALL, LC_CTYPE and LANG in Pango. (This also makes   * it easier to test GTK and Pango in various default languages, you   * don't have to clickety-click in the Control Panel, you can simply   * start the program with LC_ALL=something on the command line.)   */  gchar *p;  p = getenv ("LC_ALL");  if (p != NULL)    return g_strdup (p);  p = getenv ("LC_CTYPE");  if (p != NULL)    return g_strdup (p);  p = getenv ("LANG");  if (p != NULL)    return g_strdup (p);  return g_win32_getlocale ();#else  return g_strdup (setlocale (LC_CTYPE, NULL));#endif}/** * pango_language_get_default: * * Returns the #PangoLanguage for the current locale of the process. * Note that this can change over the life of an application. * * On Unix systems, this is the return value is derived from * <literal>setlocale(LC_CTYPE, NULL)</literal>, and the user can * affect this through the environment variables LC_ALL, LC_CTYPE or * LANG (checked in that order). The locale string typically is in * the form lang_COUNTRY, where lang is an ISO-639 language code, and * COUNTRY is an ISO-3166 country code. For instance, sv_FI for * Swedish as written in Finland or pt_BR for Portuguese as written in * Brazil. * * On Windows, the C library does not use any such environment * variables, and setting them won't affect the behavior of functions * like ctime(). The user sets the locale through the Regional Options * in the Control Panel. The C library (in the setlocale() function) * does not use country and language codes, but country and language * names spelled out in English. * However, this function does check the above environment * variables, and does return a Unix-style locale string based on * either said environment variables or the thread's current locale. * * Your application should call <literal>setlocale(LC_ALL, "");</literal> * for the user settings to take effect.  Gtk+ does this in its initialization * functions automatically (by calling gtk_set_locale()). * See <literal>man setlocale</literal> for more details. * * Return value: the default language as a #PangoLanguage, must not be *               freed. * * Since: 1.16 **/PangoLanguage *pango_language_get_default (void){  static PangoLanguage *result = NULL;  if (G_UNLIKELY (!result))    {      gchar *lang = _pango_get_lc_ctype ();      result = pango_language_from_string (lang);      g_free (lang);    }  return result;}/** * pango_language_from_string: * @language: a string representing a language tag * * Take a RFC-3066 format language tag as a string and convert it to a * #PangoLanguage pointer that can be efficiently copied (copy the * pointer) and compared with other language tags (compare the * pointer.) * * This function first canonicalizes the string by converting it to * lowercase, mapping '_' to '-', and stripping all characters other * than letters and '-'. * * Use pango_language_get_default() if you want to get the #PangoLanguage for * the current locale of the process. * * Return value: an opaque pointer to a #PangoLanguage structure. *               this will be valid forever after. **/PangoLanguage *pango_language_from_string (const char *language){  static GHashTable *hash = NULL;  char *result;  int len;  char *p;  if (G_UNLIKELY (!hash))    hash = g_hash_table_new (lang_hash, lang_equal);  else    {      result = g_hash_table_lookup (hash, language);      if (result)	return (PangoLanguage *)result;    }  len = strlen (language);  result = g_malloc (len + 1);  p = result;  while ((*(p++) = canon_map[*(guchar *)language++]))    ;  g_hash_table_insert (hash, result, result);  return (PangoLanguage *)result;}/** * pango_language_matches: * @language: a language tag (see pango_language_from_string()), *            %NULL is allowed and matches nothing but '*' * @range_list: a list of language ranges, separated by ';', ':', *   ',', or space characters. *   Each element must either be '*', or a RFC 3066 language range *   canonicalized as by pango_language_from_string() * * Checks if a language tag matches one of the elements in a list of * language ranges. A language tag is considered to match a range * in the list if the range is '*', the range is exactly the tag, * or the range is a prefix of the tag, and the character after it * in the tag is '-'. * * Return value: %TRUE if a match was found. **/gbooleanpango_language_matches (PangoLanguage *language,			const char    *range_list){  const char *lang_str = pango_language_to_string (language);  const char *p = range_list;  gboolean done = FALSE;  while (!done)    {      const char *end = strpbrk (p, LANGUAGE_SEPARATORS);      if (!end)	{	  end = p + strlen (p);	  done = TRUE;	}      if (strncmp (p, "*", 1) == 0 ||	  (lang_str && strncmp (lang_str, p, end - p) == 0 &&	   (lang_str[end - p] == '\0' || lang_str[end - p] == '-')))	return TRUE;      if (!done)	p = end + 1;    }  return FALSE;}typedef struct {  const char lang[4];  const char *str;} LangInfo;static intlang_compare_first_component (gconstpointer pa,			      gconstpointer pb){  const char *a = pa, *b = pb;  unsigned int da, db;  const char *p;  p = strstr (a, "-");  da = p ? (unsigned int) (p - a) : strlen (a);  p = strstr (b, "-");  db = p ? (unsigned int) (p - b) : strlen (b);     return strncmp (a, b, MAX (da, db));}static intlang_info_compare (gconstpointer key,		   gconstpointer val){  const LangInfo *lang_info = val;  return lang_compare_first_component (key, lang_info->lang);}/* The following array is supposed to contain enough text to tickle all necessary fonts for each * of the languages in the following. Yes, it's pretty lame. Not all of the languages * in the following have sufficient text to exercise all the accents for the language, and * there are obviously many more languages to include as well. */static const LangInfo lang_texts[] = {  { "ar", "Arabic  \330\247\331\204\330\263\331\204\330\247\331\205 \330\271\331\204\331\212\331\203\331\205" },  { "cs", "Czech (\304\215esky)  Dobr\303\275 den" },  { "da", "Danish (Dansk)  Hej, Goddag" },  { "el", "Greek (\316\225\316\273\316\273\316\267\316\275\316\271\316\272\316\254) \316\223\316\265\316\271\316\254 \317\203\316\261\317\202" },  { "en", "English Hello" },  { "eo", "Esperanto Saluton" },  { "es", "Spanish (Espa\303\261ol) \302\241Hola!" },  { "et", "Estonian  Tere, Tervist" },  { "fi", "Finnish (Suomi)  Hei, Hyv\303\244\303\244 p\303\244iv\303\244\303\244" },  { "fr", "French (Fran\303\247ais)" },  { "de", "German Gr\303\274\303\237 Gott" },  { "he", "Hebrew   \327\251\327\234\327\225\327\235" },  { "it", "Italiano  Ciao, Buon giorno" },  { "ja", "Japanese (\346\227\245\346\234\254\350\252\236) \343\201\223\343\202\223\343\201\253\343\201\241\343\201\257, \357\275\272\357\276\235\357\276\206\357\276\201\357\276\212" },  { "ko", "Korean (\355\225\234\352\270\200)   \354\225\210\353\205\225\355\225\230\354\204\270\354\232\224, \354\225\210\353\205\225\355\225\230\354\213\255\353\213\210\352\271\214" },  { "mt", "Maltese   \304\212aw, Sa\304\247\304\247a" },  { "nl", "Nederlands, Vlaams Hallo, Dag" },  { "no", "Norwegian (Norsk) Hei, God dag" },  { "pl", "Polish   Dzie\305\204 dobry, Hej" },  { "ru", "Russian (\320\240\321\203\321\201\321\201\320\272\320\270\320\271)" },  { "sk", "Slovak   Dobr\303\275 de\305\210" },  { "sv", "Swedish (Svenska) Hej p\303\245 dej, Goddag" },  { "tr", "Turkish (T\303\274rk\303\247e) Merhaba" },  { "zh", "Chinese (\344\270\255\346\226\207,\346\231\256\351\200\232\350\257\235,\346\261\211\350\257\255)" }};/** * pango_language_get_sample_string: * @language: a #PangoLanguage

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产综合久久精品app| 91麻豆高清视频| 国产a级毛片一区| 91蝌蚪国产九色| 欧美一区二区福利视频| 国产三级精品视频| 亚洲国产日日夜夜| 国产成人精品亚洲日本在线桃色| 97se亚洲国产综合在线| 日韩一级在线观看| 亚洲天天做日日做天天谢日日欢| 日本色综合中文字幕| 成人动漫av在线| 欧美成人a∨高清免费观看| 椎名由奈av一区二区三区| 秋霞午夜av一区二区三区| 不卡的看片网站| 精品少妇一区二区三区| 亚洲免费av观看| 国产精品影音先锋| 日韩一级黄色大片| 亚洲图片一区二区| 99re热这里只有精品视频| 精品乱人伦一区二区三区| 亚洲夂夂婷婷色拍ww47| 成人一区二区三区视频| 日韩欧美一区二区久久婷婷| 一级女性全黄久久生活片免费| 国产成人av影院| 日韩精品一区在线| 天涯成人国产亚洲精品一区av| 91视频一区二区| 国产精品久久久久久久第一福利 | 亚洲欧美色一区| 国产精品1区2区| 久久久夜色精品亚洲| 麻豆国产欧美一区二区三区| 欧美精品三级日韩久久| 亚洲精品老司机| 色悠久久久久综合欧美99| 1024成人网| 91蝌蚪porny九色| 亚洲欧洲制服丝袜| 91小视频在线免费看| 国产精品福利影院| 成人免费看片app下载| 国产女主播在线一区二区| 国产高清视频一区| 国产精品三级电影| 99riav一区二区三区| 一个色妞综合视频在线观看| 91久久一区二区| 午夜精品福利一区二区三区蜜桃| 欧美三级中文字幕在线观看| 不卡免费追剧大全电视剧网站| 国产婷婷色一区二区三区| 国产永久精品大片wwwapp| 国产欧美日本一区视频| 粉嫩av一区二区三区粉嫩| 国产精品美女久久久久久2018| 99久久精品免费观看| 一区二区三区在线观看动漫| 欧美性受xxxx黑人xyx性爽| 亚洲成人精品在线观看| 日韩一级免费观看| 国产精品99久久久久久久女警 | 国产成人午夜99999| 国产欧美综合在线观看第十页| 成人av综合一区| 亚洲一区二区av在线| 欧美一级日韩一级| 成人免费视频视频| 亚洲国产欧美另类丝袜| 精品欧美一区二区久久 | 激情综合五月婷婷| 色视频欧美一区二区三区| 一区二区三区蜜桃| 日韩精品一区二区三区在线播放 | 精品夜夜嗨av一区二区三区| 久久亚洲精华国产精华液| 99精品视频一区二区| 日韩极品在线观看| 欧美激情在线看| 欧美日韩国产小视频在线观看| 精品一区二区三区欧美| 最近日韩中文字幕| 日韩精品一区二区三区在线观看| 91网站黄www| 久久99热99| 一二三四社区欧美黄| 久久视频一区二区| 欧美日韩中文国产| 成人av免费在线| 久久草av在线| 亚洲国产一区二区三区| 精品一区二区在线看| 亚洲伦理在线精品| 国产日韩av一区| 欧美成人一区二区| 欧美色图激情小说| 91影院在线免费观看| 国产美女在线精品| 日日骚欧美日韩| 亚洲精品国产视频| 国产精品私人自拍| 欧美精品一区二区三区四区| 欧美色涩在线第一页| jlzzjlzz欧美大全| 国产精品综合一区二区三区| 日本欧美久久久久免费播放网| 亚洲欧美偷拍三级| 中文字幕色av一区二区三区| 久久夜色精品国产欧美乱极品| 欧美区在线观看| 欧美伊人久久久久久久久影院| 99久久国产综合精品麻豆| 高清国产一区二区| 国产精选一区二区三区 | 国产精品久久久久久久久搜平片| 日韩精品一区二区三区老鸭窝| 欧美日韩精品系列| 欧美三级电影在线看| 在线视频你懂得一区| 色综合久久久久网| 91免费精品国自产拍在线不卡 | 婷婷开心激情综合| 午夜欧美2019年伦理| 亚洲午夜激情网站| 香蕉久久夜色精品国产使用方法| 亚洲最大成人综合| 亚洲综合999| 亚洲福利视频一区| 日一区二区三区| 琪琪久久久久日韩精品| 日韩精品亚洲专区| 日韩福利视频网| 老司机精品视频线观看86| 蜜桃av噜噜一区二区三区小说| 美女视频黄久久| 国产乱码精品一区二区三| 国产成人小视频| 99国产精品一区| 欧美无乱码久久久免费午夜一区| 欧美日韩在线播放三区四区| 欧美肥胖老妇做爰| 久久综合久久久久88| 久久久久久久久久久久久久久99 | 日韩精品一区在线观看| 精品一区二区三区免费观看| 精品一区精品二区高清| 成人晚上爱看视频| 在线免费观看一区| 欧美一区二区私人影院日本| 久久综合九色综合久久久精品综合| 久久久综合激的五月天| 国产精品国产三级国产三级人妇| 洋洋av久久久久久久一区| 欧美96一区二区免费视频| 国产福利一区二区三区视频| 91在线无精精品入口| 欧美精品18+| 国产片一区二区| 亚洲成在线观看| 樱桃视频在线观看一区| 欧美日韩精品欧美日韩精品一 | 一区二区三区产品免费精品久久75| 午夜视频一区二区三区| 韩国毛片一区二区三区| 91免费在线视频观看| www久久久久| 亚洲一区二区在线视频| 国产综合久久久久久鬼色 | 99精品1区2区| 日韩一区二区三区三四区视频在线观看| 亚洲精品一区二区三区四区高清 | 在线观看av一区二区| 精品电影一区二区三区| 亚洲日本在线看| 国内精品在线播放| 一区二区免费看| 久久国产精品第一页| 97久久超碰国产精品电影| 欧美一区二区成人6969| 亚洲三级久久久| 国产精品一区二区久激情瑜伽| 欧美日韩亚洲另类| 国产精品白丝在线| 激情五月婷婷综合| 亚洲蜜臀av乱码久久精品蜜桃| 麻豆国产精品官网| 欧美日韩第一区日日骚| 亚洲色欲色欲www| 成人一级片在线观看| 欧美α欧美αv大片| 亚洲va天堂va国产va久| 91麻豆.com| 国产精品国模大尺度视频| 国产精品一区二区在线播放| 91精品国产综合久久精品图片| 一区二区三区毛片|