Lines Matching refs:entry
66 struct tag_entry *entry; in tag_free() local
71 entry = ohash_first(&tag_data, &slot); in tag_free()
72 while (entry != NULL) { in tag_free()
73 free(entry->nodes); in tag_free()
74 free(entry); in tag_free()
75 entry = ohash_next(&tag_data, &slot); in tag_free()
88 struct tag_entry *entry; in tag_put() local
134 entry = ohash_find(&tag_data, slot); in tag_put()
138 if (entry == NULL) { in tag_put()
139 entry = mandoc_malloc(sizeof(*entry) + len + 1); in tag_put()
140 memcpy(entry->s, s, len); in tag_put()
141 entry->s[len] = '\0'; in tag_put()
142 entry->nodes = NULL; in tag_put()
143 entry->maxnodes = entry->nnodes = 0; in tag_put()
144 ohash_insert(&tag_data, slot, entry); in tag_put()
152 else if (entry->prio < prio) in tag_put()
161 else if (entry->prio > prio || prio == TAG_FALLBACK) { in tag_put()
162 while (entry->nnodes > 0) { in tag_put()
163 nold = entry->nodes[--entry->nnodes]; in tag_put()
169 entry->prio = TAG_DELETE; in tag_put()
176 if (entry->maxnodes == entry->nnodes) { in tag_put()
177 entry->maxnodes += 4; in tag_put()
178 entry->nodes = mandoc_reallocarray(entry->nodes, in tag_put()
179 entry->maxnodes, sizeof(*entry->nodes)); in tag_put()
181 entry->nodes[entry->nnodes++] = n; in tag_put()
182 entry->prio = prio; in tag_put()