Lines Matching defs:hashtable
126 hash_Reset(hash_tbl *hashtable, hash_freefp free_data)
131 bucketptr = hashtable->table;
132 for (i = 0; i < hashtable->size; i++) {
136 hashtable->bucketnum = 0;
137 hashtable->member = (hashtable->table)[0];
151 * adjust the hashcode for the size of each hashtable.
185 hash_Exists(hash_tbl *hashtable, unsigned int hashcode, hash_cmpfp compare,
190 memberptr = (hashtable->table)[hashcode % (hashtable->size)];
214 hash_Insert(hash_tbl *hashtable, unsigned int hashcode, hash_cmpfp compare,
219 hashcode %= hashtable->size;
220 if (hash_Exists(hashtable, hashcode, compare, key)) {
228 temp->next = (hashtable->table)[hashcode];
229 (hashtable->table)[hashcode] = temp;
243 hash_Delete(hash_tbl *hashtable, unsigned int hashcode, hash_cmpfp compare,
251 hashcode %= hashtable->size;
258 memberptr = (hashtable->table)[hashcode];
260 (hashtable->table)[hashcode] = memberptr->next;
266 memberptr = (hashtable->table)[hashcode];
306 hash_Lookup(hash_tbl *hashtable, unsigned int hashcode, hash_cmpfp compare,
311 memberptr = (hashtable->table)[hashcode % (hashtable->size)];
325 * Return the next available entry in the hashtable for a linear search
329 hash_NextEntry(hash_tbl *hashtable)
337 memberptr = hashtable->member;
339 hashtable->member = memberptr->next; /* Set up for next call */
346 bucket = hashtable->bucketnum + 1;
347 while ((bucket < hashtable->size) &&
348 !(memberptr = (hashtable->table)[bucket])) {
355 if (bucket >= hashtable->size) {
359 hashtable->bucketnum = 0;
360 hashtable->member = (hashtable->table)[0];
369 hashtable->bucketnum = bucket;
370 hashtable->member = memberptr->next; /* Set up for next call */
382 hash_FirstEntry(hash_tbl *hashtable)
384 hashtable->bucketnum = 0;
385 hashtable->member = (hashtable->table)[0];
386 return hash_NextEntry(hashtable);