2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2000.
3 ** See ../LICENSE for license information.
13 /*@constant int HBUCKET_BASESIZE; @*/
14 # define HBUCKET_BASESIZE 2
16 /*@constant int HBUCKET_DNE; @*/
17 # define HBUCKET_DNE NOT_FOUND
19 typedef struct _hashTable *hashTable ;
21 typedef struct _hentry
23 /*@dependent@*/ cstring key;
27 typedef /*@null@*/ struct _hbucket
31 /*@only@*/ hentry *entries;
34 typedef /*@only@*/ hbucket o_hbucket;
40 /*@only@*/ o_hbucket *buckets;
44 extern /*@only@*/ hashTable hashTable_create(int p_size);
45 extern void hashTable_insert (hashTable p_h, cstring p_key, int p_value);
46 extern int hashTable_lookup (hashTable p_h, cstring p_key);
47 extern /*@unused@*/ /*@only@*/ cstring hashTable_stats(hashTable p_h);
48 extern void hashTable_free (/*@only@*/ hashTable p_h);
49 extern void hashTable_remove (hashTable p_h, cstring p_key) /*@modifies p_h@*/ ;
51 hashTable_replaceKey (hashTable p_h, cstring p_oldkey, /*@dependent@*/ cstring p_newkey);
54 # error "Multiple include"