Lines Matching refs:tbl

63 get_hash(hash *tbl, char *key)  in get_hash()  argument
68 if (tbl->hash_type == String_Key) { in get_hash()
69 tmp = tbl->table[bucket = hash_string(key, tbl->size)]; in get_hash()
71 tmp = tbl->table[bucket = labs((long)key) % tbl->size]; in get_hash()
74 if (tbl->hash_type == String_Key) { in get_hash()
95 new->key = ((tbl->hash_type == String_Key)?strdup(key):key); in get_hash()
101 new->left_entry = tbl->start; in get_hash()
102 tbl->start = new; in get_hash()
107 new->next_entry = tbl->table[bucket]; in get_hash()
108 tbl->table[bucket] = new; in get_hash()
114 find_hash(hash *tbl, const char *key) in find_hash() argument
118 if (tbl->hash_type == String_Key) { in find_hash()
119 tmp = tbl->table[hash_string(key, tbl->size)]; in find_hash()
126 tmp = tbl->table[labs((long)key) % tbl->size]; in find_hash()
137 del_hash(hash *tbl, const char *key) in del_hash() argument
142 if (tbl->hash_type == String_Key) { in del_hash()
143 bucket = hash_string(key, tbl->size); in del_hash()
145 bucket = labs((long)key) % tbl->size; in del_hash()
148 if ((tmp = tbl->table[bucket]) == NULL) { in del_hash()
151 if (tbl->hash_type == String_Key) { in del_hash()
178 if (tbl->hash_type == String_Key) { in del_hash()
184 tbl->table[bucket] = tmp->next_entry; in del_hash()
194 tbl->start = (tmp->left_entry ?tmp->left_entry->right_entry: in del_hash()
201 operate_hash(hash *tbl, void (*ptr)(), const char *usr_arg) in operate_hash() argument
203 hash_entry *tmp = tbl->start; in operate_hash()
215 operate_hash_addr(hash *tbl, void (*ptr)(), const char *usr_arg) in operate_hash_addr() argument
217 hash_entry *tmp = tbl->start; in operate_hash_addr()
229 destroy_hash(hash *tbl, int (*ptr)(), const char *usr_arg) in destroy_hash() argument
231 hash_entry * tmp = tbl->start, * prev; in destroy_hash()
238 if (tbl->hash_type == String_Key) { in destroy_hash()
245 free((char *)tbl->table); in destroy_hash()
246 free(tbl); in destroy_hash()