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

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

?? tclhash.c

?? tcl源碼詳細資料
?? C
?? 第 1 頁 / 共 2 頁
字號:
 *	is a newly-created entry, then *newPtr will be set to a non-zero *	value;  otherwise *newPtr will be set to 0.  If this is a new *	entry the value stored in the entry will initially be 0. * * Side effects: *	A new entry may be added to the hash table. * *---------------------------------------------------------------------- */static Tcl_HashEntry *StringCreate(tablePtr, key, newPtr)    Tcl_HashTable *tablePtr;	/* Table in which to lookup entry. */    char *key;			/* Key to use to find or create matching				 * entry. */    int *newPtr;		/* Store info here telling whether a new				 * entry was created. */{    register Tcl_HashEntry *hPtr;    register char *p1, *p2;    int index;    index = HashString(key) & tablePtr->mask;    /*     * Search all of the entries in this bucket.     */    for (hPtr = tablePtr->buckets[index]; hPtr != NULL;	    hPtr = hPtr->nextPtr) {	for (p1 = key, p2 = hPtr->key.string; ; p1++, p2++) {	    if (*p1 != *p2) {		break;	    }	    if (*p1 == '\0') {		*newPtr = 0;		return hPtr;	    }	}    }    /*     * Entry not found.  Add a new one to the bucket.     */    *newPtr = 1;    hPtr = (Tcl_HashEntry *) ckalloc((unsigned)	    (sizeof(Tcl_HashEntry) + strlen(key) - (sizeof(hPtr->key) -1)));    hPtr->tablePtr = tablePtr;    hPtr->bucketPtr = &(tablePtr->buckets[index]);    hPtr->nextPtr = *hPtr->bucketPtr;    hPtr->clientData = 0;    strcpy(hPtr->key.string, key);    *hPtr->bucketPtr = hPtr;    tablePtr->numEntries++;    /*     * If the table has exceeded a decent size, rebuild it with many     * more buckets.     */    if (tablePtr->numEntries >= tablePtr->rebuildSize) {	RebuildTable(tablePtr);    }    return hPtr;}/* *---------------------------------------------------------------------- * * OneWordFind -- * *	Given a hash table with one-word keys, and a one-word key, find *	the entry with a matching key. * * Results: *	The return value is a token for the matching entry in the *	hash table, or NULL if there was no matching entry. * * Side effects: *	None. * *---------------------------------------------------------------------- */static Tcl_HashEntry *OneWordFind(tablePtr, key)    Tcl_HashTable *tablePtr;	/* Table in which to lookup entry. */    register char *key;		/* Key to use to find matching entry. */{    register Tcl_HashEntry *hPtr;    int index;    index = RANDOM_INDEX(tablePtr, key);    /*     * Search all of the entries in the appropriate bucket.     */    for (hPtr = tablePtr->buckets[index]; hPtr != NULL;	    hPtr = hPtr->nextPtr) {	if (hPtr->key.oneWordValue == key) {	    return hPtr;	}    }    return NULL;}/* *---------------------------------------------------------------------- * * OneWordCreate -- * *	Given a hash table with one-word keys, and a one-word key, find *	the entry with a matching key.  If there is no matching entry, *	then create a new entry that does match. * * Results: *	The return value is a pointer to the matching entry.  If this *	is a newly-created entry, then *newPtr will be set to a non-zero *	value;  otherwise *newPtr will be set to 0.  If this is a new *	entry the value stored in the entry will initially be 0. * * Side effects: *	A new entry may be added to the hash table. * *---------------------------------------------------------------------- */static Tcl_HashEntry *OneWordCreate(tablePtr, key, newPtr)    Tcl_HashTable *tablePtr;	/* Table in which to lookup entry. */    register char *key;		/* Key to use to find or create matching				 * entry. */    int *newPtr;		/* Store info here telling whether a new				 * entry was created. */{    register Tcl_HashEntry *hPtr;    int index;    index = RANDOM_INDEX(tablePtr, key);    /*     * Search all of the entries in this bucket.     */    for (hPtr = tablePtr->buckets[index]; hPtr != NULL;	    hPtr = hPtr->nextPtr) {	if (hPtr->key.oneWordValue == key) {	    *newPtr = 0;	    return hPtr;	}    }    /*     * Entry not found.  Add a new one to the bucket.     */    *newPtr = 1;    hPtr = (Tcl_HashEntry *) ckalloc(sizeof(Tcl_HashEntry));    hPtr->tablePtr = tablePtr;    hPtr->bucketPtr = &(tablePtr->buckets[index]);    hPtr->nextPtr = *hPtr->bucketPtr;    hPtr->clientData = 0;    hPtr->key.oneWordValue = key;    *hPtr->bucketPtr = hPtr;    tablePtr->numEntries++;    /*     * If the table has exceeded a decent size, rebuild it with many     * more buckets.     */    if (tablePtr->numEntries >= tablePtr->rebuildSize) {	RebuildTable(tablePtr);    }    return hPtr;}/* *---------------------------------------------------------------------- * * ArrayFind -- * *	Given a hash table with array-of-int keys, and a key, find *	the entry with a matching key. * * Results: *	The return value is a token for the matching entry in the *	hash table, or NULL if there was no matching entry. * * Side effects: *	None. * *---------------------------------------------------------------------- */static Tcl_HashEntry *ArrayFind(tablePtr, key)    Tcl_HashTable *tablePtr;	/* Table in which to lookup entry. */    char *key;			/* Key to use to find matching entry. */{    register Tcl_HashEntry *hPtr;    int *arrayPtr = (int *) key;    register int *iPtr1, *iPtr2;    int index, count;    for (index = 0, count = tablePtr->keyType, iPtr1 = arrayPtr;	    count > 0; count--, iPtr1++) {	index += *iPtr1;    }    index = RANDOM_INDEX(tablePtr, index);    /*     * Search all of the entries in the appropriate bucket.     */    for (hPtr = tablePtr->buckets[index]; hPtr != NULL;	    hPtr = hPtr->nextPtr) {	for (iPtr1 = arrayPtr, iPtr2 = hPtr->key.words,		count = tablePtr->keyType; ; count--, iPtr1++, iPtr2++) {	    if (count == 0) {		return hPtr;	    }	    if (*iPtr1 != *iPtr2) {		break;	    }	}    }    return NULL;}/* *---------------------------------------------------------------------- * * ArrayCreate -- * *	Given a hash table with one-word keys, and a one-word key, find *	the entry with a matching key.  If there is no matching entry, *	then create a new entry that does match. * * Results: *	The return value is a pointer to the matching entry.  If this *	is a newly-created entry, then *newPtr will be set to a non-zero *	value;  otherwise *newPtr will be set to 0.  If this is a new *	entry the value stored in the entry will initially be 0. * * Side effects: *	A new entry may be added to the hash table. * *---------------------------------------------------------------------- */static Tcl_HashEntry *ArrayCreate(tablePtr, key, newPtr)    Tcl_HashTable *tablePtr;	/* Table in which to lookup entry. */    register char *key;		/* Key to use to find or create matching				 * entry. */    int *newPtr;		/* Store info here telling whether a new				 * entry was created. */{    register Tcl_HashEntry *hPtr;    int *arrayPtr = (int *) key;    register int *iPtr1, *iPtr2;    int index, count;    for (index = 0, count = tablePtr->keyType, iPtr1 = arrayPtr;	    count > 0; count--, iPtr1++) {	index += *iPtr1;    }    index = RANDOM_INDEX(tablePtr, index);    /*     * Search all of the entries in the appropriate bucket.     */    for (hPtr = tablePtr->buckets[index]; hPtr != NULL;	    hPtr = hPtr->nextPtr) {	for (iPtr1 = arrayPtr, iPtr2 = hPtr->key.words,		count = tablePtr->keyType; ; count--, iPtr1++, iPtr2++) {	    if (count == 0) {		*newPtr = 0;		return hPtr;	    }	    if (*iPtr1 != *iPtr2) {		break;	    }	}    }    /*     * Entry not found.  Add a new one to the bucket.     */    *newPtr = 1;    hPtr = (Tcl_HashEntry *) ckalloc((unsigned) (sizeof(Tcl_HashEntry)	    + (tablePtr->keyType*sizeof(int)) - 4));    hPtr->tablePtr = tablePtr;    hPtr->bucketPtr = &(tablePtr->buckets[index]);    hPtr->nextPtr = *hPtr->bucketPtr;    hPtr->clientData = 0;    for (iPtr1 = arrayPtr, iPtr2 = hPtr->key.words, count = tablePtr->keyType;	    count > 0; count--, iPtr1++, iPtr2++) {	*iPtr2 = *iPtr1;    }    *hPtr->bucketPtr = hPtr;    tablePtr->numEntries++;    /*     * If the table has exceeded a decent size, rebuild it with many     * more buckets.     */    if (tablePtr->numEntries >= tablePtr->rebuildSize) {	RebuildTable(tablePtr);    }    return hPtr;}/* *---------------------------------------------------------------------- * * BogusFind -- * *	This procedure is invoked when an Tcl_FindHashEntry is called *	on a table that has been deleted. * * Results: *	If panic returns (which it shouldn't) this procedure returns *	NULL. * * Side effects: *	Generates a panic. * *---------------------------------------------------------------------- */	/* ARGSUSED */static Tcl_HashEntry *BogusFind(tablePtr, key)    Tcl_HashTable *tablePtr;	/* Table in which to lookup entry. */    char *key;			/* Key to use to find matching entry. */{    panic("called Tcl_FindHashEntry on deleted table");    return NULL;}/* *---------------------------------------------------------------------- * * BogusCreate -- * *	This procedure is invoked when an Tcl_CreateHashEntry is called *	on a table that has been deleted. * * Results: *	If panic returns (which it shouldn't) this procedure returns *	NULL. * * Side effects: *	Generates a panic. * *---------------------------------------------------------------------- */	/* ARGSUSED */static Tcl_HashEntry *BogusCreate(tablePtr, key, newPtr)    Tcl_HashTable *tablePtr;	/* Table in which to lookup entry. */    char *key;			/* Key to use to find or create matching				 * entry. */    int *newPtr;		/* Store info here telling whether a new				 * entry was created. */{    panic("called Tcl_CreateHashEntry on deleted table");    return NULL;}/* *---------------------------------------------------------------------- * * RebuildTable -- * *	This procedure is invoked when the ratio of entries to hash *	buckets becomes too large.  It creates a new table with a *	larger bucket array and moves all of the entries into the *	new table. * * Results: *	None. * * Side effects: *	Memory gets reallocated and entries get re-hashed to new *	buckets. * *---------------------------------------------------------------------- */static voidRebuildTable(tablePtr)    register Tcl_HashTable *tablePtr;	/* Table to enlarge. */{    int oldSize, count, index;    Tcl_HashEntry **oldBuckets;    register Tcl_HashEntry **oldChainPtr, **newChainPtr;    register Tcl_HashEntry *hPtr;    oldSize = tablePtr->numBuckets;    oldBuckets = tablePtr->buckets;    /*     * Allocate and initialize the new bucket array, and set up     * hashing constants for new array size.     */    tablePtr->numBuckets *= 4;    tablePtr->buckets = (Tcl_HashEntry **) ckalloc((unsigned)	    (tablePtr->numBuckets * sizeof(Tcl_HashEntry *)));    for (count = tablePtr->numBuckets, newChainPtr = tablePtr->buckets;	    count > 0; count--, newChainPtr++) {	*newChainPtr = NULL;    }    tablePtr->rebuildSize *= 4;    tablePtr->downShift -= 2;    tablePtr->mask = (tablePtr->mask << 2) + 3;    /*     * Rehash all of the existing entries into the new bucket array.     */    for (oldChainPtr = oldBuckets; oldSize > 0; oldSize--, oldChainPtr++) {	for (hPtr = *oldChainPtr; hPtr != NULL; hPtr = *oldChainPtr) {	    *oldChainPtr = hPtr->nextPtr;	    if (tablePtr->keyType == TCL_STRING_KEYS) {		index = HashString(hPtr->key.string) & tablePtr->mask;	    } else if (tablePtr->keyType == TCL_ONE_WORD_KEYS) {		index = RANDOM_INDEX(tablePtr, hPtr->key.oneWordValue);	    } else {		register int *iPtr;		int count;		for (index = 0, count = tablePtr->keyType,			iPtr = hPtr->key.words; count > 0; count--, iPtr++) {		    index += *iPtr;		}		index = RANDOM_INDEX(tablePtr, index);	    }	    hPtr->bucketPtr = &(tablePtr->buckets[index]);	    hPtr->nextPtr = *hPtr->bucketPtr;	    *hPtr->bucketPtr = hPtr;	}    }    /*     * Free up the old bucket array, if it was dynamically allocated.     */    if (oldBuckets != tablePtr->staticBuckets) {	ckfree((char *) oldBuckets);    }}#elsestatic const char file_name[] = "tclHash.c";#endif /* EXCLUDE_TCL */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美福利一区二区| 国产精品久久久久婷婷| 国产精品视频看| 亚洲福利电影网| 国产成人99久久亚洲综合精品| 91精品91久久久中77777| 精品国产人成亚洲区| 亚洲天堂a在线| 亚洲一二三区在线观看| 成人v精品蜜桃久久一区| 欧美久久免费观看| 综合亚洲深深色噜噜狠狠网站| 欧美a级一区二区| 日本久久精品电影| 中文字幕av资源一区| 秋霞成人午夜伦在线观看| 91在线观看成人| 中文字幕免费观看一区| 九九**精品视频免费播放| 欧美吞精做爰啪啪高潮| 中文字幕一区二区视频| 国产毛片精品国产一区二区三区| 欧美顶级少妇做爰| 亚洲一区在线观看免费 | 亚洲欧洲av一区二区三区久久| 免费看黄色91| 欧美日韩国产区一| 亚洲一区二区三区四区的| 91视频精品在这里| 亚洲欧洲三级电影| 91麻豆精品一区二区三区| 欧美激情在线看| 成人天堂资源www在线| 久久九九久精品国产免费直播| 国内精品伊人久久久久av一坑| 欧美一个色资源| 日本欧美韩国一区三区| 欧美浪妇xxxx高跟鞋交| 天堂资源在线中文精品| 7777精品伊人久久久大香线蕉 | 欧美日本在线视频| 午夜精品视频一区| 欧美一级免费观看| 韩国三级在线一区| 国产欧美日韩久久| 91偷拍与自偷拍精品| 一二三区精品视频| 7777精品伊人久久久大香线蕉经典版下载| 午夜免费久久看| 欧美大片在线观看一区| 国产一区二区精品在线观看| 国产精品色呦呦| 在线观看成人小视频| 午夜亚洲福利老司机| 99麻豆久久久国产精品免费| 欧美激情综合网| 99久久精品国产麻豆演员表| 欧美电视剧在线看免费| 国产麻豆精品在线| 国产精品色婷婷久久58| 成人免费视频一区二区| 亚洲同性gay激情无套| 91免费观看视频在线| 一区二区三区中文字幕电影 | 国产午夜精品一区二区三区四区| 国产一区二区成人久久免费影院| 久久影院午夜论| 成人禁用看黄a在线| 国产精品毛片久久久久久久 | 久久激情综合网| 欧美mv日韩mv国产| 国产一区二区三区最好精华液| 欧美精品xxxxbbbb| 国产美女在线观看一区| 亚洲国产激情av| 欧美在线三级电影| 美腿丝袜亚洲一区| 久久久久成人黄色影片| 99久久精品免费看国产免费软件| 亚洲一区在线观看免费观看电影高清| 91麻豆精品国产| 国产精品自拍在线| 亚洲免费av高清| 欧美日韩一区三区| 精品午夜一区二区三区在线观看| 国产欧美精品一区二区色综合| 色婷婷国产精品| 美女视频黄久久| 亚洲男人电影天堂| 日韩精品自拍偷拍| 国产福利91精品一区二区三区| 亚洲精品中文在线观看| 日韩欧美123| 91行情网站电视在线观看高清版| 国产日韩精品一区二区三区| 欧美一卡二卡三卡四卡| 不卡视频在线观看| 另类中文字幕网| 一区二区三区在线观看动漫| 精品国产一区二区精华| 欧美图区在线视频| 国产成人精品免费看| 日韩av网站免费在线| 国产精品的网站| 欧美精品乱码久久久久久按摩 | 麻豆精品在线看| 一区二区三区在线高清| 久久久久久久久久久久久久久99| 91福利国产成人精品照片| 国产精品一二三在| 久久精品国产一区二区三| 一区二区三区中文字幕电影| 亚洲国产精品精华液2区45| 欧美亚洲一区三区| 波多野结衣中文一区| 狠狠色丁香久久婷婷综合_中| 亚洲第一主播视频| 日韩毛片高清在线播放| 国产精品天美传媒| 精品国产乱码久久久久久闺蜜| 欧美日韩精品一区视频| 91影院在线免费观看| 不卡的av网站| 另类小说综合欧美亚洲| 亚洲成人av在线电影| 亚洲激情成人在线| 亚洲视频一二三区| 国产精品女主播av| 国产精品视频yy9299一区| 国产喷白浆一区二区三区| 精品88久久久久88久久久| 日韩一区二区麻豆国产| 91精品国产一区二区人妖| 欧美一区二区在线免费观看| 67194成人在线观看| 欧美欧美午夜aⅴ在线观看| 在线亚洲一区二区| 色婷婷综合视频在线观看| 色8久久人人97超碰香蕉987| 色88888久久久久久影院野外| 日本电影欧美片| 欧美日韩美少妇| 7878成人国产在线观看| 欧美一卡在线观看| 欧美mv和日韩mv国产网站| 久久久噜噜噜久久中文字幕色伊伊 | 91精品国产麻豆| 欧美一区二区三区在| 欧美sm极限捆绑bd| 国产精品美女久久久久久久| 亚洲同性gay激情无套| 亚洲一区二区在线观看视频| 午夜精品久久久久久| 日本欧美肥老太交大片| 极品瑜伽女神91| eeuss鲁片一区二区三区在线看| 91在线无精精品入口| 欧美午夜在线一二页| 欧美一区二区视频网站| 国产午夜一区二区三区| 自拍偷自拍亚洲精品播放| 偷窥少妇高潮呻吟av久久免费| 亚洲成人av一区二区三区| 美国一区二区三区在线播放| 国产成人在线免费观看| 色综合久久天天| 欧美成人免费网站| 国产精品久久久久久户外露出 | 欧美日韩国产在线观看| 欧美岛国在线观看| 亚洲同性同志一二三专区| 日本中文字幕一区二区视频| 福利一区福利二区| 在线观看日韩av先锋影音电影院| 日韩一区二区免费在线观看| 国产精品美女久久久久高潮| 最新中文字幕一区二区三区| 奇米精品一区二区三区在线观看一| 高清日韩电视剧大全免费| 欧美视频中文字幕| 国产亚洲成av人在线观看导航| 伊人夜夜躁av伊人久久| 狠狠色狠狠色综合系列| 精品视频免费在线| 欧美国产精品中文字幕| 偷窥少妇高潮呻吟av久久免费| 色综合激情五月| 欧美激情中文字幕| 久久成人久久鬼色| 欧美午夜在线观看| 国产精品二区一区二区aⅴ污介绍| 蜜桃视频在线一区| 91国在线观看| 久久蜜桃av一区二区天堂| 久久99热这里只有精品| 欧美在线视频不卡| 日韩美女啊v在线免费观看| 国产成人av影院| 欧美精品一区二| 蜜臀久久99精品久久久画质超高清|