Lines Matching refs:hashtable
124 hash_Reset(hash_tbl *hashtable, hash_freefp free_data) in hash_Reset() argument
129 bucketptr = hashtable->table; in hash_Reset()
130 for (i = 0; i < hashtable->size; i++) { in hash_Reset()
134 hashtable->bucketnum = 0; in hash_Reset()
135 hashtable->member = (hashtable->table)[0]; in hash_Reset()
181 hash_Exists(hash_tbl *hashtable, unsigned int hashcode, hash_cmpfp compare, in hash_Exists() argument
186 memberptr = (hashtable->table)[hashcode % (hashtable->size)]; in hash_Exists()
209 hash_Insert(hash_tbl *hashtable, unsigned int hashcode, hash_cmpfp compare, in hash_Insert() argument
214 hashcode %= hashtable->size; in hash_Insert()
215 if (hash_Exists(hashtable, hashcode, compare, key)) { in hash_Insert()
223 temp->next = (hashtable->table)[hashcode]; in hash_Insert()
224 (hashtable->table)[hashcode] = temp; in hash_Insert()
237 hash_Delete(hash_tbl *hashtable, unsigned int hashcode, hash_cmpfp compare, in hash_Delete() argument
245 hashcode %= hashtable->size; in hash_Delete()
252 memberptr = (hashtable->table)[hashcode]; in hash_Delete()
254 (hashtable->table)[hashcode] = memberptr->next; in hash_Delete()
260 memberptr = (hashtable->table)[hashcode]; in hash_Delete()
299 hash_Lookup(hash_tbl *hashtable, unsigned int hashcode, hash_cmpfp compare, in hash_Lookup() argument
304 memberptr = (hashtable->table)[hashcode % (hashtable->size)]; in hash_Lookup()
321 hash_NextEntry(hash_tbl *hashtable) in hash_NextEntry() argument
329 memberptr = hashtable->member; in hash_NextEntry()
331 hashtable->member = memberptr->next; /* Set up for next call */ in hash_NextEntry()
338 bucket = hashtable->bucketnum + 1; in hash_NextEntry()
339 while ((bucket < hashtable->size) && in hash_NextEntry()
340 !(memberptr = (hashtable->table)[bucket])) { in hash_NextEntry()
347 if (bucket >= hashtable->size) { in hash_NextEntry()
351 hashtable->bucketnum = 0; in hash_NextEntry()
352 hashtable->member = (hashtable->table)[0]; in hash_NextEntry()
361 hashtable->bucketnum = bucket; in hash_NextEntry()
362 hashtable->member = memberptr->next; /* Set up for next call */ in hash_NextEntry()
373 hash_FirstEntry(hash_tbl *hashtable) in hash_FirstEntry() argument
375 hashtable->bucketnum = 0; in hash_FirstEntry()
376 hashtable->member = (hashtable->table)[0]; in hash_FirstEntry()
377 return hash_NextEntry(hashtable); in hash_FirstEntry()