• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/gettext-0.17/gnulib-local/lib/

Lines Matching refs:table

1 /* hash - implement simple hashing table with string based keys.
85 /* Initialize a hash table. INIT_SIZE > 1 is the initial number of available
98 htab->table = XCALLOC (init_size + 1, hash_entry);
106 /* Delete a hash table's contents.
111 free (htab->table);
143 /* Look up a given key in the hash table.
153 hash_entry *table = htab->table;
160 if (table[idx].used)
162 if (table[idx].used == hval && table[idx].keylen == keylen
163 && memcmp (table[idx].key, key, keylen) == 0)
177 if (table[idx].used == hval && table[idx].keylen == keylen
178 && memcmp (table[idx].key, key, keylen) == 0)
181 while (table[idx].used);
187 /* Look up the value of a key in the given table.
193 hash_entry *table = htab->table;
196 if (table[idx].used == 0)
199 *result = table[idx].data;
204 /* Insert the pair (KEY[0..KEYLEN-1], DATA) in the hash table at index IDX.
205 HVAL is the key's hash code. IDX depends on it. The table entry at index
212 hash_entry *table = htab->table;
214 table[idx].used = hval;
215 table[idx].key = key;
216 table[idx].keylen = keylen;
217 table[idx].data = data;
222 table[idx].next = &table[idx];
223 htab->first = &table[idx];
227 table[idx].next = htab->first->next;
228 htab->first->next = &table[idx];
229 htab->first = &table[idx];
236 /* Grow the hash table. */
241 hash_entry *table = htab->table;
247 htab->table = XCALLOC (1 + htab->size, hash_entry);
250 if (table[idx].used)
251 insert_entry_2 (htab, table[idx].key, table[idx].keylen,
252 table[idx].used,
253 lookup (htab, table[idx].key, table[idx].keylen,
254 table[idx].used),
255 table[idx].data);
257 free (table);
261 /* Try to insert the pair (KEY[0..KEYLEN-1], DATA) in the hash table.
262 Return non-NULL (more precisely, the address of the KEY inside the table's
271 hash_entry *table = htab->table;
274 if (table[idx].used)
283 /* Table is filled more than 75%. Resize the table. */
290 /* Insert the pair (KEY[0..KEYLEN-1], DATA) in the hash table.
298 hash_entry *table = htab->table;
301 if (table[idx].used)
304 table[idx].data = data;
313 /* Table is filled more than 75%. Resize the table. */
320 /* Steps *PTR forward to the next used entry in the given hash table. *PTR
323 Return 0 normally, -1 when the whole hash table has been traversed. */
352 /* Steps *PTR forward to the next used entry in the given hash table. *PTR
356 Return 0 normally, -1 when the whole hash table has been traversed. */