Written and integrated into libwww by John Punin - thanks!
This module is implemented by HTHash.c, and is a part of the W3C Sample Code Library.
This HashTable class implements a simple hash table to keep objects associated with key words.
#ifndef HTHASH_H #define HTHASH_H #include "HTList.h" typedef struct _HTHashtable HTHashtable; struct _HTHashtable { void **table; int count; int size; }; typedef struct _keynode keynode; struct _keynode { char *key; void *object; };
These methods create and deletes a Hash Table
extern HTHashtable * HTHashtable_new (int size); extern BOOL HTHashtable_delete (HTHashtable *me);
extern BOOL HTHashtable_addObject (HTHashtable *me, const char *key , void *newObject);
extern void * HTHashtable_object (HTHashtable * me, const char *key);
extern int HTHashtable_count (HTHashtable *me);
extern HTArray * HTHashtable_keys (HTHashtable *me);
extern void HTHashtable_print (HTHashtable *me);
#endif