9 #define CEIL(VARIABLE) ( ((VARIABLE) - (unsigned int)(VARIABLE))==0 ? (unsigned int)(VARIABLE) : (unsigned int) (VARIABLE)+1 )
18 769, 1543, 3079, 6151,
19 12289, 24593, 49157, 98317,
20 196613, 393241, 786433, 1572869,
21 3145739, 6291469, 12582917, 25165843,
22 50331653, 100663319, 201326611, 402653189,
30 char* tmp = (
char*) str.
str;
36 hash = ((hash << 5) + hash) + (*tmp);
49 unsigned int pindex, size = primes[0];
54 if (primes[pindex] >= minsize) { size = primes[pindex];
break; }
60 memset(h->
table, 0, size *
sizeof(
struct entry *));
87 static int hashtable_expand(
struct hashtable *h)
90 struct entry **newtable;
93 unsigned int newsize, i, index;
101 memset(newtable, 0, newsize *
sizeof(
struct entry *));
108 e->
next = newtable[index];
123 for (pE = &(newtable[i]), e = *pE; e !=
NULL; e = *pE) {
132 e->
next = newtable[index];
180 hashvalue = h->
hashfn(key);
204 hashvalue = h->
hashfn(key);
206 pE = &(h->
table[index]);