Go to the source code of this file.
Typedefs | |
| typedef hashTable_s * | hashTable |
| typedef unsigned int(* | hashFunctionType )(const void *string) |
| typedef int(* | hashEqualityType )(const void *key1, const void *key2) |
Functions | |
| unsigned int | hashFunctionString (const void *string) |
| Return hash value of a string. | |
| int | hashEqualityString (const void *key1, const void *key2) |
| Compare two hash table entries for equality. | |
| hashTable | htCreate (int numBuckets, int keySize, int freeData, hashFunctionType fn, hashEqualityType eq) |
| Create hash table. | |
| hashTable | htFree (hashTable ht) |
| Destroy hash table. | |
| void | htAddEntry (hashTable ht, const void *key, const void *data) |
| Add item to hash table. | |
| int | htGetEntry (hashTable ht, const void *key, const void ***data, int *dataCount, const void **tableKey) |
| Retrieve item from hash table. | |
| int | htHasEntry (hashTable ht, const void *key) |
| Check for key in hash table. | |
Definition in file rpmhash.h.
|
|
Definition at line 24 of file rpmhash.h. Referenced by htCreate(). |
|
|
Definition at line 19 of file rpmhash.h. Referenced by htCreate(). |
|
|
Definition at line 11 of file rpmhash.h. Referenced by findEntry(), htAddEntry(), htCreate(), htFree(), htGetEntry(), and htHasEntry(). |
|
||||||||||||
|
Compare two hash table entries for equality.
Definition at line 61 of file rpmhash.c. Referenced by fpCacheCreate(). |
|
|
Return hash value of a string.
Definition at line 68 of file rpmhash.c. Referenced by fpCacheCreate(). |
|
||||||||||||||||
|
Add item to hash table.
Definition at line 106 of file rpmhash.c. References hashTable_s::buckets, hashBucket_s::data, hashBucket_s::dataCount, hashTable_s::eq, hashTable_s::fn, hashBucket, hashTable, hashBucket_s::key, hashTable_s::keySize, hashBucket_s::next, hashTable_s::numBuckets, xmalloc(), and xrealloc(). Referenced by doLookup(), and rpmtsRun(). |
|
||||||||||||||||||||||||
|
Create hash table. If keySize > 0, the key is duplicated within the table (which costs memory, but may be useful anyway.
Definition at line 87 of file rpmhash.c. References hashTable_s::buckets, hashTable_s::eq, hashTable_s::fn, hashTable_s::freeData, hashEqualityType, hashFunctionType, hashTable, hashTable_s::keySize, hashTable_s::numBuckets, xcalloc(), and xmalloc(). Referenced by fpCacheCreate(), and rpmtsRun(). |
|
|
Destroy hash table.
Definition at line 139 of file rpmhash.c. References _free(), hashTable_s::buckets, hashBucket_s::data, hashTable_s::freeData, hashBucket, hashTable, hashBucket_s::key, hashTable_s::keySize, hashBucket_s::next, and hashTable_s::numBuckets. Referenced by fpCacheFree(), and rpmtsRun(). |
|
||||||||||||||||||||||||
|
Retrieve item from hash table.
Definition at line 182 of file rpmhash.c. References hashBucket_s::data, hashBucket_s::dataCount, findEntry(), hashBucket, hashTable, and hashBucket_s::key. Referenced by cacheContainsDirectory(), and handleOverlappedFiles(). |
|
||||||||||||
|
Check for key in hash table.
Definition at line 175 of file rpmhash.c. References findEntry(), hashBucket, and hashTable. |
1.3.5