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

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

?? hashlib.c

?? android-w.song.android.widget
?? C
字號:
/* hashlib.c -- functions to manage and access hash tables for bash. *//* Copyright (C) 1987,1989,1991,1995,1998,2001,2003,2005,2006,2008,2009 Free Software Foundation, Inc.   This file is part of GNU Bash, the Bourne Again SHell.   Bash 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 3 of the License, or   (at your option) any later version.   Bash 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 Bash.  If not, see <http://www.gnu.org/licenses/>.*/#include <config.h>#include "bashansi.h"#if defined (HAVE_UNISTD_H)#  ifdef _MINIX#    include <sys/types.h>#  endif#  include <unistd.h>#endif#include <stdio.h>#include "shell.h"#include "hashlib.h"/* Rely on properties of unsigned division (unsigned/int -> unsigned) and   don't discard the upper 32 bits of the value, if present. */#define HASH_BUCKET(s, t, h) (((h) = hash_string (s)) & ((t)->nbuckets - 1))static BUCKET_CONTENTS *copy_bucket_array __P((BUCKET_CONTENTS *, sh_string_func_t *));/* Make a new hash table with BUCKETS number of buckets.  Initialize   each slot in the table to NULL. */HASH_TABLE *hash_create (buckets)     int buckets;{  HASH_TABLE *new_table;  register int i;  new_table = (HASH_TABLE *)xmalloc (sizeof (HASH_TABLE));  if (buckets == 0)    buckets = DEFAULT_HASH_BUCKETS;  new_table->bucket_array =    (BUCKET_CONTENTS **)xmalloc (buckets * sizeof (BUCKET_CONTENTS *));  new_table->nbuckets = buckets;  new_table->nentries = 0;  for (i = 0; i < buckets; i++)    new_table->bucket_array[i] = (BUCKET_CONTENTS *)NULL;  return (new_table);}inthash_size (table)     HASH_TABLE *table;{  return (HASH_ENTRIES(table));}static BUCKET_CONTENTS *copy_bucket_array (ba, cpdata)     BUCKET_CONTENTS *ba;     sh_string_func_t *cpdata;	/* data copy function */{  BUCKET_CONTENTS *new_bucket, *n, *e;  if (ba == 0)    return ((BUCKET_CONTENTS *)0);  for (n = (BUCKET_CONTENTS *)0, e = ba; e; e = e->next)    {      if (n == 0)        {          new_bucket = (BUCKET_CONTENTS *)xmalloc (sizeof (BUCKET_CONTENTS));          n = new_bucket;        }      else        {          n->next = (BUCKET_CONTENTS *)xmalloc (sizeof (BUCKET_CONTENTS));          n = n->next;        }      n->key = savestring (e->key);      n->data = e->data ? (cpdata ? (*cpdata) (e->data) : savestring (e->data))			: NULL;      n->khash = e->khash;      n->times_found = e->times_found;      n->next = (BUCKET_CONTENTS *)NULL;    }  return new_bucket;  }HASH_TABLE *hash_copy (table, cpdata)     HASH_TABLE *table;     sh_string_func_t *cpdata;{  HASH_TABLE *new_table;  int i;  if (table == 0)    return ((HASH_TABLE *)NULL);  new_table = hash_create (table->nbuckets);  for (i = 0; i < table->nbuckets; i++)    new_table->bucket_array[i] = copy_bucket_array (table->bucket_array[i], cpdata);  new_table->nentries = table->nentries;  return new_table;}/* The `khash' check below requires that strings that compare equally with   strcmp hash to the same value. */unsigned inthash_string (s)     const char *s;{  register unsigned int i;  /* This is the best string hash function I found.     The magic is in the interesting relationship between the special prime     16777619 (2^24 + 403) and 2^32 and 2^8. */   for (i = 0; *s; s++)    {      i *= 16777619;      i ^= *s;    }  return i;}/* Return the location of the bucket which should contain the data   for STRING.  TABLE is a pointer to a HASH_TABLE. */inthash_bucket (string, table)     const char *string;     HASH_TABLE *table;{  unsigned int h;  return (HASH_BUCKET (string, table, h));}/* Return a pointer to the hashed item.  If the HASH_CREATE flag is passed,   create a new hash table entry for STRING, otherwise return NULL. */BUCKET_CONTENTS *hash_search (string, table, flags)     const char *string;     HASH_TABLE *table;     int flags;{  BUCKET_CONTENTS *list;  int bucket;  unsigned int hv;  if (table == 0 || ((flags & HASH_CREATE) == 0 && HASH_ENTRIES (table) == 0))    return (BUCKET_CONTENTS *)NULL;  bucket = HASH_BUCKET (string, table, hv);  for (list = table->bucket_array ? table->bucket_array[bucket] : 0; list; list = list->next)    {      if (hv == list->khash && STREQ (list->key, string))	{	  list->times_found++;	  return (list);	}    }  if (flags & HASH_CREATE)    {      list = (BUCKET_CONTENTS *)xmalloc (sizeof (BUCKET_CONTENTS));      list->next = table->bucket_array[bucket];      table->bucket_array[bucket] = list;      list->data = NULL;      list->key = (char *)string;	/* XXX fix later */      list->khash = hv;      list->times_found = 0;      table->nentries++;      return (list);    }        return (BUCKET_CONTENTS *)NULL;}/* Remove the item specified by STRING from the hash table TABLE.   The item removed is returned, so you can free its contents.  If   the item isn't in this table NULL is returned. */BUCKET_CONTENTS *hash_remove (string, table, flags)     const char *string;     HASH_TABLE *table;     int flags;{  int bucket;  BUCKET_CONTENTS *prev, *temp;  unsigned int hv;  if (table == 0 || HASH_ENTRIES (table) == 0)    return (BUCKET_CONTENTS *)NULL;  bucket = HASH_BUCKET (string, table, hv);  prev = (BUCKET_CONTENTS *)NULL;  for (temp = table->bucket_array[bucket]; temp; temp = temp->next)    {      if (hv == temp->khash && STREQ (temp->key, string))	{	  if (prev)	    prev->next = temp->next;	  else	    table->bucket_array[bucket] = temp->next;	  table->nentries--;	  return (temp);	}      prev = temp;    }  return ((BUCKET_CONTENTS *) NULL);}/* Create an entry for STRING, in TABLE.  If the entry already   exists, then return it (unless the HASH_NOSRCH flag is set). */BUCKET_CONTENTS *hash_insert (string, table, flags)     char *string;     HASH_TABLE *table;     int flags;{  BUCKET_CONTENTS *item;  int bucket;  unsigned int hv;  if (table == 0)    table = hash_create (0);  item = (flags & HASH_NOSRCH) ? (BUCKET_CONTENTS *)NULL  			       : hash_search (string, table, 0);  if (item == 0)    {      bucket = HASH_BUCKET (string, table, hv);      item = (BUCKET_CONTENTS *)xmalloc (sizeof (BUCKET_CONTENTS));      item->next = table->bucket_array[bucket];      table->bucket_array[bucket] = item;      item->data = NULL;      item->key = string;      item->khash = hv;      item->times_found = 0;      table->nentries++;    }  return (item);}/* Remove and discard all entries in TABLE.  If FREE_DATA is non-null, it   is a function to call to dispose of a hash item's data.  Otherwise,   free() is called. */voidhash_flush (table, free_data)     HASH_TABLE *table;     sh_free_func_t *free_data;{  int i;  register BUCKET_CONTENTS *bucket, *item;  if (table == 0 || HASH_ENTRIES (table) == 0)    return;  for (i = 0; i < table->nbuckets; i++)    {      bucket = table->bucket_array[i];      while (bucket)	{	  item = bucket;	  bucket = bucket->next;	  if (free_data)	    (*free_data) (item->data);	  else	    free (item->data);	  free (item->key);	  free (item);	}      table->bucket_array[i] = (BUCKET_CONTENTS *)NULL;    }  table->nentries = 0;}/* Free the hash table pointed to by TABLE. */voidhash_dispose (table)     HASH_TABLE *table;{  free (table->bucket_array);  free (table);}voidhash_walk (table, func)     HASH_TABLE *table;     hash_wfunc *func;{  register int i;  BUCKET_CONTENTS *item;  if (table == 0 || HASH_ENTRIES (table) == 0)    return;  for (i = 0; i < table->nbuckets; i++)    {      for (item = hash_items (i, table); item; item = item->next)	if ((*func) (item) < 0)	  return;    }}#if defined (DEBUG) || defined (TEST_HASHING)voidhash_pstats (table, name)     HASH_TABLE *table;     char *name;{  register int slot, bcount;  register BUCKET_CONTENTS *bc;  if (name == 0)    name = "unknown hash table";  fprintf (stderr, "%s: %d buckets; %d items\n", name, table->nbuckets, table->nentries);  /* Print out a count of how many strings hashed to each bucket, so we can     see how even the distribution is. */  for (slot = 0; slot < table->nbuckets; slot++)    {      bc = hash_items (slot, table);      fprintf (stderr, "\tslot %3d: ", slot);      for (bcount = 0; bc; bc = bc->next)	bcount++;      fprintf (stderr, "%d\n", bcount);    }}#endif#ifdef TEST_HASHING/* link with xmalloc.o and lib/malloc/libmalloc.a */#undef NULL#include <stdio.h>#ifndef NULL#define NULL 0#endifHASH_TABLE *table, *ntable;int interrupt_immediately = 0;intsignal_is_trapped (s)     int s;{  return (0);}voidprogramming_error (const char *format, ...){  abort();}voidfatal_error (const char *format, ...){  abort();}main (){  char string[256];  int count = 0;  BUCKET_CONTENTS *tt;  table = hash_create (0);  for (;;)    {      char *temp_string;      if (fgets (string, sizeof (string), stdin) == 0)	break;      if (!*string)	break;      temp_string = savestring (string);      tt = hash_insert (temp_string, table, 0);      if (tt->times_found)	{	  fprintf (stderr, "You have already added item `%s'\n", string);	  free (temp_string);	}      else	{	  count++;	}    }  hash_pstats (table, "hash test");  ntable = hash_copy (table, (sh_string_func_t *)NULL);  hash_flush (table, (sh_free_func_t *)NULL);  hash_pstats (ntable, "hash copy test");  exit (0);}#endif /* TEST_HASHING */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区日韩精品| 国产 日韩 欧美大片| 国内精品久久久久影院一蜜桃| 国产精品538一区二区在线| 欧美偷拍一区二区| 国产网红主播福利一区二区| 亚洲成在线观看| 91天堂素人约啪| 久久精品亚洲国产奇米99| 午夜电影久久久| 91精品办公室少妇高潮对白| 日本一区二区三级电影在线观看| 亚洲成av人片一区二区| 91麻豆123| 欧美高清在线视频| 国产精品综合二区| 欧美成人性福生活免费看| 婷婷开心激情综合| 欧美亚洲一区二区在线| 亚洲三级免费观看| 成人永久免费视频| 久久九九全国免费| 国产高清在线精品| 欧美精品一区二区三区久久久| 午夜欧美大尺度福利影院在线看 | 国产精品福利在线播放| 国模冰冰炮一区二区| 日韩精品资源二区在线| 日韩成人免费看| 欧美高清性hdvideosex| 亚洲国产wwwccc36天堂| 欧美色图12p| 偷拍自拍另类欧美| 777奇米成人网| 美腿丝袜亚洲色图| 亚洲精品一区二区三区蜜桃下载| 开心九九激情九九欧美日韩精美视频电影| 欧美美女直播网站| 日本强好片久久久久久aaa| 欧美精品一二三| 青青草精品视频| 精品国产亚洲在线| 高清国产一区二区| 亚洲欧洲韩国日本视频| 91久久精品一区二区| 亚洲国产日韩精品| 欧美大片日本大片免费观看| 久久99精品视频| 国产精品丝袜久久久久久app| 岛国一区二区在线观看| 亚洲欧美另类久久久精品| 91传媒视频在线播放| 亚洲成人精品在线观看| 精品伦理精品一区| 成人精品电影在线观看| 亚洲综合999| 日韩天堂在线观看| 成人中文字幕在线| 偷拍亚洲欧洲综合| 久久综合九色综合欧美亚洲| 成人晚上爱看视频| 亚洲一区二区三区中文字幕在线| 91精品国产免费| 粉嫩aⅴ一区二区三区四区五区| 国产精品国产三级国产有无不卡| 欧美日韩另类国产亚洲欧美一级| 老司机精品视频在线| 中文字幕在线不卡视频| 欧美精品三级在线观看| 国产乱码一区二区三区| 一区二区三区日本| 精品99999| 欧美探花视频资源| 国产成人在线免费观看| 亚洲亚洲精品在线观看| 国产视频一区二区在线观看| 欧美性一二三区| 国产a区久久久| 婷婷成人综合网| 国产精品沙发午睡系列990531| 欧美日韩亚洲另类| 丁香六月久久综合狠狠色| 日韩不卡免费视频| 亚洲精品菠萝久久久久久久| 久久久久久亚洲综合影院红桃| 欧美影院午夜播放| 成人性色生活片| 激情综合五月婷婷| 日韩精品视频网| 一区二区在线观看视频| 久久久高清一区二区三区| 欧美精品色综合| 在线看国产一区| kk眼镜猥琐国模调教系列一区二区 | 国产精品中文欧美| 日韩精品欧美精品| 一区二区三区高清在线| 国产精品国产馆在线真实露脸| 欧美变态tickle挠乳网站| 欧美日韩国产首页在线观看| www.亚洲国产| 成人午夜电影久久影院| 国产一区二区精品久久| 麻豆国产91在线播放| 日本欧美肥老太交大片| 午夜精品久久久久久久久久久| 亚洲品质自拍视频| 亚洲同性gay激情无套| 国产偷国产偷精品高清尤物| 久久综合中文字幕| 久久久综合激的五月天| 欧美mv日韩mv亚洲| 欧美videos中文字幕| 日韩一级二级三级| 欧美α欧美αv大片| 欧美一区二区三区免费在线看| 欧美日韩国产精品成人| 在线成人高清不卡| 日韩午夜小视频| 日韩欧美第一区| 精品sm捆绑视频| 欧美国产日韩a欧美在线观看| 国产视频一区在线播放| 国产精品美女久久久久久久久久久 | 亚洲国产综合人成综合网站| 亚洲人xxxx| 亚洲成人1区2区| 日本不卡在线视频| 国产在线国偷精品免费看| 国产成人啪午夜精品网站男同| 成人av免费在线播放| 日本久久电影网| 欧美一区永久视频免费观看| 日韩精品中午字幕| 久久精品欧美日韩| 亚洲同性gay激情无套| 一区二区三区日韩| 另类欧美日韩国产在线| 国产激情一区二区三区桃花岛亚洲| 成人综合在线观看| 欧美三级日韩在线| 亚洲精品一线二线三线| 中文子幕无线码一区tr| 亚洲免费大片在线观看| 日韩制服丝袜av| 国产99精品视频| 91久久人澡人人添人人爽欧美 | 91麻豆文化传媒在线观看| 欧美亚洲日本一区| 精品国产91乱码一区二区三区| 亚洲国产精品ⅴa在线观看| 亚洲精品日韩一| 国模少妇一区二区三区| 色88888久久久久久影院按摩 | 日本aⅴ亚洲精品中文乱码| 国产乱码精品一区二区三区五月婷| 97久久精品人人做人人爽| 欧美一区永久视频免费观看| 中文一区一区三区高中清不卡| 日韩高清不卡一区| av激情综合网| 精品国产露脸精彩对白| 一区二区在线观看视频在线观看| 极品少妇xxxx偷拍精品少妇| 色猫猫国产区一区二在线视频| 欧美成人综合网站| 亚洲一二三四久久| 国产 日韩 欧美大片| 欧美一区二区视频在线观看 | 欧美激情在线免费观看| 日韩激情视频在线观看| 色综合久久久久综合99| 久久久亚洲欧洲日产国码αv| 午夜精品免费在线| 97se狠狠狠综合亚洲狠狠| 久久久久久久综合日本| 亚洲www啪成人一区二区麻豆| 99r精品视频| 国产精品你懂的在线欣赏| 国产综合一区二区| 日韩欧美中文字幕一区| 午夜精品久久久久久久蜜桃app| 99国产精品久| 最新国产成人在线观看| 国产成人h网站| 久久久精品日韩欧美| 美女免费视频一区二区| 欧美日本韩国一区| 亚洲国产精品影院| 91成人在线精品| 一区二区三区四区不卡视频| 波多野结衣在线一区| 中文字幕成人在线观看| 国产又黄又大久久| 久久久影视传媒| 国产91在线观看丝袜| 国产精品久久综合| 白白色 亚洲乱淫| 亚洲人成7777| 欧美亚洲愉拍一区二区|