7 #define CLOADFACTOR 0.25
8 #define CHASH_SIZE 1024
15 typedef struct chashtable {
16 struct chashentry *table;
19 unsigned int numelements;
20 unsigned int capacity;
24 /* Prototypes for hash*/
25 chashtable_t *chashCreate(unsigned int size, float loadfactor);
26 static unsigned int chashFunction(chashtable_t *table, unsigned int key);
27 void chashInsert(chashtable_t *table, unsigned int key, void *val);
28 void *chashSearch(chashtable_t *table, unsigned int key); //returns val, NULL if not found
29 void chashResize(chashtable_t *table, unsigned int newsize);
30 void chashDelete(chashtable_t *table);