6 #define INLINE inline __attribute__((always_inline))
11 void *val; //this can be cast to another type or used to point to a larger structure
16 typedef struct ctable {
17 cnode_t *table; // points to beginning of hash table
20 unsigned int numelements;
23 struct cnode *listhead;
26 /* Prototypes for hash*/
27 ctable_t *cCreate(unsigned int size, float loadfactor);
28 void cInsert(ctable_t *table, void * key, void * val);
29 void * cSearch(ctable_t *table, void * key); //returns val, NULL if not found
30 unsigned int cRemove(ctable_t *table, void * key); //returns -1 if not found
31 unsigned int cResize(ctable_t *table, unsigned int newsize);
32 void cDelete(ctable_t *table);
33 void crehash(ctable_t *table);