Lines Matching refs:entry
76 _free_list(zip_hash_entry_t *entry) in _free_list() argument
80 next = entry->next; in _free_list()
81 free(entry); in _free_list()
82 entry = next; in _free_list()
83 } while (entry != NULL); in _free_list()
126 zip_hash_entry_t *entry; in _zip_hash_add() local
134 for (entry = hash->table[hash_value]; entry != NULL; entry = entry->next) { in _zip_hash_add()
135 if (strcmp((const char *)name, (const char *)entry->name) == 0) { in _zip_hash_add()
136 if (((flags & ZIP_FL_UNCHANGED) && entry->orig_index != -1) || entry->current_index != -1) { in _zip_hash_add()
146 if (entry == NULL) { in _zip_hash_add()
147 if ((entry=(zip_hash_entry_t *)malloc(sizeof(zip_hash_entry_t))) == NULL) { in _zip_hash_add()
151 entry->name = name; in _zip_hash_add()
152 entry->next = hash->table[hash_value]; in _zip_hash_add()
153 hash->table[hash_value] = entry; in _zip_hash_add()
154 entry->orig_index = -1; in _zip_hash_add()
158 entry->orig_index = (zip_int64_t)index; in _zip_hash_add()
160 entry->current_index = (zip_int64_t)index; in _zip_hash_add()
170 zip_hash_entry_t *entry, *previous; in _zip_hash_delete() local
179 entry = hash->table[hash_value]; in _zip_hash_delete()
180 while (entry) { in _zip_hash_delete()
181 if (strcmp((const char *)name, (const char *)entry->name) == 0) { in _zip_hash_delete()
182 if (entry->orig_index == -1) { in _zip_hash_delete()
184 previous->next = entry->next; in _zip_hash_delete()
187 hash->table[hash_value] = entry->next; in _zip_hash_delete()
189 free(entry); in _zip_hash_delete()
192 entry->current_index = -1; in _zip_hash_delete()
196 previous = entry; in _zip_hash_delete()
197 entry = entry->next; in _zip_hash_delete()
209 zip_hash_entry_t *entry; in _zip_hash_lookup() local
217 for (entry = hash->table[hash_value]; entry != NULL; entry = entry->next) { in _zip_hash_lookup()
218 if (strcmp((const char *)name, (const char *)entry->name) == 0) { in _zip_hash_lookup()
220 if (entry->orig_index != -1) { in _zip_hash_lookup()
221 return entry->orig_index; in _zip_hash_lookup()
225 if (entry->current_index != -1) { in _zip_hash_lookup()
226 return entry->current_index; in _zip_hash_lookup()
241 zip_hash_entry_t *entry, *previous; in _zip_hash_revert() local
245 entry = hash->table[i]; in _zip_hash_revert()
246 while (entry) { in _zip_hash_revert()
247 if (entry->orig_index == -1) { in _zip_hash_revert()
250 previous->next = entry->next; in _zip_hash_revert()
253 hash->table[i] = entry->next; in _zip_hash_revert()
255 p = entry; in _zip_hash_revert()
256 entry = entry->next; in _zip_hash_revert()
261 entry->current_index = entry->orig_index; in _zip_hash_revert()
262 previous = entry; in _zip_hash_revert()
263 entry = entry->next; in _zip_hash_revert()