• Home
  • Raw
  • Download

Lines Matching refs:cur

69 	hashtab_ptr_t prev, cur, newnode;  in hashtab_insert()  local
76 cur = h->htable[hvalue]; in hashtab_insert()
77 while (cur && h->keycmp(h, key, cur->key) > 0) { in hashtab_insert()
78 prev = cur; in hashtab_insert()
79 cur = cur->next; in hashtab_insert()
82 if (cur && (h->keycmp(h, key, cur->key) == 0)) in hashtab_insert()
108 hashtab_ptr_t cur, last; in hashtab_remove() local
115 cur = h->htable[hvalue]; in hashtab_remove()
116 while (cur != NULL && h->keycmp(h, key, cur->key) > 0) { in hashtab_remove()
117 last = cur; in hashtab_remove()
118 cur = cur->next; in hashtab_remove()
121 if (cur == NULL || (h->keycmp(h, key, cur->key) != 0)) in hashtab_remove()
125 h->htable[hvalue] = cur->next; in hashtab_remove()
127 last->next = cur->next; in hashtab_remove()
130 destroy(cur->key, cur->datum, args); in hashtab_remove()
131 free(cur); in hashtab_remove()
141 hashtab_ptr_t prev, cur, newnode; in hashtab_replace() local
148 cur = h->htable[hvalue]; in hashtab_replace()
149 while (cur != NULL && h->keycmp(h, key, cur->key) > 0) { in hashtab_replace()
150 prev = cur; in hashtab_replace()
151 cur = cur->next; in hashtab_replace()
154 if (cur && (h->keycmp(h, key, cur->key) == 0)) { in hashtab_replace()
156 destroy(cur->key, cur->datum, args); in hashtab_replace()
157 cur->key = key; in hashtab_replace()
158 cur->datum = datum; in hashtab_replace()
182 hashtab_ptr_t cur; in hashtab_search() local
188 cur = h->htable[hvalue]; in hashtab_search()
189 while (cur != NULL && h->keycmp(h, key, cur->key) > 0) in hashtab_search()
190 cur = cur->next; in hashtab_search()
192 if (cur == NULL || (h->keycmp(h, key, cur->key) != 0)) in hashtab_search()
195 return cur->datum; in hashtab_search()
201 hashtab_ptr_t cur, temp; in hashtab_destroy() local
207 cur = h->htable[i]; in hashtab_destroy()
208 while (cur != NULL) { in hashtab_destroy()
209 temp = cur; in hashtab_destroy()
210 cur = cur->next; in hashtab_destroy()
227 hashtab_ptr_t cur; in hashtab_map() local
233 cur = h->htable[i]; in hashtab_map()
234 while (cur != NULL) { in hashtab_map()
235 ret = apply(cur->key, cur->datum, args); in hashtab_map()
238 cur = cur->next; in hashtab_map()
254 hashtab_ptr_t last, cur, temp; in hashtab_map_remove_on_error() local
261 cur = h->htable[i]; in hashtab_map_remove_on_error()
262 while (cur != NULL) { in hashtab_map_remove_on_error()
263 ret = apply(cur->key, cur->datum, args); in hashtab_map_remove_on_error()
266 last->next = cur->next; in hashtab_map_remove_on_error()
268 h->htable[i] = cur->next; in hashtab_map_remove_on_error()
271 temp = cur; in hashtab_map_remove_on_error()
272 cur = cur->next; in hashtab_map_remove_on_error()
278 last = cur; in hashtab_map_remove_on_error()
279 cur = cur->next; in hashtab_map_remove_on_error()
291 hashtab_ptr_t cur; in hashtab_hash_eval() local
296 cur = h->htable[i]; in hashtab_hash_eval()
297 if (cur) { in hashtab_hash_eval()
300 while (cur) { in hashtab_hash_eval()
302 cur = cur->next; in hashtab_hash_eval()