Lines Matching refs:hl

118 	struct hyperlinks	*hl = hlu->tree;  in hyperlinks_remove()  local
123 RB_REMOVE(hyperlinks_by_inner_tree, &hl->by_inner, hlu); in hyperlinks_remove()
124 RB_REMOVE(hyperlinks_by_uri_tree, &hl->by_uri, hlu); in hyperlinks_remove()
134 hyperlinks_put(struct hyperlinks *hl, const char *uri_in, in hyperlinks_put() argument
155 hlu = RB_FIND(hyperlinks_by_uri_tree, &hl->by_uri, &find); in hyperlinks_put()
165 hlu->inner = hl->next_inner++; in hyperlinks_put()
169 hlu->tree = hl; in hyperlinks_put()
170 RB_INSERT(hyperlinks_by_uri_tree, &hl->by_uri, hlu); in hyperlinks_put()
171 RB_INSERT(hyperlinks_by_inner_tree, &hl->by_inner, hlu); in hyperlinks_put()
182 hyperlinks_get(struct hyperlinks *hl, u_int inner, const char **uri_out, in hyperlinks_get() argument
189 hlu = RB_FIND(hyperlinks_by_inner_tree, &hl->by_inner, &find); in hyperlinks_get()
204 struct hyperlinks *hl; in hyperlinks_init() local
206 hl = xcalloc(1, sizeof *hl); in hyperlinks_init()
207 hl->next_inner = 1; in hyperlinks_init()
208 RB_INIT(&hl->by_uri); in hyperlinks_init()
209 RB_INIT(&hl->by_inner); in hyperlinks_init()
210 hl->references = 1; in hyperlinks_init()
211 return (hl); in hyperlinks_init()
216 hyperlinks_copy(struct hyperlinks *hl) in hyperlinks_copy() argument
218 hl->references++; in hyperlinks_copy()
219 return (hl); in hyperlinks_copy()
224 hyperlinks_reset(struct hyperlinks *hl) in hyperlinks_reset() argument
228 RB_FOREACH_SAFE(hlu, hyperlinks_by_inner_tree, &hl->by_inner, hlu1) in hyperlinks_reset()
234 hyperlinks_free(struct hyperlinks *hl) in hyperlinks_free() argument
236 if (--hl->references == 0) { in hyperlinks_free()
237 hyperlinks_reset(hl); in hyperlinks_free()
238 free(hl); in hyperlinks_free()