Lines Matching defs:table

34  *  DIV - use the remainder mod table size as a hashing function.
122 static NODE **table; /* The address of the hash table */
126 typedef ENTRY TABELEM; /* What the table contains (TABle ELEMents) */
127 static TABELEM *table; /* The address of the hash table */
128 static unsigned int count = 0; /* Number of entries in hash table */
132 static unsigned int length; /* Size of the hash table */
197 printf("Do you wish to start another hash table (yes/no?)");
206 hcreate(size_t size) /* Create a hash table no smaller than size */
207 /* Minimum "size" for hash table */
218 unsize = size; /* +1 for empty table slot; -1 for ceiling */
219 local_length = 1; /* Maximum entries in table */
230 old_table = table;
231 table = local_table;
250 if (table[i] != (NODE *)NULL) {
251 p = table[i];
264 local_table = (POINTER)table;
265 table = 0;
275 * Hash search of a fixed-capacity table. Open addressing used to
280 /* Find or insert the item into the table */
300 if (table[i].key == NULL) /* Empty slot? */
302 else if (COMPARE(table[i].key, item.key) == 0) /* Match? */
303 RETURN(&table[i]);
317 if (table[i].key == NULL) /* Empty slot? */
319 else if (COMPARE(table[i].key, item.key) == 0) /* Match? */
320 RETURN(&table[i])
344 unsigned int curpos; /* Current best table index */
352 cj = HASH2(table[pj].key); /* Secondary branch incr. */
357 if (table[pjk].key == NULL) {
367 table[curpos] = table[curj]; /* Old key to new site */
377 count++; /* Increment table occupancy count */
378 table[i] = item; /* Save item */
381 return (&table[i]); /* Address of item is returned */
425 if (table[i] == (NODE*)NULL) { /* List has not yet been begun */
429 RETURN(build(&table[i], (NODE *) NULL, item));
431 q = &table[i];
432 p = table[i];
446 RETURN(build(&table[i], table[i], item));
536 unsigned int i; /* Counts table slots */
547 if (table[i].key == NULL)
553 hsearch(table[i], FIND);
556 *table[i].data, prcnt, table[i].key);
562 if (table[i] == NULL)
566 for (a = table[i]; a != NULL; a = a->next)