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

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

?? hashlib.c

?? vxworks 5.5 kernel code
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/* hashLib.c - generic hashing library *//* Copyright 1990-1993 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01l,12feb93,kdl  changed hashLibInit() to handle multiple invocations.01k,04jul92,jcf  scalable/ANSI/cleanup effort.01j,26may92,rrr  the tree shuffle01i,19nov91,rrr  shut up some ansi warnings.01h,04oct91,rrr  passed through the ansification filter                  -changed functions to ansi style		  -changed includes to have absolute path from h/		  -changed VOID to void		  -changed copyright notice01g,01oct90,jcf   fixed hashTblEach() to traverse table correctly.01f,28sep90,jcf   documentation.01e,17jul90,dnw   changed call to objAlloc() to objAllocExtra()01d,05jul90,jcf   documentation.01c,23jun90,jcf   changed ffs to ffsMsb.01b,22apr90,jcf   removed hashTblShow to indepent show routine library.01a,17nov89,jcf   written.*//*DESCRIPTIONThis subroutine library supports the creation and maintenance of achained hash table.  Hash tables efficiently store hash nodes for fast access.They are frequently used for symbol tables, or other name to identifierfunctions.  A chained hash table is an array of singly linked list heads,with one list head per element of the hash table.  During creation a hash tableis passed two user-definable functions, the hashing function, and the hash nodecomparator.HASH NODESA hash node is a structure used for chaining nodes together in the table.The defined structure HASH_NODE is not complete because it contains no fieldfor the key for referencing, and no place to store data.  The user completesthe hash node by including a HASH_NODE in a structure containing the necessarykey and data fields.  This flexibility allows hash tables to better suitvarying data representations of the key and data fields.  The hashing functionand the hash node comparator determine the full hash node representation.  Referto the defined structures H_NODE_INT and H_NODE_STRING for examples of thegeneral purpose hash nodes used by the hashing functions and hash nodecomparators defined in this library.HASHING FUNCTIONSOne function, called the hashing function, controls the distribution of nodesin the table.  This library provides a number of standard hashing functions,but applications can specify their own.  Desirable properties of a hashingfunction are that they execute quickly, and evenly distribute the nodesthroughout the table.  The worst hashing function imaginable would be:h(k) = 0.  This function would put all nodes in list associated with thezero element in the hash table.  Most hashing functions find their originin random number generators.Hashing functions must return an index between zero and (elements - 1).  Theytake the following form:.CSint hashFuncXXX (elements, pHashNode, keyArg)    int		elements;	/@ number of elements in hash table        @/    HASH_NODE	*pHashNode;	/@ hash node to pass through hash function @/    int		keyArg;		/@ optional argument to hash function      @/.CEHASH NODE COMPARATOR FUNCTIONSThe second function required is a key comparator.  Different hash tables maychoose to compare hash nodes in different ways.  For example, the hash nodecould contain a key which is a pointer to a string, or simply an integer.The comparator compares the hash node on the basis of some criteria, andreturns a boolean as to the nodes equivalence.  Additionally, the keycomparator can use the keyCmpArg for additional information to the comparator.The keyCmpArg is passed from all the hashLib functions which use the thecomparator.  The keyCmpArg is usually not needed except for advancedhash table queurying.symLib is a good example of the utilization of the keyCmpArg parameter.symLib hashes the name of the symbol.  It finds the id based on thename using hashTblFind(), but for the purposes of putting and removingsymbols from the symbol's hash table, an additional comparison restrictionapplies.  Symbols have types, and while symbols of equivalent names can exist,no symbols of equivalent name and type can exist.  So symLib utilizes thekeyCmpArg as a flag to denote the which operation being performed on the hashtable: symbol name matching, or complete symbol name and type matching.Key comparator functions must return a boolean.  They take the following form:.CSint hashKeyCmpXXX (pMatchNode, pHashNode, keyCmpArg)    HASH_NODE	*pMatchNode;	/@ hash node to match                        @/    HASH_NODE	*pHashNode;	/@ hash node in table being compared to      @/    int		keyCmpArg;	/@ parameter passed to hashTblFind (2)       @/.CEHASHING COLLISIONSHashing collisions occur when the hashing function returns the same index whengiven two unique keys.  This is unavoidable in cases where there are more nodesin the hash table then there are elements in the hash table.  In a chainedhash table, collisions are resolved by treating each element of the table asthe head of a linked list.  Nodes are simply added to appropriate listregardless of other nodes already in the list.  The list is not sorted, butnew nodes are added at the head of the list because newer entries are usuallysearched for before older entries.  When nodes are removed or searched for,the list is traversed from the head until a match is found.STRUCTURE.CS   HASH_HEAD 0           HASH_NODE         HASH_NODE   ---------             --------          --------   | head--------------->| next----------->| next---------   |       |             |......|          |......|      |   | tail------          | key  |          | key  |      |   |       |  |          | data |          | data |      v   ---------  |          --------          --------     ---              |                             ^            -              |                             |              -------------------------------   HASH_HEAD 1           HASH_NODE   ---------             --------   | head--------------->| next---------   |       |             |......|      |   | tail------          | key  |      |   |       |  |          | data |      v   ---------  |          --------     ---              |           ^            -              |           |              -------------    ...    ...   HASH_HEAD N   ---------   | head-----------------   |       |             |   | tail---------       |   |       |     |       v   ---------    ---     ---		 -	 -.CECAVEATSHash tables must have a number of elements equal to a power of two.INCLUDE FILE: hashLib.h*/#include "vxWorks.h"#include "errno.h"#include "hashLib.h"#include "string.h"#include "private/classLibP.h"#include "private/objLibP.h"IMPORT int ffsMsb (int bitfield);/* locals */LOCAL OBJ_CLASS hashClass;LOCAL BOOL	hashLibInstalled = FALSE;  /* protect from multiple inits *//* globals */CLASS_ID hashClassId = &hashClass;/********************************************************************************* hashLibInit - initialize hash table library** This routine initializes the hash table package.*/STATUS hashLibInit (void)    {    if (!hashLibInstalled &&(classInit (hashClassId, sizeof (HASH_TBL), 		       	     		OFFSET(HASH_TBL,objCore),		       	     		(FUNCPTR) hashTblCreate, 					(FUNCPTR) hashTblInit,		       	     		(FUNCPTR) hashTblDestroy) == OK))	{	hashLibInstalled = TRUE;	}	    return ((hashLibInstalled) ? OK : ERROR);    }/********************************************************************************* hashTblCreate - create a hash table** This rountine creates a hash table 2^sizeLog2 number of elements.  The hash* table is carved from the system memory pool via malloc (2).  To accomidate* the list structures associated with the table, the actual amout of memory* alocated will be roughly eight times the number of elements requested.* Additionallly, two routines must be specified to dictate the behavior of the* hashing table.  The first routine is the hashing function.** The hashing function's role is to disperse the hash nodes added to the table* as evenly throughout the table as possible.  The hashing function receives as* its parameters; the number of elements in the table, a pointer to the* HASH_NODE structure, and finally the keyArg parameter passed to this* routine.  The keyArg may be used to seed the hashing function.  The hash* function returns an index between 0 and (elements - 1).  Standard hashing* functions are available in this library.** The keyCmpRtn parameter specifies the other function required by the hash* table.  This routine tests for equivalence of two HASH_NODES.  It returns a* boolean, TRUE if the keys match, and FALSE if they differ.  As an example,* a hash node may contain a HASH_NODE followed by a key which is an unsigned* integer identifiers, or a pointer to a string, depending on the application.* Standard hash node comparators are available in this library.** RETURNS: HASH_ID, or NULL if hash table could not be created.** SEE ALSO: hashFuncIterScale(), hashFuncModulo(), hashFuncMultiply()* 	    hashKeyCmp(), hashKeyStrCmp()*/HASH_ID hashTblCreate    (    int         sizeLog2,       /* number of elements in hash table log 2 */    FUNCPTR     keyCmpRtn,      /* function to test keys for equivalence */    FUNCPTR     keyRtn,         /* hashing function to generate hash from key */    int         keyArg          /* argument to hashing function */    )    {    unsigned extra  = (1 << sizeLog2) * sizeof (SL_LIST);    HASH_ID hashId;    SL_LIST *pList;    hashId  = (HASH_ID) objAllocExtra (hashClassId, extra, (void **) &pList);    if (hashId != NULL)	hashTblInit (hashId, pList, sizeLog2, keyCmpRtn, keyRtn, keyArg);    return (hashId);				/* return the hash id */    }/********************************************************************************* hashTblInit - initialize a hash table** This routine initializes a hash table.** RETURNS: OK*/STATUS hashTblInit    (    HASH_TBL    *pHashTbl,      /* pointer to hash table to initialize */    SL_LIST     *pTblMem,       /* pointer to memory of sizeLog2 SL_LISTs */    int         sizeLog2,       /* number of elements in hash table log 2 */    FUNCPTR     keyCmpRtn,      /* function to test keys for equivalence */    FUNCPTR     keyRtn,         /* hashing function to generate hash from key */    int         keyArg          /* argument to hashing function */    )    {    FAST int ix;    pHashTbl->elements	= 1 << sizeLog2;	/* store number of elements */    pHashTbl->keyCmpRtn	= keyCmpRtn;		/* store comparator routine */    pHashTbl->keyRtn	= keyRtn;		/* store hashing function */    pHashTbl->keyArg	= keyArg;		/* store hashing function arg */    pHashTbl->pHashTbl	= pTblMem;    /* initialize all of the linked list heads in the table */    for (ix = 0; ix < pHashTbl->elements; ix++)	sllInit (&pHashTbl->pHashTbl [ix]);    objCoreInit (&pHashTbl->objCore, hashClassId);	/* initialize core */    return (OK);    }/********************************************************************************* hashTblDelete - delete a hash table** This routine deletes the specified hash table and frees the* associated memory.  The hash table is marked as invalid.** RETURNS: OK, or ERROR if hashId is invalid.*/STATUS hashTblDelete    (    HASH_ID hashId              /* id of hash table to delete */    )    {    return (hashTblDestroy (hashId, TRUE));	/* delete the hash table */    }/********************************************************************************* hashTblTerminate - terminate a hash table** This routine terminates the specified hash table.  The hash table is marked* as invalid.** RETURNS: OK, or ERROR if hashId is invalid.*/STATUS hashTblTerminate    (    HASH_ID hashId              /* id of hash table to terminate */    )    {

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
男男视频亚洲欧美| 成人性生交大片免费看中文| 精品久久久久久久久久久久久久久 | 欧美精品日韩一本| 国产一区二区精品久久91| 亚洲成人精品一区| 亚洲欧洲另类国产综合| 欧美成人官网二区| 欧美探花视频资源| 成人av一区二区三区| 激情成人综合网| 日韩成人精品在线| 亚洲一区二区三区三| 亚洲天堂久久久久久久| 国产午夜亚洲精品午夜鲁丝片| 777亚洲妇女| 欧美亚洲国产怡红院影院| 成人丝袜视频网| 精品亚洲成a人| 全国精品久久少妇| 偷拍与自拍一区| 亚洲主播在线播放| 亚洲免费观看高清完整版在线观看| 久久精品亚洲乱码伦伦中文 | 精品对白一区国产伦| 欧美日韩国产123区| 欧美性受极品xxxx喷水| 色综合一区二区三区| 成人av在线资源| 成人免费毛片片v| 成人免费视频一区| 国产999精品久久| 高清不卡在线观看av| 国产一区二区影院| 精品无人码麻豆乱码1区2区| 久草在线在线精品观看| 久久精品国产在热久久| 蜜桃一区二区三区在线观看| 蜜臀久久久久久久| 久久99热这里只有精品| 免费观看久久久4p| 久久99国产精品成人| 久久99精品国产| 国产麻豆精品视频| 国产999精品久久久久久| 成人18精品视频| 91国产福利在线| 欧美午夜电影网| 这里只有精品视频在线观看| 欧美一级爆毛片| 26uuu亚洲综合色欧美| 国产日韩亚洲欧美综合| 国产精品麻豆一区二区| 亚洲精品国产高清久久伦理二区| 一区二区成人在线| 日韩国产在线一| 蜜臀av一区二区三区| 国产伦精品一区二区三区在线观看| 成人一二三区视频| 色av成人天堂桃色av| 欧美日韩高清在线播放| 26uuu色噜噜精品一区| 中文欧美字幕免费| 亚洲一区二区免费视频| 九九九久久久精品| www.亚洲精品| 欧美日韩日日夜夜| 久久色在线视频| 亚洲色图在线看| 日本美女一区二区三区| 成人蜜臀av电影| 欧美精品视频www在线观看 | 亚洲一区二区三区影院| 日韩成人一区二区三区在线观看| 国产在线国偷精品免费看| 99精品国产99久久久久久白柏| 中文字幕成人在线观看| 一区二区三区精密机械公司| 午夜视频一区二区| 懂色av一区二区三区蜜臀| 在线日韩av片| 国产欧美一区二区在线| 亚洲一区二区三区在线| 国产成人久久精品77777最新版本| 91蝌蚪porny九色| 欧美大片在线观看一区| 亚洲男人天堂av网| 精品一区二区三区免费| 欧美自拍偷拍一区| 精品国产91亚洲一区二区三区婷婷| 中文字幕中文字幕在线一区 | 99久久国产免费看| 制服丝袜在线91| 中文字幕一区二区日韩精品绯色| 日韩av高清在线观看| 色婷婷一区二区| 国产拍揄自揄精品视频麻豆| 日韩精品一区第一页| 99综合影院在线| 26uuu成人网一区二区三区| 亚洲国产人成综合网站| av亚洲精华国产精华精华| 日韩女同互慰一区二区| 亚洲综合区在线| 成人性生交大片免费看视频在线 | 这里是久久伊人| 亚洲欧美国产高清| 国产精品自在在线| 日韩美女一区二区三区| 视频一区二区中文字幕| 色综合久久88色综合天天6| 国产欧美日韩综合| 看片的网站亚洲| 欧美精品99久久久**| 一区二区三区四区av| 国产黑丝在线一区二区三区| 欧美一区二区视频网站| 亚洲成av人片一区二区梦乃 | 欧美精品丝袜中出| 一区二区三区在线看| 99精品偷自拍| 中文字幕高清不卡| 成人免费看的视频| 欧美激情一区二区三区| 国产成人8x视频一区二区| 亚洲精品一区二区精华| 久久99热国产| 2欧美一区二区三区在线观看视频| 美国精品在线观看| 日韩一区二区三区电影在线观看| 偷拍亚洲欧洲综合| 欧美一区二区视频在线观看| 免费在线欧美视频| 日韩美女视频在线| 久久国产精品无码网站| 精品粉嫩超白一线天av| 国产一区二区不卡| 欧美国产日本韩| 不卡一二三区首页| 玉米视频成人免费看| 欧美日韩在线直播| 日本亚洲欧美天堂免费| 欧美成人一区二区三区在线观看| 极品销魂美女一区二区三区| 亚洲精品一线二线三线| 成人亚洲一区二区一| 亚洲天堂av一区| 欧美日韩在线一区二区| 美女精品一区二区| 久久久国产精品不卡| www.日韩大片| 一区二区三区**美女毛片| 欧美色图在线观看| 免费欧美日韩国产三级电影| 久久日韩精品一区二区五区| 国产成人精品免费在线| 亚洲欧美日韩国产另类专区| 欧美另类高清zo欧美| 美女视频一区二区| 国产免费观看久久| 色嗨嗨av一区二区三区| 免费成人美女在线观看.| 国产欧美一区二区三区网站| 一本久道久久综合中文字幕| 午夜精品久久久久久久| 久久婷婷国产综合精品青草| 91视频精品在这里| 婷婷丁香久久五月婷婷| 国产欧美精品一区二区色综合| 色综合网色综合| 美女尤物国产一区| 亚洲欧美怡红院| 欧美一区二区三区四区视频| 国产福利电影一区二区三区| 亚洲一区二区成人在线观看| 欧美一区二区三区色| 成人免费视频国产在线观看| 性欧美大战久久久久久久久| 国产日韩精品一区二区浪潮av| 色噜噜狠狠一区二区三区果冻| 日本中文在线一区| 中文字幕一区av| 日韩免费看的电影| 欧洲一区二区三区在线| 国产一区二区三区电影在线观看| 亚洲精品国产无套在线观| 亚洲精品一区二区三区精华液| 在线欧美日韩精品| 国产成人在线观看| 亚洲va韩国va欧美va精品| 国产精品久久久久久久第一福利| 91精品婷婷国产综合久久竹菊| 99久久久久免费精品国产| 美腿丝袜亚洲综合| 亚洲国产精品视频| 国产精品欧美精品| 久久色成人在线| 日韩欧美电影一区| 欧美日韩一卡二卡| 色婷婷久久99综合精品jk白丝|