#include <stdio.h>#include <stdlib.h>#include <string.h>#include "hash.h"Go to the source code of this file.
Compounds | |
| struct | hash_node_t |
Defines | |
| #define | HASH_LIMIT 0.5 |
Typedefs | |
| typedef hash_node_t | hash_node_t |
Functions | |
| int | hash (const hash_t *tptr, const char *key) |
| VMDEXTERNSTATIC void | hash_init (hash_t *tptr, int buckets) |
| void | rebuild_table (hash_t *tptr) |
| VMDEXTERNSTATIC int | hash_lookup (const hash_t *tptr, const char *key) |
| VMDEXTERNSTATIC int | hash_insert (hash_t *tptr, const char *key, int data) |
| VMDEXTERNSTATIC int | hash_delete (hash_t *tptr, const char *key) |
| VMDEXTERNSTATIC int | hash_entries (hash_t *tptr) |
| VMDEXTERNSTATIC void | hash_destroy (hash_t *tptr) |
| float | alos (hash_t *tptr) |
| VMDEXTERNSTATIC char * | hash_stats (hash_t *tptr) |
|
|
Definition at line 27 of file hash.c. Referenced by hash_insert. |
|
|
hash table node data structure |
|
|
Definition at line 259 of file hash.c. References alos, hash_t::bucket, hash_t::entries, hash_node_t::next, and hash_t::size. Referenced by alos, and hash_stats. |
|
||||||||||||
|
Definition at line 42 of file hash.c. References hash_t::downshift, and hash_t::mask. Referenced by hash_delete, hash_insert, hash_lookup, and rebuild_table. |
|
||||||||||||
|
delete an string from the hash table, given its string name Definition at line 183 of file hash.c. References hash_t::bucket, hash_node_t::data, hash, hash_node_t::key, and hash_node_t::next. |
|
|
destroy the hash table completely, deallocate memory Definition at line 234 of file hash.c. References hash_t::bucket, hash_node_t::next, and hash_t::size. |
|
|
return the number of entries in the has table Definition at line 223 of file hash.c. References hash_t::entries. |
|
||||||||||||
|
initialize hash table for first use Definition at line 63 of file hash.c. References hash_t::bucket, hash_t::downshift, hash_t::entries, hash_t::mask, and hash_t::size. |
|
||||||||||||||||
|
insert a string into the hash table, along with an integer key Definition at line 151 of file hash.c. References hash_t::bucket, hash_node_t::data, hash_t::entries, hash, HASH_LIMIT, hash_lookup, hash_node_t::key, hash_node_t::next, rebuild_table, and hash_t::size. |
|
||||||||||||
|
lookup a string key in the hash table returning its integer key Definition at line 127 of file hash.c. References hash_t::bucket, hash_node_t::data, hash, hash_node_t::key, and hash_node_t::next. |
|
|
print hash table vital stats Definition at line 280 of file hash.c. References alos, hash_t::entries, and hash_t::size. |
|
|
Definition at line 93 of file hash.c. References hash_t::bucket, hash_t::entries, hash, hash_init, hash_node_t::key, hash_node_t::next, and hash_t::size. Referenced by hash_insert. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002