Lines Matching full:bucket

64   HashNode *next;      /* The next hash-table entry in a bucket list */
68 * Each hash-table bucket contains a linked list of entries that
69 * hash to the same bucket.
72 HashNode *head; /* The head of the bucket hash-node list */
85 HashBucket *bucket; /* An array of 'size' hash buckets */ member
94 static HashNode *_find_HashNode(HashTable *hash, HashBucket *bucket,
251 hash->bucket = NULL; in _new_HashTable()
258 hash->bucket = (HashBucket *) malloc(sizeof(HashBucket) * size); in _new_HashTable()
259 if(!hash->bucket) { in _new_HashTable()
264 * Initialize the bucket array. in _new_HashTable()
267 HashBucket *b = hash->bucket + i; in _new_HashTable()
289 * Clear and delete the bucket array. in _del_HashTable()
291 if(hash->bucket) { in _del_HashTable()
293 free(hash->bucket); in _del_HashTable()
294 hash->bucket = NULL; in _del_HashTable()
341 HashBucket *bucket; /* The hash-bucket associated with the name */ in _new_HashSymbol() local
351 * Get the hash bucket of the specified name. in _new_HashSymbol()
353 bucket = _find_HashBucket(hash, name); in _new_HashSymbol()
357 node = _find_HashNode(hash, bucket, name, NULL); in _new_HashSymbol()
376 * Install the node at the head of the hash-bucket list. in _new_HashSymbol()
378 node->next = bucket->head; in _new_HashSymbol()
379 bucket->head = node; in _new_HashSymbol()
380 bucket->count++; in _new_HashSymbol()
396 HashBucket *bucket = _find_HashBucket(hash, name); in _del_HashSymbol() local
398 HashNode *node = _find_HashNode(hash, bucket, name, &prev); in _del_HashSymbol()
404 * Remove the node from the bucket list. in _del_HashSymbol()
409 bucket->head = node->next; in _del_HashSymbol()
414 bucket->count--; in _del_HashSymbol()
436 HashBucket *bucket; /* The hash-table bucket associated with name[] */ in _find_HashSymbol() local
449 * Hash the name to a hash-table bucket. in _find_HashSymbol()
451 bucket = _find_HashBucket(hash, name); in _find_HashSymbol()
453 * Find the bucket entry that exactly matches the name. in _find_HashSymbol()
455 node = _find_HashNode(hash, bucket, name, NULL); in _find_HashSymbol()
555 * Private function to locate the hash bucket associated with a given
566 * return HashBucket * The located hash-bucket.
579 return hash->bucket + (h % hash->size); in _find_HashBucket()
583 * Search for a given name in the entries of a given bucket.
587 * bucket HashBucket * The bucket to search (use _find_HashBucket()).
598 static HashNode *_find_HashNode(HashTable *hash, HashBucket *bucket, in _find_HashNode() argument
606 for(last=NULL, node=bucket->head; in _find_HashNode()
682 * Clear the contents of the bucket array. in _clear_HashTable()
685 HashBucket *bucket = hash->bucket + i; in _clear_HashTable() local
687 * Delete the list of active hash nodes from the bucket. in _clear_HashTable()
689 HashNode *node = bucket->head; in _clear_HashTable()
696 * Mark the bucket as empty. in _clear_HashTable()
698 bucket->head = NULL; in _clear_HashTable()
699 bucket->count = 0; in _clear_HashTable()
731 HashBucket *bucket = hash->bucket + i; in _scan_HashTable() local
734 * Iterate through the list of symbols that fall into bucket i, in _scan_HashTable()
737 for(node=bucket->head; node; node=node->next) { in _scan_HashTable()