#include <stdio.h>#include <stdlib.h>#include <string.h>#include "inthash.h"Go to the source code of this file.
Compounds | |
| struct | inthash_node_t |
Defines | |
| #define | HASH_LIMIT 0.5 |
Typedefs | |
| typedef inthash_node_t | inthash_node_t |
Functions | |
| int | inthash (const inthash_t *tptr, int key) |
| VMDEXTERNSTATIC void | inthash_init (inthash_t *tptr, int buckets) |
| void | rebuild_table (inthash_t *tptr) |
| VMDEXTERNSTATIC int | inthash_lookup (const inthash_t *tptr, int key) |
| VMDEXTERNSTATIC int | inthash_insert (inthash_t *tptr, int key, int data) |
| VMDEXTERNSTATIC int | inthash_delete (inthash_t *tptr, int key) |
| VMDEXTERNSTATIC void | inthash_destroy (inthash_t *tptr) |
| float | alos (inthash_t *tptr) |
| VMDEXTERNSTATIC char * | inthash_stats (inthash_t *tptr) |
|
|
Definition at line 27 of file inthash.c. Referenced by inthash_insert. |
|
|
hash table node data structure |
|
|
Definition at line 245 of file inthash.c. References alos, inthash_t::bucket, inthash_t::entries, inthash_node_t::next, NULL, and inthash_t::size. Referenced by alos, and inthash_stats. |
|
||||||||||||
|
Definition at line 42 of file inthash.c. References inthash_t::downshift, and inthash_t::mask. Referenced by inthash_delete, inthash_insert, inthash_lookup, and rebuild_table. |
|
||||||||||||
|
delete an string from the hash table, given its string name Definition at line 179 of file inthash.c. References inthash_t::bucket, inthash_node_t::data, data, inthash, inthash_node_t::key, inthash_node_t::next, and NULL. |
|
|
destroy the hash table completely, deallocate memory Definition at line 220 of file inthash.c. References inthash_t::bucket, inthash_node_t::next, NULL, and inthash_t::size. |
|
||||||||||||
|
initialize hash table for first use Definition at line 59 of file inthash.c. References inthash_t::bucket, inthash_t::downshift, inthash_t::entries, inthash_t::mask, and inthash_t::size. |
|
||||||||||||||||
|
insert a string into the hash table, along with an integer key Definition at line 147 of file inthash.c. References inthash_t::bucket, inthash_node_t::data, data, inthash_t::entries, HASH_LIMIT, inthash, inthash_lookup, inthash_node_t::key, inthash_node_t::next, rebuild_table, and inthash_t::size. |
|
||||||||||||
|
lookup a string key in the hash table returning its integer key Definition at line 123 of file inthash.c. References inthash_t::bucket, inthash_node_t::data, inthash, inthash_node_t::key, inthash_node_t::next, and NULL. |
|
|
print hash table vital stats Definition at line 266 of file inthash.c. References alos, inthash_t::entries, and inthash_t::size. |
|
|
Definition at line 89 of file inthash.c. References inthash_t::bucket, inthash_t::entries, inthash, inthash_init, inthash_node_t::key, inthash_node_t::next, and inthash_t::size. Referenced by hash_insert, and inthash_insert. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002