Lines Matching refs:hashtable

119 hash_Reset(hash_tbl *hashtable, hash_freefp free_data)  in hash_Reset()  argument
124 bucketptr = hashtable->table; in hash_Reset()
125 for (i = 0; i < hashtable->size; i++) { in hash_Reset()
129 hashtable->bucketnum = 0; in hash_Reset()
130 hashtable->member = (hashtable->table)[0]; in hash_Reset()
176 hash_Exists(hash_tbl *hashtable, unsigned hashcode, hash_cmpfp compare, in hash_Exists() argument
181 memberptr = (hashtable->table)[hashcode % (hashtable->size)]; in hash_Exists()
204 hash_Insert(hash_tbl *hashtable, unsigned hashcode, hash_cmpfp compare, in hash_Insert() argument
209 hashcode %= hashtable->size; in hash_Insert()
210 if (hash_Exists(hashtable, hashcode, compare, key)) { in hash_Insert()
218 temp->next = (hashtable->table)[hashcode]; in hash_Insert()
219 (hashtable->table)[hashcode] = temp; in hash_Insert()
232 hash_Delete(hash_tbl *hashtable, unsigned hashcode, hash_cmpfp compare, in hash_Delete() argument
240 hashcode %= hashtable->size; in hash_Delete()
247 memberptr = (hashtable->table)[hashcode]; in hash_Delete()
249 (hashtable->table)[hashcode] = memberptr->next; in hash_Delete()
255 memberptr = (hashtable->table)[hashcode]; in hash_Delete()
294 hash_Lookup(hash_tbl *hashtable, unsigned hashcode, hash_cmpfp compare, in hash_Lookup() argument
299 memberptr = (hashtable->table)[hashcode % (hashtable->size)]; in hash_Lookup()
316 hash_NextEntry(hash_tbl *hashtable) in hash_NextEntry() argument
324 memberptr = hashtable->member; in hash_NextEntry()
326 hashtable->member = memberptr->next; /* Set up for next call */ in hash_NextEntry()
333 bucket = hashtable->bucketnum + 1; in hash_NextEntry()
334 while ((bucket < hashtable->size) && in hash_NextEntry()
335 !(memberptr = (hashtable->table)[bucket])) { in hash_NextEntry()
342 if (bucket >= hashtable->size) { in hash_NextEntry()
346 hashtable->bucketnum = 0; in hash_NextEntry()
347 hashtable->member = (hashtable->table)[0]; in hash_NextEntry()
356 hashtable->bucketnum = bucket; in hash_NextEntry()
357 hashtable->member = memberptr->next; /* Set up for next call */ in hash_NextEntry()
368 hash_FirstEntry(hash_tbl *hashtable) in hash_FirstEntry() argument
370 hashtable->bucketnum = 0; in hash_FirstEntry()
371 hashtable->member = (hashtable->table)[0]; in hash_FirstEntry()
372 return hash_NextEntry(hashtable); in hash_FirstEntry()