#include "jam.h"
#include "hash.h"
Data Structures | |
| struct | hashhdr |
| struct | hashdata |
| struct | item |
| struct | hash |
| struct | hash::tab_s |
| struct | hash::items_s |
Defines | |
| #define | MAX_LISTS 32 |
| #define | ALIGNED(x) ( ( x + sizeof( item_t ) - 1 ) & ~( sizeof( item_t ) - 1 ) ) |
Typedefs | |
| typedef item | item_t |
Functions | |
| static void | hash_rehash (struct hash *hp) |
| static void | hash_stat (struct hash *hp) |
| int | hash_item (register struct hash *hp, HASHDATA **data, int enter) |
| static void | hash_rehash (register struct hash *hp) |
| hash * | hash_init (int datalen, const char *name) |
| void | hash_done (struct hash *hp) |
External routines:
hash_init() - initialize a hash table, returning a handle.
hash_item() - find a record in the table, and optionally enter a new one.
hash_done() - free a hash table, given its handle.
Internal routines:
hash_rehash() - resize and rebuild hp->tab, the hash table
| #define MAX_LISTS 32 |
Maximum LISTS hold in ...
| void hash_done | ( | struct hash * | hp | ) |
free a hash table, given its handle.
| struct hash* hash_init | ( | int | datalen, | |
| const char * | name | |||
| ) |
initialize a hash table, returning a handle
| [in] | datalen | Length of records in this table |
| [in] | name | Name printed by hash_stat. |
find a record in the table, and optionally enter a new one.
| static void hash_rehash | ( | register struct hash * | hp | ) | [static] |
resize and rebuild hp->tab, the hash table.
| static void hash_rehash | ( | struct hash * | hp | ) | [static] |
| static void hash_stat | ( | struct hash * | hp | ) | [static] |
print hash statistics.
1.4.7