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

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

?? localealias.c

?? Gsm手機(jī)(短信息,電話簿)開發(fā)庫(kù)C++源代碼
?? C
字號(hào):
/* Handle aliases for locale names.
   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
   Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU 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 General Public License for more details.

   You should have received a copy of the GNU 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.  */

#ifdef HAVE_CONFIG_H
# include <gsm_config.h>
#endif

#include <ctype.h>
#include <stdio.h>
#include <sys/types.h>

#ifdef __GNUC__
# define alloca __builtin_alloca
# define HAVE_ALLOCA 1
#else
# if defined HAVE_ALLOCA_H || defined _LIBC
#  include <alloca.h>
# else
#  ifdef _AIX
 #pragma alloca
#  else
#   ifndef alloca
char *alloca ();
#   endif
#  endif
# endif
#endif

#if defined STDC_HEADERS || defined _LIBC
# include <stdlib.h>
#else
char *getenv ();
# ifdef HAVE_MALLOC_H
#  include <malloc.h>
# else
void free ();
# endif
#endif

#if defined HAVE_STRING_H || defined _LIBC
# ifndef _GNU_SOURCE
#  define _GNU_SOURCE	1
# endif
# include <string.h>
#else
# include <strings.h>
# ifndef memcpy
#  define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
# endif
#endif
#if !HAVE_STRCHR && !defined _LIBC
# ifndef strchr
#  define strchr index
# endif
#endif

#include "gettext.h"
#include "gettextP.h"

/* @@ end of prolog @@ */

#ifdef _LIBC
/* Rename the non ANSI C functions.  This is required by the standard
   because some ANSI C functions will require linking with this object
   file and the name space must not be polluted.  */
# define strcasecmp __strcasecmp

# define mempcpy __mempcpy
# define HAVE_MEMPCPY	1

/* We need locking here since we can be called from different places.  */
# include <bits/libc-lock.h>

__libc_lock_define_initialized (static, lock);
#endif


/* For those loosing systems which don't have `alloca' we have to add
   some additional code emulating it.  */
#ifdef HAVE_ALLOCA
/* Nothing has to be done.  */
# define ADD_BLOCK(list, address) /* nothing */
# define FREE_BLOCKS(list) /* nothing */
#else
struct block_list
{
  void *address;
  struct block_list *next;
};
# define ADD_BLOCK(list, addr)						      \
  do {									      \
    struct block_list *newp = (struct block_list *) malloc (sizeof (*newp));  \
    /* If we cannot get a free block we cannot add the new element to	      \
       the list.  */							      \
    if (newp != NULL) {							      \
      newp->address = (addr);						      \
      newp->next = (list);						      \
      (list) = newp;							      \
    }									      \
  } while (0)
# define FREE_BLOCKS(list)						      \
  do {									      \
    while (list != NULL) {						      \
      struct block_list *old = list;					      \
      list = list->next;						      \
      free (old);							      \
    }									      \
  } while (0)
# undef alloca
# define alloca(size) (malloc (size))
#endif	/* have alloca */


struct alias_map
{
  const char *alias;
  const char *value;
};


static char *string_space = NULL;
static size_t string_space_act = 0;
static size_t string_space_max = 0;
static struct alias_map *map;
static size_t nmap = 0;
static size_t maxmap = 0;


/* Prototypes for local functions.  */
static size_t read_alias_file PARAMS ((const char *fname, int fname_len))
     internal_function;
static void extend_alias_table PARAMS ((void));
static int alias_compare PARAMS ((const struct alias_map *map1,
				  const struct alias_map *map2));


const char *
_nl_expand_alias (name)
    const char *name;
{
  static const char *locale_alias_path = LOCALE_ALIAS_PATH;
  struct alias_map *retval;
  const char *result = NULL;
  size_t added;

#ifdef _LIBC
  __libc_lock_lock (lock);
#endif

  do
    {
      struct alias_map item;

      item.alias = name;

      if (nmap > 0)
	retval = (struct alias_map *) bsearch (&item, map, nmap,
					       sizeof (struct alias_map),
					       (int (*) PARAMS ((const void *,
								 const void *))
						) alias_compare);
      else
	retval = NULL;

      /* We really found an alias.  Return the value.  */
      if (retval != NULL)
	{
	  result = retval->value;
	  break;
	}

      /* Perhaps we can find another alias file.  */
      added = 0;
      while (added == 0 && locale_alias_path[0] != '\0')
	{
	  const char *start;

	  while (locale_alias_path[0] == ':')
	    ++locale_alias_path;
	  start = locale_alias_path;

	  while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ':')
	    ++locale_alias_path;

	  if (start < locale_alias_path)
	    added = read_alias_file (start, locale_alias_path - start);
	}
    }
  while (added != 0);

