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

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

?? hash.c

?? gcc庫的原代碼,對編程有很大幫助.
?? C
字號:
/* Hash tables for Objective C internal structures   Copyright (C) 1993 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 "objc/objc.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)void *__objc_xcalloc (size_t, size_t);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_xcalloc (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_xcalloc (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;  /* Purge all key/value pairs from the table.  */  while ((node = hash_next (cache, NULL)))    hash_remove (cache, node->key);  /* Release the array of nodes and the cache itself.  */  free (cache->node_table);  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_xcalloc (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;    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;        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;      else        node = node->next;    } while (!retval && node);  return retval;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本美女一区二区| 亚洲男人天堂av网| 亚洲国产成人porn| 成人免费黄色在线| 日韩一区二区在线观看视频播放| 亚洲同性gay激情无套| 国产在线观看一区二区| 欧美调教femdomvk| 自拍偷在线精品自拍偷无码专区| 国产最新精品免费| 日韩欧美中文字幕制服| 亚洲五码中文字幕| 一本色道久久综合狠狠躁的推荐| 久久精品日产第一区二区三区高清版 | 国产a视频精品免费观看| 91精品国产综合久久福利软件| 亚洲免费高清视频在线| 丰满少妇在线播放bd日韩电影| 精品欧美黑人一区二区三区| 日韩电影免费一区| 欧美日韩在线直播| 夜夜夜精品看看| 日本高清不卡在线观看| 日韩毛片一二三区| fc2成人免费人成在线观看播放| 久久久综合精品| 国产一区激情在线| 亚洲va国产va欧美va观看| 日本二三区不卡| 亚洲美女偷拍久久| 色综合天天综合给合国产| 国产精品看片你懂得| 成人午夜私人影院| 国产精品无圣光一区二区| 国产精品一级在线| 久久久久久久久久久久电影| 国产精品99久久久久久久vr| 久久日韩精品一区二区五区| 国产在线不卡视频| 久久亚洲免费视频| 国产一区二区久久| 国产日韩欧美电影| 国产·精品毛片| 亚洲欧美综合另类在线卡通| 99精品视频在线观看| 亚洲色图欧洲色图婷婷| 99精品久久免费看蜜臀剧情介绍| 亚洲人快播电影网| 欧美亚洲免费在线一区| 日韩精品一二三四| 欧美成人video| 国产剧情在线观看一区二区| 国产亚洲欧美色| 成人免费看的视频| 亚洲激情图片qvod| 欧美日本不卡视频| 久久精品99国产精品| xvideos.蜜桃一区二区| 国产成人在线影院| 国产精品网站一区| 在线亚洲+欧美+日本专区| 亚洲最新视频在线观看| 欧美日韩国产中文| 久久99九九99精品| 亚洲国产精品精华液ab| 一本大道久久a久久精二百| 亚洲一级电影视频| 欧美一区二区福利在线| 国产高清一区日本| ...中文天堂在线一区| 欧美日韩一卡二卡三卡| 极品美女销魂一区二区三区| 中文字幕第一区第二区| 91福利资源站| 老司机午夜精品| 日本一区二区高清| 欧美亚洲丝袜传媒另类| 九九热在线视频观看这里只有精品| 中文字幕精品三区| 欧美视频一区二区三区| 国产一区啦啦啦在线观看| 亚洲男人的天堂在线观看| 日韩无一区二区| 日韩女优毛片在线| 国产91精品一区二区麻豆网站 | 国产亚洲精品久| 色婷婷国产精品久久包臀 | 亚洲欧美怡红院| 欧美精品久久天天躁| 国产精品系列在线播放| 亚洲午夜免费视频| 国产视频亚洲色图| 欧美日韩免费观看一区二区三区| 国内精品伊人久久久久影院对白| 亚洲情趣在线观看| 精品三级在线观看| 在线区一区二视频| 国产在线视频不卡二| 亚洲自拍偷拍麻豆| 久久久精品黄色| 欧美美女喷水视频| 高清不卡在线观看av| 天堂在线亚洲视频| 中文字幕一区二区三区在线播放| 91麻豆精品国产自产在线| 99免费精品视频| 另类调教123区| 亚洲国产裸拍裸体视频在线观看乱了| 久久精品免视看| 欧美一区日韩一区| 一本色道久久综合狠狠躁的推荐 | 亚洲自拍偷拍网站| 国产精品色在线| 日韩精品一区二区三区三区免费 | 色综合久久天天综合网| 国产在线观看一区二区| 日日夜夜免费精品视频| 亚洲免费观看高清完整版在线观看熊| 欧美精品一区二区蜜臀亚洲| 欧美日韩午夜在线视频| av成人动漫在线观看| 韩国成人福利片在线播放| 亚洲mv在线观看| 亚洲综合色网站| 亚洲免费观看在线视频| 亚洲国产精品激情在线观看| 精品91自产拍在线观看一区| 91精品午夜视频| 一本到不卡免费一区二区| 成人黄色av网站在线| 国产一区视频在线看| 日韩福利视频网| 亚洲成人www| 亚洲成年人影院| 一区二区免费视频| 亚洲精品视频免费看| 国产精品视频一区二区三区不卡| 久久精子c满五个校花| 日韩久久久精品| 日韩精品在线一区| 91精品国产美女浴室洗澡无遮挡| 欧美性视频一区二区三区| 91久久精品网| 91蜜桃免费观看视频| www.欧美色图| 99久精品国产| www..com久久爱| av一区二区不卡| 99久久久久久| 91在线视频18| 91视频一区二区三区| 91首页免费视频| 在线视频欧美精品| 欧美午夜一区二区三区免费大片| 欧美最猛性xxxxx直播| 欧美色倩网站大全免费| 欧美日本韩国一区二区三区视频 | 欧美在线色视频| 欧美亚洲日本国产| 欧美蜜桃一区二区三区| 欧美日韩1234| 日韩免费视频线观看| 久久久欧美精品sm网站| 国产女主播在线一区二区| 亚洲国产经典视频| 亚洲另类在线一区| 有坂深雪av一区二区精品| 亚洲综合在线免费观看| 午夜久久久久久久久| 日本欧美肥老太交大片| 精品一区二区在线播放| 精品国产免费一区二区三区四区| 精品日韩一区二区三区 | 91精品国产福利在线观看| 欧美一级国产精品| 久久综合九色综合欧美亚洲| 国产日韩av一区二区| 国产精品第13页| 一卡二卡三卡日韩欧美| 日韩高清不卡一区| 国产精品自拍av| 成人福利视频在线看| 91黄色小视频| 日韩午夜激情免费电影| 欧美激情一区二区三区不卡| 亚洲免费在线电影| 日韩精品欧美精品| 国产精品亚洲成人| 色av成人天堂桃色av| 7777精品伊人久久久大香线蕉超级流畅 | 欧美影院一区二区| 日韩一区二区三区视频| 欧美激情一区二区在线| 亚洲高清三级视频| 国内一区二区在线| 99热精品一区二区| 91精品蜜臀在线一区尤物| 国产亚洲制服色| 亚洲国产美女搞黄色| 久久国产三级精品|