• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/gettext-0.17/gettext-tools/libgettextpo/

Lines Matching defs:htab

89 hash_init (hash_table *htab, unsigned long int init_size)
95 htab->size = init_size;
96 htab->filled = 0;
97 htab->first = NULL;
98 htab->table = XCALLOC (init_size + 1, hash_entry);
100 obstack_init (&htab->mem_pool);
109 hash_destroy (hash_table *htab)
111 free (htab->table);
112 obstack_free (&htab->mem_pool, NULL);
147 lookup (hash_table *htab,
153 hash_entry *table = htab->table;
156 hash = 1 + hval % htab->size;
167 hash = 1 + hval % (htab->size - 2);
172 idx = htab->size + idx - hash;
190 hash_find_entry (hash_table *htab, const void *key, size_t keylen,
193 hash_entry *table = htab->table;
194 size_t idx = lookup (htab, key, keylen, compute_hashval (key, keylen));
208 insert_entry_2 (hash_table *htab,
212 hash_entry *table = htab->table;
220 if (htab->first == NULL)
223 htab->first = &table[idx];
227 table[idx].next = htab->first->next;
228 htab->first->next = &table[idx];
229 htab->first = &table[idx];
232 ++htab->filled;
238 resize (hash_table *htab)
240 unsigned long int old_size = htab->size;
241 hash_entry *table = htab->table;
244 htab->size = next_prime (htab->size * 2);
245 htab->filled = 0;
246 htab->first = NULL;
247 htab->table = XCALLOC (1 + htab->size, hash_entry);
251 insert_entry_2 (htab, table[idx].key, table[idx].keylen,
253 lookup (htab, table[idx].key, table[idx].keylen,
266 hash_insert_entry (hash_table *htab,
271 hash_entry *table = htab->table;
272 size_t idx = lookup (htab, key, keylen, hval);
280 void *keycopy = obstack_copy (&htab->mem_pool, key, keylen);
281 insert_entry_2 (htab, keycopy, keylen, hval, idx, data);
282 if (100 * htab->filled > 75 * htab->size)
284 resize (htab);
293 hash_set_value (hash_table *htab,
298 hash_entry *table = htab->table;
299 size_t idx = lookup (htab, key, keylen, hval);
310 void *keycopy = obstack_copy (&htab->mem_pool, key, keylen);
311 insert_entry_2 (htab, keycopy, keylen, hval, idx, data);
312 if (100 * htab->filled > 75 * htab->size)
314 resize (htab);
325 hash_iterate (hash_table *htab, void **ptr, const void **key, size_t *keylen,
332 if (htab->first == NULL)
334 curr = htab->first;
338 if (*ptr == htab->first)
358 hash_iterate_modify (hash_table *htab, void **ptr,
366 if (htab->first == NULL)
368 curr = htab->first;
372 if (*ptr == htab->first)