Lines Matching refs:lh
35 static void dummy_lh_free(struct dummy_lhash *lh) { in dummy_lh_free() argument
38 for (cur = lh->head; cur != NULL; cur = next) { in dummy_lh_free()
45 static size_t dummy_lh_num_items(const struct dummy_lhash *lh) { in dummy_lh_num_items() argument
49 for (cur = lh->head; cur != NULL; cur = cur->next) { in dummy_lh_num_items()
56 static char *dummy_lh_retrieve(struct dummy_lhash *lh, const char *s) { in dummy_lh_retrieve() argument
59 for (cur = lh->head; cur != NULL; cur = cur->next) { in dummy_lh_retrieve()
68 static int dummy_lh_insert(struct dummy_lhash *lh, char **old_data, char *s) { in dummy_lh_insert() argument
71 for (cur = lh->head; cur != NULL; cur = cur->next) { in dummy_lh_insert()
82 node->next = lh->head; in dummy_lh_insert()
83 lh->head = node; in dummy_lh_insert()
87 static char *dummy_lh_delete(struct dummy_lhash *lh, const void *s) { in dummy_lh_delete() argument
91 next_ptr = &lh->head; in dummy_lh_delete()
92 for (cur = lh->head; cur != NULL; cur = cur->next) { in dummy_lh_delete()
119 _LHASH *lh; in main() local
125 lh = lh_new(NULL, NULL); in main()
126 if (lh == NULL) { in main()
134 if (dummy_lh_num_items(&dummy_lh) != lh_num_items(lh)) { in main()
143 s1 = (char *)lh_retrieve(lh, s); in main()
154 lh_insert(lh, (void **)&s1, s); in main()
172 s1 = lh_delete(lh, s); in main()
194 lh_doall(lh, free); in main()
195 lh_free(lh); in main()