Lines Matching refs:cur
48 hashtab_ptr_t prev, cur, newnode; in hashtab_insert() local
55 cur = h->htable[hvalue]; in hashtab_insert()
56 while (cur && h->keycmp(h, key, cur->key) > 0) { in hashtab_insert()
57 prev = cur; in hashtab_insert()
58 cur = cur->next; in hashtab_insert()
61 if (cur && (h->keycmp(h, key, cur->key) == 0)) in hashtab_insert()
87 hashtab_ptr_t cur, last; in hashtab_remove() local
94 cur = h->htable[hvalue]; in hashtab_remove()
95 while (cur != NULL && h->keycmp(h, key, cur->key) > 0) { in hashtab_remove()
96 last = cur; in hashtab_remove()
97 cur = cur->next; in hashtab_remove()
100 if (cur == NULL || (h->keycmp(h, key, cur->key) != 0)) in hashtab_remove()
104 h->htable[hvalue] = cur->next; in hashtab_remove()
106 last->next = cur->next; in hashtab_remove()
109 destroy(cur->key, cur->datum, args); in hashtab_remove()
110 free(cur); in hashtab_remove()
120 hashtab_ptr_t prev, cur, newnode; in hashtab_replace() local
127 cur = h->htable[hvalue]; in hashtab_replace()
128 while (cur != NULL && h->keycmp(h, key, cur->key) > 0) { in hashtab_replace()
129 prev = cur; in hashtab_replace()
130 cur = cur->next; in hashtab_replace()
133 if (cur && (h->keycmp(h, key, cur->key) == 0)) { in hashtab_replace()
135 destroy(cur->key, cur->datum, args); in hashtab_replace()
136 cur->key = key; in hashtab_replace()
137 cur->datum = datum; in hashtab_replace()
161 hashtab_ptr_t cur; in hashtab_search() local
167 cur = h->htable[hvalue]; in hashtab_search()
168 while (cur != NULL && h->keycmp(h, key, cur->key) > 0) in hashtab_search()
169 cur = cur->next; in hashtab_search()
171 if (cur == NULL || (h->keycmp(h, key, cur->key) != 0)) in hashtab_search()
174 return cur->datum; in hashtab_search()
180 hashtab_ptr_t cur, temp; in hashtab_destroy() local
186 cur = h->htable[i]; in hashtab_destroy()
187 while (cur != NULL) { in hashtab_destroy()
188 temp = cur; in hashtab_destroy()
189 cur = cur->next; in hashtab_destroy()
206 hashtab_ptr_t cur; in hashtab_map() local
212 cur = h->htable[i]; in hashtab_map()
213 while (cur != NULL) { in hashtab_map()
214 ret = apply(cur->key, cur->datum, args); in hashtab_map()
217 cur = cur->next; in hashtab_map()
233 hashtab_ptr_t last, cur, temp; in hashtab_map_remove_on_error() local
240 cur = h->htable[i]; in hashtab_map_remove_on_error()
241 while (cur != NULL) { in hashtab_map_remove_on_error()
242 ret = apply(cur->key, cur->datum, args); in hashtab_map_remove_on_error()
245 last->next = cur->next; in hashtab_map_remove_on_error()
247 h->htable[i] = cur->next; in hashtab_map_remove_on_error()
250 temp = cur; in hashtab_map_remove_on_error()
251 cur = cur->next; in hashtab_map_remove_on_error()
257 last = cur; in hashtab_map_remove_on_error()
258 cur = cur->next; in hashtab_map_remove_on_error()
270 hashtab_ptr_t cur; in hashtab_hash_eval() local
275 cur = h->htable[i]; in hashtab_hash_eval()
276 if (cur) { in hashtab_hash_eval()
279 while (cur) { in hashtab_hash_eval()
281 cur = cur->next; in hashtab_hash_eval()