Lines Matching refs:htab
87 hcreate_r(size_t nel, struct hsearch_data *htab) in hcreate_r() argument
93 if (htab->htable != NULL) { in hcreate_r()
114 htab->htablesize = nel; in hcreate_r()
115 htab->htable = malloc(htab->htablesize * sizeof htab->htable[0]); in hcreate_r()
116 if (htab->htable == NULL) { in hcreate_r()
122 for (idx = 0; idx < htab->htablesize; idx++) in hcreate_r()
123 SLIST_INIT(&(htab->htable[idx])); in hcreate_r()
129 hdestroy_r(struct hsearch_data *htab) in hdestroy_r() argument
135 if (htab->htable == NULL) in hdestroy_r()
139 for (idx = 0; idx < htab->htablesize; idx++) { in hdestroy_r()
140 while (!SLIST_EMPTY(&(htab->htable[idx]))) { in hdestroy_r()
141 ie = SLIST_FIRST(&(htab->htable[idx])); in hdestroy_r()
142 SLIST_REMOVE_HEAD(&(htab->htable[idx]), link); in hdestroy_r()
148 free(htab->htable); in hdestroy_r()
149 htab->htable = NULL; in hdestroy_r()
153 hsearch_r(ENTRY item, ACTION action, ENTRY **retval, struct hsearch_data *htab) in hsearch_r() argument
163 head = &(htab->htable[hashval & (htab->htablesize - 1)]); in hsearch_r()