9 void *val; //this can be cast to another type or used to point to a larger structure
14 typedef struct ctable {
15 cnode_t *table; // points to beginning of hash table
18 unsigned int numelements;
20 struct cnode *listhead;
23 /* Prototypes for hash*/
24 ctable_t *cCreate(unsigned int size, float loadfactor);
25 unsigned int cInsert(ctable_t *table, unsigned int key, void * val);
26 void * cSearch(ctable_t *table, unsigned int key); //returns val, NULL if not found
27 unsigned int cRemove(ctable_t *table, unsigned int key); //returns -1 if not found
28 unsigned int cResize(ctable_t *table, unsigned int newsize);
29 void cDelete(ctable_t *table);
30 void crehash(ctable_t *table);