#ifdef _LIBC
  __libc_lock_unlock (lock);
#endif

  return result;
}


static size_t
internal_function
read_alias_file (fname, fname_len)
     const char *fname;
     int fname_len;
{
#ifndef HAVE_ALLOCA
  struct block_list *block_list = NULL;
#endif
  FILE *fp;
  char *full_fname;
  size_t added;
  static const char aliasfile[] = "/locale.alias";

  full_fname = (char *) alloca (fname_len + sizeof aliasfile);
  ADD_BLOCK (block_list, full_fname);
#ifdef HAVE_MEMPCPY
  mempcpy (mempcpy (full_fname, fname, fname_len),
	   aliasfile, sizeof aliasfile);
#else
  memcpy (full_fname, fname, fname_len);
  memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
#endif

  fp = fopen (full_fname, "r");
  if (fp == NULL)
    {
      FREE_BLOCKS (block_list);
      return 0;
    }

  added = 0;
  while (!feof (fp))
    {
      /* It is a reasonable approach to use a fix buffer here because
	 a) we are only interested in the first two fields
	 b) these fields must be usable as file names and so must not
	    be that long
       */
      unsigned char buf[BUFSIZ];
      unsigned char *alias;
      unsigned char *value;
      unsigned char *cp;

      if (fgets (buf, sizeof buf, fp) == NULL)
	/* EOF reached.  */
	break;

      /* Possibly not the whole line fits into the buffer.  Ignore
	 the rest of the line.  */
      if (strchr (buf, '\n') == NULL)
	{
	  char altbuf[BUFSIZ];
	  do
	    if (fgets (altbuf, sizeof altbuf, fp) == NULL)
	      /* Make sure the inner loop will be left.  The outer loop
		 will exit at the `feof' test.  */
	      break;
	  while (strchr (altbuf, '\n') == NULL);
	}

      cp = buf;
      /* Ignore leading white space.  */
      while (isspace (cp[0]))
	++cp;

      /* A leading '#' signals a comment line.  */
      if (cp[0] != '\0' && cp[0] != '#')
	{
	  alias = cp++;
	  while (cp[0] != '\0' && !isspace (cp[0]))
	    ++cp;
	  /* Terminate alias name.  */
	  if (cp[0] != '\0')
	    *cp++ = '\0';

	  /* Now look for the beginning of the value.  */
	  while (isspace (cp[0]))
	    ++cp;

	  if (cp[0] != '\0')
	    {
	      size_t alias_len;
	      size_t value_len;

	      value = cp++;
	      while (cp[0] != '\0' && !isspace (cp[0]))
		++cp;
	      /* Terminate value.  */
	      if (cp[0] == '\n')
		{
		  /* This has to be done to make the following test
		     for the end of line possible.  We are looking for
		     the terminating '\n' which do not overwrite here.  */
		  *cp++ = '\0';
		  *cp = '\n';
		}
	      else if (cp[0] != '\0')
		*cp++ = '\0';

	      if (nmap >= maxmap)
		extend_alias_table ();

	      alias_len = strlen (alias) + 1;
	      value_len = strlen (value) + 1;

	      if (string_space_act + alias_len + value_len > string_space_max)
		{
		  /* Increase size of memory pool.  */
		  size_t new_size = (string_space_max
				     + (alias_len + value_len > 1024
					? alias_len + value_len : 1024));
		  char *new_pool = (char *) realloc (string_space, new_size);
		  if (new_pool == NULL)
		    {
		      FREE_BLOCKS (block_list);
		      return added;
		    }
		  string_space = new_pool;
		  string_space_max = new_size;
		}

	      map[nmap].alias = memcpy (&string_space[string_space_act],
					alias, alias_len);
	      string_space_act += alias_len;

	      map[nmap].value = memcpy (&string_space[string_space_act],
					value, value_len);
	      string_space_act += value_len;

	      ++nmap;
	      ++added;
	    }
	}
    }

  /* Should we test for ferror()?  I think we have to silently ignore
     errors.  --drepper  */
  fclose (fp);

  if (added > 0)
    qsort (map, nmap, sizeof (struct alias_map),
	   (int (*) PARAMS ((const void *, const void *))) alias_compare);

  FREE_BLOCKS (block_list);
  return added;
}


