Lines Matching defs:bucket

66   HashNode *next;      /* The next hash-table entry in a bucket list */
70 * Each hash-table bucket contains a linked list of entries that
71 * hash to the same bucket.
74 HashNode *head; /* The head of the bucket hash-node list */
87 HashBucket *bucket; /* An array of 'size' hash buckets */
96 static HashNode *_find_HashNode(HashTable *hash, HashBucket *bucket,
253 hash->bucket = NULL;
260 hash->bucket = (HashBucket *) malloc(sizeof(HashBucket) * size);
261 if(!hash->bucket) {
266 * Initialize the bucket array.
269 HashBucket *b = hash->bucket + i;
291 * Clear and delete the bucket array.
293 if(hash->bucket) {
295 free(hash->bucket);
296 hash->bucket = NULL;
343 HashBucket *bucket; /* The hash-bucket associated with the name */
353 * Get the hash bucket of the specified name.
355 bucket = _find_HashBucket(hash, name);
359 node = _find_HashNode(hash, bucket, name, NULL);
378 * Install the node at the head of the hash-bucket list.
380 node->next = bucket->head;
381 bucket->head = node;
382 bucket->count++;
398 HashBucket *bucket = _find_HashBucket(hash, name);
400 HashNode *node = _find_HashNode(hash, bucket, name, &prev);
406 * Remove the node from the bucket list.
411 bucket->head = node->next;
416 bucket->count--;
438 HashBucket *bucket; /* The hash-table bucket associated with name[] */
451 * Hash the name to a hash-table bucket.
453 bucket = _find_HashBucket(hash, name);
455 * Find the bucket entry that exactly matches the name.
457 node = _find_HashNode(hash, bucket, name, NULL);
557 * Private function to locate the hash bucket associated with a given
568 * return HashBucket * The located hash-bucket.
581 return hash->bucket + (h % hash->size);
585 * Search for a given name in the entries of a given bucket.
589 * bucket HashBucket * The bucket to search (use _find_HashBucket()).
600 static HashNode *_find_HashNode(HashTable *hash, HashBucket *bucket,
608 for(last=NULL, node=bucket->head;
684 * Clear the contents of the bucket array.
687 HashBucket *bucket = hash->bucket + i;
689 * Delete the list of active hash nodes from the bucket.
691 HashNode *node = bucket->head;
698 * Mark the bucket as empty.
700 bucket->head = NULL;
701 bucket->count = 0;
733 HashBucket *bucket = hash->bucket + i;
736 * Iterate through the list of symbols that fall into bucket i,
739 for(node=bucket->head; node; node=node->next) {