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

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

?? fthash.h

?? a very goog book
?? H
字號:
/****************************************************************** * *  fthash.h  - fast dynamic hash tables * *  Copyright 2002 by *  David Turner, Robert Wilhelm, and Werner Lemberg * *  This file is part of the FreeType project, and may only be used, *  modified, and distributed under the terms of the FreeType project *  license, LICENSE.TXT.  By continuing to use, modify, or distribute *  this file you indicate that you have read the license and *  understand and accept it fully. * * *  This header is used to define dynamic hash tables as described *  by the article "Main-Memory Linear Hashing - Some Enhancements *  of Larson's Algorithm" by Mikael Petterson. * *  Basically, linear hashing prevents big "stalls" during *  resizes of the buckets array by only splitting one bucket *  at a time. This ensures excellent response time even when *  the table is frequently resized.. * * *  Note that the use of the FT_Hash type is rather unusual in order *  to be as generic and efficient as possible. See the comments in the *  following definitions for more details. */#ifndef __FT_HASH_H__#define __FT_HASH_H__#include <ft2build.h>#include FT_TYPES_HFT_BEGIN_HEADER /***********************************************************  *  * @type: FT_Hash  *  * @description:  *   handle to a @FT_HashRec structure used to model a  *   dynamic hash table  */  typedef struct FT_HashRec_*      FT_Hash; /***********************************************************  *  * @type: FT_HashNode  *  * @description:  *   handle to a @FT_HashNodeRec structure used to model a  *   single node of a hash table  */  typedef struct FT_HashNodeRec_*  FT_HashNode; /***********************************************************  *  * @type: FT_Hash_CompareFunc  *  * @description:  *   a function used to compare two nodes of the hash table  *  * @input:  *   node1 :: handle to first node  *   node2 :: handle to second node  *  * @return:  *   1 iff the 'keys' in 'node1' and 'node2' are identical.  *   0 otherwise.  */  typedef FT_Int  (*FT_Hash_CompareFunc)( const FT_HashNode  node1,                                          const FT_HashNode  node2 ); /***********************************************************  *  * @struct: FT_HashRec  *  * @description:  *   a structure used to model a dynamic hash table.  *  * @fields:  *   memory       :: memory manager used to allocate  *                   the buckets array and the hash nodes  *  *   buckets      :: array of hash buckets  *  *   node_size    :: size of node in bytes  *   node_compare :: a function used to compare two nodes  *   node_hash    :: a function used to compute the hash  *                   value of a given node  *   p            ::  *   mask         ::  *   slack        ::  *  * @note:  *   'p', 'mask' and 'slack' are control values managed by  *   the hash table. Do not try to interpret them directly.  *  *   You can grab the hash table size by calling  *   '@ft_hash_get_size'.  */  typedef struct FT_HashRec_  {    FT_Memory            memory;    FT_HashNode*         buckets;    FT_UInt              p;    FT_UInt              mask;  /* really maxp-1 */    FT_UInt              slack;    FT_UInt              node_size;    FT_Hash_CompareFunc  node_compare;    FT_Hash_ComputeFunc  node_hash;  } FT_HashRec, *FT_Hash; /***********************************************************  *  * @struct: FT_HashNodeRec  *  * @description:  *   a structure used to model the root fields of a dynamic  *   hash table node.  *  *   it's up to client applications to "sub-class" this  *   structure to add relevant (key,value) definitions  *  * @fields:  *   link :: pointer to next node in bucket's collision list  *   hash :: 32-bit hash value for this node  *  * @note:  *   it's up to client applications to "sub-class" this structure  *   to add relevant (key,value) type definitions. For example,  *   if we want to build a "string -> int" mapping, we could use  *   something like:  *  *   {  *     typedef struct MyNodeRec_  *     {  *       FT_HashNodeRec  hnode;  *       const char*     key;  *       int             value;  *  *     } MyNodeRec, *MyNode;  *   }  *  */  typedef struct FT_HashNodeRec_  {    FT_HashNode  link;    FT_UInt32    hash;  } FT_HashNodeRec; /****************************************************************  *  * @function: ft_hash_init  *  * @description:  *   initialize a dynamic hash table  *  * @input:  *   table   :: handle to target hash table structure  *   compare :: node comparison function  *   memory  :: memory manager handle used to allocate the  *              buckets array within the hash table  *  * @note:  *   the node comparison function should only compare node _keys_  *   and ignore values !! with good hashing computation (which the  *   user must perform itself), the comparison function should be  *   pretty selfom called.  *  *   here is a simple example:  *  *   {  *     static int my_compare( const MyNode  node1,  *                            const MyNode  node2 )  *     {  *       // compare keys of 'node1' and 'node2'  *       return strcmp( node1->key, node2->key );  *     }  *  *     ....  *  *     ft_hash_init( &hash, (FT_Hash_CompareFunc) my_compare, memory );  *     ....  *   }  */  FT_BASE( void )  ft_hash_init( FT_Hash              table,                FT_Hash_CompareFunc  compare,                FT_Memory            memory ); /****************************************************************  *  * @function: ft_hash_lookup  *  * @description:  *   search a hash table to find a node corresponding to a given  *   key.  *  * @input:  *   table   :: handle to target hash table structure  *   keynode :: handle to a reference hash node that will be  *              only used for key comparisons with the table's  *              elements  *  * @return:  *   a pointer-to-hash-node value, which must be used as followed:  *  *   - if '*result' is NULL, the key wasn't found in the hash  *     table. The value of 'result' can be used to add new elements  *     through @ft_hash_add however..  *  *   - if '*result' is not NULL, it's a handle to the first table  *     node that corresponds to the search key. The value of 'result'  *     can be used to remove this element through @ft_hash_remove  *  * @note:  *   here is an example:  *  *   {  *     // maps a string to an integer with a hash table  *     // returns -1 in case of failure  *     //  *     int  my_lookup( FT_Hash      table,  *                     const char*  key )  *     {  *       MyNode*    pnode;  *       MyNodeRec  noderec;  *  *       // set-up key node. It's 'hash' and 'key' fields must  *       // be set correctly.. we ignore 'link' and 'value'  *       //  *       noderec.hnode.hash = strhash( key );  *       noderec.key        = key;  *  *       // perform search - return value  *       //  *       pnode = (MyNode) ft_hash_lookup( table, &noderec );  *       if ( *pnode )  *       {  *         // we found it  *         return (*pnode)->value;  *       }  *       return -1;  *     }  *   }  */  FT_BASE_DEF( FT_HashNode* )  ft_hash_lookup( FT_Hash      table,                  FT_HashNode  keynode ) /****************************************************************  *  * @function: ft_hash_add  *  * @description:  *   add a new node to a dynamic hash table. the user must  *   call @ft_hash_lookup and allocate a new node before calling  *   this function.  *  * @input:  *   table    :: hash table handle  *   pnode    :: pointer-to-hash-node value returned by @ft_hash_lookup  *   new_node :: handle to new hash node. All its fields must be correctly  *               set, including 'hash'.  *  * @note:  *   this function should always be used _after_ a call to @ft_hash_lookup  *   that returns a pointer to a NULL  handle. Here's an example:  *  *   {  *     // sets the value corresponding to a given string key  *     //  *     void  my_set( FT_Hash      table,  *                   const char*  key,  *                   int          value )  *     {  *       MyNode*    pnode;  *       MyNodeRec  noderec;  *       MyNode     node;  *  *       // set-up key node. It's 'hash' and 'key' fields must  *       // be set correctly..  *       noderec.hnode.hash = strhash( key );  *       noderec.key        = key;  *  *       // perform search - return value  *       pnode = (MyNode) ft_hash_lookup( table, &noderec );  *       if ( *pnode )  *       {  *         // we found it, simply replace the value in the node  *         (*pnode)->value = value;  *         return;  *       }  *  *       // allocate a new node - and set it up  *       node = (MyNode) malloc( sizeof(*node) );  *       node->hnode.hash = noderec.hnode.hash;  *       node->key        = key;  *       node->value      = value;  *  *       // add it to the hash table  *       ft_hash_add( table, pnode, node );  *     }  */  FT_BASE( void )  ft_hash_add( FT_Hash       table,               FT_HashNode*  pnode,               FT_HashNode   new_node ); /****************************************************************  *  * @function: ft_hash_remove  *  * @description:  *   try to remove the node corresponding to a given key from  *   a hash table. This must be called after @ft_hash_lookup  *  * @input:  *   table   :: hash table handle  *   pnode   :: pointer-to-hash-node value returned by @ft_hash_lookup  *  * @note:  *   this function doesn't free the node itself !! Here's an example:  *  *   {  *     // sets the value corresponding to a given string key  *     //  *     void  my_remove( FT_Hash      table,  *                      const char*  key )  *     {  *       MyNodeRec  noderec;  *       MyNode     node;  *  *       noderec.hnode.hash = strhash(key);  *       noderec.key        = key;  *       node               = &noderec;  *  *       pnode = ft_hash_lookup( table, &noderec );  *       node  = *pnode;  *       if ( node != NULL )  *       {  *         ft_hash_remove( table, pnode );  *         free( node );  *       }  *     }  *   }  */  FT_BASE( void )  ft_hash_remove( FT_Hash       table,                  FT_HashNode*  pnode ); /****************************************************************  *  * @function: ft_hash_get_size  *  * @description:  *   return the number of elements in a given hash table  *  * @input:  *   table   :: handle to target hash table structure  *  * @return:  *   number of elements. 0 if empty  */  FT_BASE( FT_UInt )  ft_hash_get_size( FT_Hash  table ); /****************************************************************  *  * @functype: FT_Hash_ForeachFunc  *  * @description:  *   a function used to iterate over all elements of a given  *   hash table  *  * @input:  *   node :: handle to target @FT_HashNodeRec node structure  *   data :: optional argument to iteration routine  *  * @also:  @ft_hash_foreach  */  typedef void  (*FT_Hash_ForeachFunc)( const FT_HashNode  node,                                        const FT_Pointer   data ); /****************************************************************  *  * @function: ft_hash_foreach  *  * @description:  *   parse over all elements in a hash table  *  * @input:  *   table        :: handle to target hash table structure  *   foreach_func :: iteration routine called for each element  *   foreach_data :: optional argument to the iteration routine  *  * @note:  *   this function is often used to release all elements from a  *   hash table. See the example given for @ft_hash_done  */  FT_BASE( void )  ft_hash_foreach( FT_Hash              table,                   FT_Hash_ForeachFunc  foreach_func,                   const FT_Pointer     foreach_data ); /****************************************************************  *  * @function: ft_hash_done  *  * @description:  *   finalize a given hash table  *  * @input:  *   table     :: handle to target hash table structure  *   node_func :: optional iteration function pointer. this  *                can be used to destroy all nodes explicitely  *   node_data :: optional argument to the node iterator  *  * @note:  *   this function simply frees the hash table's buckets.  *   you probably will need to call @ft_hash_foreach to  *   destroy all its elements before @ft_hash_done, as in  *   the following example:  *  *   {  *     static void  my_node_clear( const MyNode  node )  *     {  *       free( node );  *     }  *  *     static void  my_done( FT_Hash  table )  *     {  *       ft_hash_done( table, (FT_Hash_ForeachFunc) my_node_clear, NULL );  *     }  *   }  */  FT_BASE( void )  ft_hash_done( FT_Hash              table,                FT_Hash_ForeachFunc  item_func,                const FT_Pointer     item_data ); /* */ /* compute bucket index from hash value in a dynamic hash table */ /* this is only used to break encapsulation to speed lookups in */ /* the FreeType cache manager !!                                */ /*                                                              */#define  FT_HASH_COMPUTE_INDEX(_table,_hash,_index)                  \             {                                                       \               FT_UInt  _mask  = (_table)->mask;                     \               FT_UInt  _hash0 = (_hash);                            \                                                                     \               (_index) = (FT_UInt)( (_hash0) & _mask ) );           \               if ( (_index) < (_table)->p )                         \                 (_index) = (FT_uInt)( (_hash0) & ( 2*_mask+1 ) );   \             }FT_END_HEADER#endif /* __FT_HASH_H__ */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧洲日产国码二区| 欧美美女激情18p| 国产精品素人视频| 成人禁用看黄a在线| 国产精品丝袜一区| 99热在这里有精品免费| 亚洲精品精品亚洲| 精品视频一区三区九区| 日本成人在线看| 欧美精品一区二区三| 成人在线综合网站| 亚洲国产毛片aaaaa无费看| 欧美精品一级二级| 久久精品国产澳门| 国产精品三级电影| 欧美色图在线观看| 国产一区二区精品久久91| 亚洲欧洲国产日本综合| 欧美在线高清视频| 久久99久国产精品黄毛片色诱| 国产精品日韩成人| 欧美军同video69gay| 国产一区91精品张津瑜| 一区二区三区四区蜜桃| 欧美一区二区三区白人| 成人性生交大片| 天天综合天天做天天综合| 久久久久久麻豆| 在线观看免费视频综合| 国精产品一区一区三区mba视频| 国产精品国产三级国产aⅴ原创| 欧美日产国产精品| 国产成人av网站| 日韩高清不卡一区| 国产精品国产三级国产aⅴ无密码| 在线不卡免费欧美| 成人永久aaa| 蜜臀av一区二区在线免费观看| 亚洲欧洲综合另类在线| 久久品道一品道久久精品| 欧美日韩一区二区三区视频| 成人妖精视频yjsp地址| 美女视频黄免费的久久| 亚洲欧美激情一区二区| 国产日韩av一区| 日韩三级视频中文字幕| 在线免费亚洲电影| www.在线欧美| 国产麻豆成人精品| 秋霞午夜av一区二区三区| 一区二区三区不卡视频在线观看| 欧美国产欧美综合| 久久嫩草精品久久久久| 欧美一区二区三区免费| 欧美日韩一级视频| 欧洲视频一区二区| 99久久精品99国产精品 | 中文字幕视频一区二区三区久| 欧美电视剧免费全集观看| 国产精品99久久久久久久女警| 午夜成人免费电影| 中文字幕的久久| 日韩欧美一二区| 精品视频一区 二区 三区| 9i在线看片成人免费| 国产精品一品视频| 国产一区二区精品在线观看| 久久国产精品区| 日韩一区欧美二区| 亚洲成人在线免费| 性做久久久久久免费观看| 一区二区三区国产豹纹内裤在线| 亚洲视频在线一区二区| 亚洲欧洲日韩综合一区二区| 欧美国产欧美亚州国产日韩mv天天看完整| 久久综合色婷婷| 久久综合久久鬼色中文字| 精品久久人人做人人爰| 亚洲精品一线二线三线无人区| 精品精品欲导航| 精品国产乱码久久久久久老虎| 亚洲精品一区在线观看| 国产色一区二区| 国产精品丝袜久久久久久app| 亚洲欧洲另类国产综合| 亚洲欧美另类小说视频| 亚洲国产综合人成综合网站| 亚洲18色成人| 国产在线看一区| 国产91精品露脸国语对白| www.爱久久.com| 一本久道中文字幕精品亚洲嫩| 91成人网在线| 制服丝袜一区二区三区| 久久久久国色av免费看影院| 国产精品久久久久桃色tv| 亚洲黄色性网站| 日韩黄色片在线观看| 国产一区激情在线| 成人av小说网| 欧美日本一区二区在线观看| 欧美一区二区三区视频免费| 精品久久人人做人人爽| **欧美大码日韩| 日韩成人午夜精品| 国产999精品久久| 在线观看免费成人| 精品国产髙清在线看国产毛片| 亚洲国产精品99久久久久久久久 | 日韩三级视频在线观看| 久久综合给合久久狠狠狠97色69| 日本一区二区成人| 亚洲一二三四区| 国产伦精品一区二区三区视频青涩| 91丝袜美女网| 欧美成人精品3d动漫h| 国产精品国产馆在线真实露脸| 亚洲成av人**亚洲成av**| 国产高清在线精品| 欧美日韩高清在线播放| 中文一区二区在线观看| 日韩精品一卡二卡三卡四卡无卡| 国产精品自拍一区| 在线电影欧美成精品| 亚洲婷婷综合久久一本伊一区 | 日日夜夜免费精品| 粉嫩aⅴ一区二区三区四区五区| 欧美日韩一区 二区 三区 久久精品| 久久久777精品电影网影网| 亚洲国产日产av| 国产成人aaaa| 精品伦理精品一区| 日韩专区欧美专区| 色婷婷精品大在线视频| 国产欧美日韩精品a在线观看| 婷婷综合五月天| 91福利社在线观看| 国产精品福利一区| 国产美女精品在线| 欧美一区二区三区小说| 亚洲国产精品欧美一二99| 懂色av一区二区三区蜜臀| 欧美一区二区视频在线观看2022| 樱桃视频在线观看一区| av中文字幕亚洲| 久久婷婷色综合| 奇米一区二区三区| 欧美日本在线看| 亚洲成在人线免费| 欧美日韩在线三级| 亚洲国产成人精品视频| 色婷婷精品久久二区二区蜜臀av| 国产日韩av一区二区| 国产精品资源在线看| 精品久久99ma| 国产美女精品人人做人人爽| 亚洲精品一区二区三区四区高清| 日本不卡视频在线| 欧美精品三级在线观看| 亚洲综合图片区| 91麻豆6部合集magnet| 成人欧美一区二区三区白人| 国产ts人妖一区二区| 久久精品男人的天堂| 国产激情精品久久久第一区二区| 精品日韩在线观看| 国产美女一区二区| 久久精品人人做人人综合| 国产精品88av| 中文字幕免费不卡| av在线播放成人| 中文字幕人成不卡一区| 91黄视频在线观看| 亚洲国产乱码最新视频| 欧美精品色综合| 麻豆久久久久久久| 久久伊人中文字幕| 国产大陆精品国产| 中文字幕亚洲在| 欧美日韩中文国产| 欧美bbbbb| 久久久亚洲欧洲日产国码αv| 国产91丝袜在线观看| 亚洲视频在线一区| 欧美福利电影网| 激情亚洲综合在线| 国产精品女同一区二区三区| 91在线视频播放地址| 亚洲成人av电影在线| 欧美草草影院在线视频| 成人一级黄色片| 亚洲午夜在线观看视频在线| 日韩一区国产二区欧美三区| 极品美女销魂一区二区三区| 国产精品欧美极品| 欧美日韩国产精选| 国产精品系列在线播放| 亚洲精品写真福利| 精品美女一区二区| 一本色道久久综合亚洲aⅴ蜜桃|