static void
extend_alias_table ()
{
  size_t new_size;
  struct alias_map *new_map;

  new_size = maxmap == 0 ? 100 : 2 * maxmap;
  new_map = (struct alias_map *) realloc (map, (new_size
						* sizeof (struct alias_map)));
  if (new_map == NULL)
    /* Simply don't extend: we don't have any more core.  */
    return;

  map = new_map;
  maxmap = new_size;
}


#ifdef _LIBC
static void __attribute__ ((unused))
free_mem (void)
{
  if (string_space != NULL)
    free (string_space);
  if (map != NULL)
    free (map);
}
text_set_element (__libc_subfreeres, free_mem);
#endif


static int
alias_compare (map1, map2)
     const struct alias_map *map1;
     const struct alias_map *map2;
{
#if defined _LIBC || defined HAVE_STRCASECMP
  return strcasecmp (map1->alias, map2->alias);
#else
  const unsigned char *p1 = (const unsigned char *) map1->alias;
  const unsigned char *p2 = (const unsigned char *) map2->alias;
  unsigned char c1, c2;

  if (p1 == p2)
    return 0;

  do
    {
      /* I know this seems to be odd but the tolower() function in
	 some systems libc cannot handle nonalpha characters.  */
      c1 = isupper (*p1) ? tolower (*p1) : *p1;
      c2 = isupper (*p2) ? tolower (*p2) : *p2;
      if (c1 == '\0')
	break;
      ++p1;
      ++p2;
    }
  while (c1 == c2);

  return c1 - c2;
#endif
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产欧美一区二区精品忘忧草| 日韩国产欧美在线视频| 夜夜精品浪潮av一区二区三区| 亚洲一区二区三区小说| 久久精品国产99久久6| 国产激情一区二区三区桃花岛亚洲| k8久久久一区二区三区| 欧美日韩视频在线观看一区二区三区| 91精品国产色综合久久久蜜香臀| 欧美成人vr18sexvr| 国产片一区二区| 亚洲主播在线观看| 7777精品伊人久久久大香线蕉| 精品免费99久久| ㊣最新国产の精品bt伙计久久| 亚洲h在线观看| 日韩1区2区3区| 93久久精品日日躁夜夜躁欧美| 欧美日韩午夜在线| 国产精品久久久久久久久免费桃花| 亚洲国产精品一区二区久久恐怖片| 久久草av在线| 欧美伊人久久久久久久久影院| 日韩一区二区精品| 自拍偷在线精品自拍偷无码专区| 日韩高清国产一区在线| 91在线云播放| 2021中文字幕一区亚洲| 亚洲特级片在线| 国产原创一区二区三区| 在线观看国产精品网站| xnxx国产精品| 婷婷国产在线综合| 91在线观看污| 久久网站最新地址| 天堂成人免费av电影一区| jlzzjlzz欧美大全| 精品国产一区二区三区不卡| 亚洲一区二区三区视频在线| 丁香婷婷深情五月亚洲| 91精品国产综合久久久久久久久久| 日本一区二区三区dvd视频在线| 日韩精品免费视频人成| 色综合色综合色综合色综合色综合 | 久久品道一品道久久精品| 亚洲综合色区另类av| 成人网男人的天堂| 日韩精品一区二区三区在线观看| 亚洲一二三区在线观看| 国产成人免费视频精品含羞草妖精| 欧美一区在线视频| 亚洲一区av在线| www.在线成人| 国产午夜亚洲精品理论片色戒| 麻豆精品视频在线观看视频| 91国产成人在线| 国产精品久久久久久久久久久免费看| 精品一区二区在线免费观看| 制服.丝袜.亚洲.另类.中文| 夜夜精品视频一区二区 | 亚洲蜜臀av乱码久久精品 | 亚洲乱码国产乱码精品精98午夜 | 中文字幕日韩欧美一区二区三区| 美脚の诱脚舐め脚责91| 欧美日韩成人综合在线一区二区| 亚洲免费在线看| 91亚洲资源网| 亚洲婷婷国产精品电影人久久| 丰满少妇在线播放bd日韩电影| 久久人人爽人人爽| 国模少妇一区二区三区| 欧美成人免费网站| 精品在线亚洲视频| 精品久久久久久久人人人人传媒 | 国产网站一区二区| 精品亚洲国产成人av制服丝袜| 欧美一区二区三区小说| 日韩国产精品久久久| 8x福利精品第一导航| 午夜精彩视频在线观看不卡| 欧美久久高跟鞋激| 日韩成人免费电影| 日韩欧美亚洲国产另类| 寂寞少妇一区二区三区| xnxx国产精品| 成人永久免费视频| 亚洲欧美一区二区久久| 在线观看一区不卡| 亚洲午夜久久久久久久久久久| 在线观看视频一区二区| 亚洲v精品v日韩v欧美v专区| 5566中文字幕一区二区电影| 久久99久久久久| 国产亚洲污的网站| 成人小视频免费观看| 亚洲人亚洲人成电影网站色| 在线一区二区观看| 日韩不卡手机在线v区| 久久影院视频免费| 成人免费av在线| 亚洲乱码国产乱码精品精小说| 欧美三级韩国三级日本三斤| 日韩福利电影在线观看| 亚洲精品一区二区在线观看| 国产成人精品免费| 一区二区三区自拍| 91精选在线观看| 国产精品一区二区久久精品爱涩 | 日本精品视频一区二区| 亚洲成人动漫在线观看| 日韩欧美的一区| 高清成人免费视频| 一区二区激情小说| 日韩欧美国产午夜精品| 粉嫩高潮美女一区二区三区 | 日韩一二三四区| 国产成人综合网| 一区二区三区四区不卡视频| 欧美日韩午夜影院| 国产精品一二二区| 一区二区三区波多野结衣在线观看| 欧美日本免费一区二区三区| 国产麻豆视频精品| 亚洲国产你懂的| 久久久一区二区| 91啦中文在线观看| 精品一区二区三区欧美| 中文字幕在线不卡| 欧美一区二区三区四区在线观看| 成人av在线影院| 日韩vs国产vs欧美| 国产精品成人午夜| 欧美一区二区观看视频| av午夜精品一区二区三区| 美腿丝袜亚洲三区| 亚洲色图欧洲色图婷婷| 精品少妇一区二区| 91黄色免费网站| 国产精品一区一区三区| 偷偷要91色婷婷| 亚洲欧美另类图片小说| 精品久久久久久久久久久久久久久| 91蝌蚪porny成人天涯| 寂寞少妇一区二区三区| 亚洲444eee在线观看| 欧美激情一二三区| 精品久久久久久久久久久久包黑料 | 国产欧美一区二区精品性色| 欧美日韩免费观看一区二区三区| 国产99久久久国产精品潘金网站| 五月天久久比比资源色| 中文字幕乱码一区二区免费| 日韩一级二级三级精品视频| 欧美私模裸体表演在线观看| jiyouzz国产精品久久| 久久se这里有精品| 五月综合激情日本mⅴ| 亚洲黄色小视频| 国产精品伦理在线| 国产视频在线观看一区二区三区 | 国内不卡的二区三区中文字幕| 亚洲国产美国国产综合一区二区| 亚洲丝袜精品丝袜在线| 久久久欧美精品sm网站| 日韩三级伦理片妻子的秘密按摩| 欧洲一区在线观看| 99久久久精品免费观看国产蜜| 国产精品一区二区在线看| 日韩精品在线网站| 欧美日韩亚州综合| 欧美性猛片aaaaaaa做受| 99精品一区二区三区| 成人免费视频一区二区| 国内精品久久久久影院薰衣草| 日本不卡一区二区| 亚洲成人精品在线观看| 亚洲一区视频在线| 一区二区三区在线影院| 亚洲美女免费视频| 亚洲乱码中文字幕| 亚洲激情五月婷婷| 亚洲日本韩国一区| 亚洲欧洲制服丝袜| 综合中文字幕亚洲| 国产欧美综合在线| 国产精品区一区二区三区| 亚洲国产精品ⅴa在线观看| 国产三级欧美三级日产三级99| 26uuu欧美日本| 国产偷国产偷精品高清尤物 | 色综合天天做天天爱| 97精品国产露脸对白| 99精品视频一区二区| 91美女在线视频| 91豆麻精品91久久久久久| 欧美三级在线看| 51久久夜色精品国产麻豆| 91精品国产综合久久精品麻豆 | 国产精品系列在线观看| 国产美女精品一区二区三区|