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

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

?? hash.c

?? GCC編譯器源代碼
?? C
字號:
/* Hash tables for Objective C internal structures   Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.This file is part of GNU CC.GNU CC is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2, or (at your option)any later version.GNU CC is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with GNU CC; see the file COPYING.  If not, write tothe Free Software Foundation, 59 Temple Place - Suite 330,Boston, MA 02111-1307, USA.  *//* As a special exception, if you link this library with files   compiled with GCC to produce an executable, this does not cause   the resulting executable to be covered by the GNU General Public License.   This exception does not however invalidate any other reasons why   the executable file might be covered by the GNU General Public License.  */#include "assert.h"#include "objc/hash.h"#include "runtime.h"		/* for DEBUG_PRINTF *//* These two macros determine when a hash table is full and   by how much it should be expanded respectively.   These equations are percentages.  */#define FULLNESS(cache) \   ((((cache)->size * 75) / 100) <= (cache)->used)#define EXPANSION(cache) \  ((cache)->size * 2)cache_ptrhash_new (unsigned int size, hash_func_type hash_func,	  compare_func_type compare_func){  cache_ptr cache;  /* Pass me a value greater than 0 and a power of 2.  */  assert (size);  assert (!(size & (size - 1)));  /* Allocate the cache structure.  calloc insures     its initialization for default values.  */  cache = (cache_ptr) objc_calloc (1, sizeof (struct cache));  assert (cache);  /* Allocate the array of buckets for the cache.     calloc initializes all of the pointers to NULL.  */  cache->node_table    = (node_ptr *) objc_calloc (size, sizeof (node_ptr));  assert (cache->node_table);  cache->size  = size;  /* This should work for all processor architectures? */  cache->mask = (size - 1);	  /* Store the hashing function so that codes can be computed.  */  cache->hash_func = hash_func;  /* Store the function that compares hash keys to     determine if they are equal.  */  cache->compare_func = compare_func;  return cache;}voidhash_delete (cache_ptr cache){  node_ptr node;  node_ptr next_node;  unsigned int i;  /* Purge all key/value pairs from the table.  */  /* Step through the nodes one by one and remove every node WITHOUT     using hash_next. this makes hash_delete much more efficient. */  for (i = 0;i < cache->size;i++) {    if ((node = cache->node_table[i])) {      /* an entry in the hash table has been found, now step through the	 nodes next in the list and free them. */      while ((next_node = node->next)) {	hash_remove (cache,node->key);	node = next_node;      }      hash_remove (cache,node->key);    }  }  /* Release the array of nodes and the cache itself.  */  objc_free(cache->node_table);  objc_free(cache);}voidhash_add (cache_ptr *cachep, const void *key, void *value){  size_t indx = (*(*cachep)->hash_func)(*cachep, key);  node_ptr node = (node_ptr) objc_calloc (1, sizeof (struct cache_node));  assert (node);  /* Initialize the new node.  */  node->key    = key;  node->value  = value;  node->next  = (*cachep)->node_table[indx];  /* Debugging.     Check the list for another key.  */#ifdef DEBUG  { node_ptr node1 = (*cachep)->node_table[indx];    while (node1) {      assert (node1->key != key);      node1 = node1->next;    }  }#endif  /* Install the node as the first element on the list.  */  (*cachep)->node_table[indx] = node;  /* Bump the number of entries in the cache.  */  ++(*cachep)->used;  /* Check the hash table's fullness.   We're going     to expand if it is above the fullness level.  */  if (FULLNESS (*cachep)) {    /* The hash table has reached its fullness level.  Time to       expand it.       I'm using a slow method here but is built on other       primitive functions thereby increasing its       correctness.  */    node_ptr node1 = NULL;    cache_ptr new = hash_new (EXPANSION (*cachep),			      (*cachep)->hash_func,			      (*cachep)->compare_func);    DEBUG_PRINTF ("Expanding cache %#x from %d to %d\n",		  *cachep, (*cachep)->size, new->size);    /* Copy the nodes from the first hash table to the new one.  */    while ((node1 = hash_next (*cachep, node1)))      hash_add (&new, node1->key, node1->value);    /* Trash the old cache.  */    hash_delete (*cachep);    /* Return a pointer to the new hash table.  */    *cachep = new;  }}voidhash_remove (cache_ptr cache, const void *key){  size_t indx = (*cache->hash_func)(cache, key);  node_ptr node = cache->node_table[indx];  /* We assume there is an entry in the table.  Error if it is not.  */  assert (node);  /* Special case.  First element is the key/value pair to be removed.  */  if ((*cache->compare_func)(node->key, key)) {    cache->node_table[indx] = node->next;    objc_free(node);  } else {    /* Otherwise, find the hash entry.  */    node_ptr prev = node;    BOOL removed = NO;    do {      if ((*cache->compare_func)(node->key, key)) {        prev->next = node->next, removed = YES;        objc_free(node);      } else        prev = node, node = node->next;    } while (!removed && node);    assert (removed);  }  /* Decrement the number of entries in the hash table.  */  --cache->used;}node_ptrhash_next (cache_ptr cache, node_ptr node){  /* If the scan is being started then reset the last node     visitied pointer and bucket index.  */  if (!node)    cache->last_bucket  = 0;  /* If there is a node visited last then check for another     entry in the same bucket;  Otherwise step to the next bucket.  */  if (node) {    if (node->next)      /* There is a node which follows the last node	 returned.  Step to that node and retun it.  */      return node->next;    else      ++cache->last_bucket;  }  /* If the list isn't exhausted then search the buckets for     other nodes.  */  if (cache->last_bucket < cache->size) {    /*  Scan the remainder of the buckets looking for an entry	at the head of the list.  Return the first item found.  */    while (cache->last_bucket < cache->size)      if (cache->node_table[cache->last_bucket])        return cache->node_table[cache->last_bucket];      else        ++cache->last_bucket;    /* No further nodes were found in the hash table.  */    return NULL;  } else    return NULL;}/* Given KEY, return corresponding value for it in CACHE.   Return NULL if the KEY is not recorded.  */void *hash_value_for_key (cache_ptr cache, const void *key){  node_ptr node = cache->node_table[(*cache->hash_func)(cache, key)];  void *retval = NULL;  if (node)    do {      if ((*cache->compare_func)(node->key, key)) {        retval = node->value;              break;      } else        node = node->next;    } while (!retval && node);  return retval;}/* Given KEY, return YES if it exists in the CACHE.   Return NO if it does not */BOOLhash_is_key_in_hash (cache_ptr cache, const void *key){  node_ptr node = cache->node_table[(*cache->hash_func)(cache, key)];  if (node)    do {      if ((*cache->compare_func)(node->key, key))	  return YES;      else        node = node->next;    } while (node);  return NO;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91丨porny丨蝌蚪视频| 亚洲三级小视频| 欧美一区二区视频在线观看| 色丁香久综合在线久综合在线观看| 国产精品一区二区免费不卡 | 亚洲欧美国产三级| 日韩一区有码在线| 亚洲色图一区二区| 亚洲自拍另类综合| 婷婷丁香激情综合| 久久精品国产99久久6| 精品无码三级在线观看视频| 黑人巨大精品欧美一区| 国产自产高清不卡| 成人免费观看av| 色综合天天综合| 欧美肥大bbwbbw高潮| 欧美大片在线观看| 国产精品乱码人人做人人爱| 亚洲美女免费视频| 日韩在线观看一区二区| 激情成人综合网| 成人免费不卡视频| 欧美日韩精品欧美日韩精品一 | 91福利社在线观看| 欧美一区二区三区在| 国产欧美精品一区二区三区四区| 国产精品成人一区二区艾草| 亚洲一区在线观看免费| 极品尤物av久久免费看| 91香蕉视频mp4| 欧美www视频| 综合激情网...| 美腿丝袜在线亚洲一区| 99精品国产视频| 91精品福利在线一区二区三区| 久久一区二区三区国产精品| 亚洲伊人伊色伊影伊综合网| 狠狠网亚洲精品| 欧美综合在线视频| 国产欧美日韩视频一区二区| 亚洲成av人片在线观看无码| 国产成人综合在线播放| 91麻豆精品国产| 亚洲日本在线天堂| 国产专区欧美精品| 欧美久久久久中文字幕| 国产精品久久综合| 看片网站欧美日韩| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 日韩女同互慰一区二区| 亚洲一区二区av电影| 国产91精品一区二区麻豆网站| 欧美巨大另类极品videosbest | 国产精品久久久久精k8 | 亚洲欧洲制服丝袜| 国产一区二区三区日韩| 337p亚洲精品色噜噜| 亚洲精品一二三| 99精品久久只有精品| 国产免费久久精品| 国内精品在线播放| 精品少妇一区二区三区免费观看| 亚洲第一会所有码转帖| 91麻豆产精品久久久久久| 国产性做久久久久久| 国内精品伊人久久久久av一坑| 欧美福利视频一区| 视频一区二区三区在线| 欧美喷潮久久久xxxxx| 一区二区三区.www| 欧美亚洲愉拍一区二区| 亚洲三级在线观看| 在线免费观看不卡av| 亚洲精品视频免费看| 99精品国产视频| 一区二区三区影院| 欧美性猛交xxxxxxxx| 亚洲一区二区偷拍精品| 欧美视频一区二区在线观看| 亚洲国产视频网站| 91麻豆精品国产综合久久久久久 | gogogo免费视频观看亚洲一| 欧美激情在线观看视频免费| 国产米奇在线777精品观看| 久久久蜜桃精品| 国产成人啪免费观看软件| 亚洲国产精品成人久久综合一区| 成人性生交大片免费看视频在线| 国产精品国产a| 91搞黄在线观看| 日韩高清电影一区| 精品国产91久久久久久久妲己| 国产精品一区二区91| 亚洲欧美一区二区不卡| 欧美四级电影网| 久久99久久精品| 国产精品国产三级国产普通话99| 91在线你懂得| 五月天婷婷综合| 久久久99精品免费观看不卡| 99精品热视频| 另类欧美日韩国产在线| 国产精品女上位| 欧美精品日韩综合在线| 国产成人精品aa毛片| 午夜精品爽啪视频| 久久精品一区蜜桃臀影院| 色诱亚洲精品久久久久久| 日本aⅴ免费视频一区二区三区| 国产日韩精品一区二区三区| 在线观看日韩av先锋影音电影院| 日韩成人伦理电影在线观看| 国产精品午夜电影| 欧美丰满一区二区免费视频| 国产91精品久久久久久久网曝门| 亚洲综合免费观看高清完整版在线| 欧美变态凌虐bdsm| av不卡在线观看| 欧美96一区二区免费视频| 中文字幕一区二区三| 日韩欧美自拍偷拍| 91理论电影在线观看| 国产原创一区二区| 日日噜噜夜夜狠狠视频欧美人| 国产免费久久精品| 精品剧情在线观看| 欧美日韩一区三区四区| 99久久亚洲一区二区三区青草| 蜜臀av性久久久久av蜜臀妖精| 一区二区三区四区蜜桃| 欧美激情综合五月色丁香| 欧美一级高清片在线观看| 欧美午夜精品理论片a级按摩| 成人免费看片app下载| 国产在线国偷精品免费看| 日本成人在线电影网| 亚洲国产精品久久久久婷婷884 | 日韩一级大片在线| 欧美日韩视频第一区| 色国产精品一区在线观看| 99免费精品在线观看| 成人久久视频在线观看| 国产一区二区看久久| 免费成人在线网站| 免费人成黄页网站在线一区二区| 一区二区三区自拍| 一区二区三区资源| 亚洲主播在线观看| 亚洲高清免费一级二级三级| 亚洲另类在线视频| 亚洲欧美一区二区三区极速播放| 中文字幕+乱码+中文字幕一区| 久久精品亚洲精品国产欧美kt∨| 精品女同一区二区| 久久久久久9999| 欧美激情综合五月色丁香| 国产精品免费久久久久| 日韩美女视频19| 亚洲一区在线视频观看| 亚洲电影视频在线| 蜜桃视频在线观看一区| 成人午夜在线播放| 99精品一区二区三区| 91黄色激情网站| 欧美日韩激情一区二区三区| 7777女厕盗摄久久久| 精品欧美一区二区久久| 中文字幕av一区 二区| 一区二区三区中文字幕在线观看| 亚洲国产日韩综合久久精品| 日韩和欧美一区二区三区| 激情综合色播激情啊| 成人免费高清视频| 欧美三级韩国三级日本三斤| 6080yy午夜一二三区久久| 精品国产乱码久久久久久蜜臀| 国产女同互慰高潮91漫画| 亚洲精品中文字幕在线观看| 午夜视黄欧洲亚洲| 国产成人自拍网| 欧美日韩一区小说| 久久久久国色av免费看影院| 中文字幕一区免费在线观看| 亚洲精品视频一区二区| 蜜臀久久99精品久久久久久9| 国产91对白在线观看九色| 欧美亚州韩日在线看免费版国语版| 91久久一区二区| 精品国免费一区二区三区| 亚洲婷婷综合色高清在线| 免费精品视频在线| 99精品在线免费| 日韩欧美国产电影| 精品一区二区三区在线播放| 国产成a人亚洲精| 欧美肥妇free| 亚洲色欲色欲www在线观看| 视频在线观看一区| 色域天天综合网|