Lines Matching defs:table

36    DIV - use the remainder mod table size as a hashing function.
113 typedef struct entry { /* Hash table entry */
124 static NODE **table; /* The address of the hash table */
128 typedef ENTRY TABELEM; /* What the table contains (TABle ELEMents) */
129 static TABELEM *table; /* The address of the hash table */
130 static unsigned int count = 0; /* Number of entries in hash table */
134 static unsigned int length; /* Size of the hash table */
202 * Create a hash table no smaller than size
204 * size: Minimum size for hash table
214 unsize = size; /* +1 for empty table slot; -1 for ceiling */
223 table = (TABELEM *) calloc(length, sizeof(TABELEM));
224 return (table != NULL);
230 free((POINTER) table);
237 /* Hash search of a fixed-capacity table. Open addressing used to
243 * Find or insert the item into the table
264 if(table[i].key == NULL) /* Empty slot? */
266 else if(COMPARE(table[i].key, item.key) == 0) /* Match? */
267 return(&table[i]);
281 if(table[i].key == NULL) /* Empty slot? */
283 else if(COMPARE(table[i].key, item.key) == 0) /* Match? */
284 return(&table[i]);
306 unsigned int curpos; /* Current best table index */
314 cj = HASH2(table[pj].key); /* Secondary branch incr. */
317 if(table[pjk].key == NULL) { /* Improvement found */
325 table[curpos] = table[curj]; /* Old key to new site */
335 count++; /* Increment table occupancy count */
336 table[i] = item; /* Save item */
337 return(&table[i]); /* Address of item is returned */
382 if(table[i] == (NODE*)NULL) { /* List has not yet been begun */
386 return(build(&table[i], (NODE *) NULL, item));
389 q = &table[i];
390 p = table[i];
404 return(build(&table[i], table[i], item));
510 unsigned int i; /* Counts table slots */
521 if(table[i].key == NULL)
525 hsearch(table[i], FIND);
528 *table[i].data, prcnt, table[i].key);
534 if(table[i] == NULL)
538 for(a = table[i]; a != NULL; a = a->next)