Lines Matching full:he
116 HashEntry *he; in HashTable_Find() local
124 for (he = t->buckets[h & t->bucketsMask]; he != NULL; he = he->next) { in HashTable_Find()
125 if (he->hash == h && in HashTable_Find()
126 strncmp(he->key, key.start, keyLen) == 0 && in HashTable_Find()
127 he->key[keyLen] == '\0') in HashTable_Find()
131 return he; in HashTable_Find()
160 HashEntry *he = buckets[i]; in HashTable_Done() local
161 while (he != NULL) { in HashTable_Done()
162 HashEntry *next = he->next; in HashTable_Done()
163 free(he); in HashTable_Done()
164 he = next; in HashTable_Done()
187 HashEntry *he = HashTable_FindEntry(t, key); in HashTable_FindValue() local
188 return he != NULL ? he->value : NULL; in HashTable_FindValue()
198 HashEntry *he = HashTable_Find(t, key, h); in HashTable_FindValueBySubstringHash() local
199 return he != NULL ? he->value : NULL; in HashTable_FindValueBySubstringHash()
207 const HashEntry *he = t->buckets[b]; in HashTable_MaxChain() local
208 for (cl = 0; he != NULL; he = he->next) in HashTable_MaxChain()
234 HashEntry *he = oldBuckets[i]; in HashTable_Enlarge() local
235 while (he != NULL) { in HashTable_Enlarge()
236 HashEntry *next = he->next; in HashTable_Enlarge()
237 he->next = newBuckets[he->hash & newMask]; in HashTable_Enlarge()
238 newBuckets[he->hash & newMask] = he; in HashTable_Enlarge()
239 he = next; in HashTable_Enlarge()
261 HashEntry *he = HashTable_Find(t, Substring_Init(key, keyEnd), h); in HashTable_CreateEntry() local
263 if (he != NULL) { in HashTable_CreateEntry()
266 return he; in HashTable_CreateEntry()
272 he = bmake_malloc(sizeof *he + (size_t)(keyEnd - key)); in HashTable_CreateEntry()
273 he->value = NULL; in HashTable_CreateEntry()
274 he->hash = h; in HashTable_CreateEntry()
275 memcpy(he->key, key, (size_t)(keyEnd - key) + 1); in HashTable_CreateEntry()
277 he->next = t->buckets[h & t->bucketsMask]; in HashTable_CreateEntry()
278 t->buckets[h & t->bucketsMask] = he; in HashTable_CreateEntry()
283 return he; in HashTable_CreateEntry()
289 HashEntry *he = HashTable_CreateEntry(t, key, NULL); in HashTable_Set() local
290 HashEntry_Set(he, value); in HashTable_Set()
295 HashTable_DeleteEntry(HashTable *t, HashEntry *he) in HashTable_DeleteEntry() argument
297 HashEntry **ref = &t->buckets[he->hash & t->bucketsMask]; in HashTable_DeleteEntry()
299 for (; *ref != he; ref = &(*ref)->next) in HashTable_DeleteEntry()
301 *ref = he->next; in HashTable_DeleteEntry()
302 free(he); in HashTable_DeleteEntry()
314 HashEntry *he = hi->entry; in HashIter_Next() local
318 if (he != NULL) in HashIter_Next()
319 he = he->next; /* skip the most recently returned entry */ in HashIter_Next()
321 while (he == NULL) { /* find the next nonempty chain */ in HashIter_Next()
324 he = buckets[hi->nextBucket++]; in HashIter_Next()
326 hi->entry = he; in HashIter_Next()