#ifndef HASH_H #define HASH_H #include "q.h" /* $Id: hash.h,v 10.1 92/10/06 23:08:37 ca Exp $ */ /* Header file for a hash table. */ /* This will actually also contain the key and record, but they are variable length & are not shown here. */ typedef struct _Hash_elem { struct _Hash_elem *he_next; /* Pointer for use by queue */ char he_key[1]; /* Start of the key here */ } Hash_elem; typedef queue Hash_bucket; typedef struct _Htable { int ht_size, ht_key_size, ht_rec_size; Hash_bucket *ht_table; /* Next two vars used by ht_iter */ int ht_iter_current_bucket; Hash_elem *ht_iter_next_item; } *Htable; Htable ht_create(); char *ht_find(); char *ht_iter(); #endif /* HASH_H */