40 typedef void (*oscap_dump_func) ();
42 typedef bool (*oscap_cmp_func) (
void *,
void *);
60 void oscap_create_lists(
struct oscap_list **first, ...);
61 bool oscap_list_add(
struct oscap_list *list,
void *value);
62 bool oscap_list_push(
struct oscap_list *list,
void *value);
63 bool oscap_list_pop(
struct oscap_list *list, oscap_destruct_func destructor);
65 void oscap_list_free(
struct oscap_list *list, oscap_destruct_func destructor);
66 void oscap_list_free0(
struct oscap_list *list);
67 void oscap_list_dump(
struct oscap_list *list, oscap_dump_func dumper,
int depth);
68 int oscap_list_get_itemcount(
struct oscap_list *list);
69 bool oscap_list_contains(
struct oscap_list *list,
void *what, oscap_cmp_func compare);
75 typedef bool(*oscap_filter_func) (
void *,
void *);
80 oscap_filter_func filter;
84 void *oscap_iterator_new(
struct oscap_list *list);
85 void *oscap_iterator_new_filter(
struct oscap_list *list, oscap_filter_func filter,
void *user_data);
87 size_t oscap_iterator_get_itemcount(
const struct oscap_iterator *it);
93 void *oscap_list_find(
struct oscap_list *list,
void *what, oscap_cmp_func compare);
100 typedef int (*oscap_compare_func) (
const char *,
const char *);
113 oscap_compare_func cmp;
123 struct oscap_htable *oscap_htable_new1(oscap_compare_func cmp,
size_t hsize);
145 bool oscap_htable_add(
struct oscap_htable *htable,
const char *key,
void *item);
151 void *oscap_htable_get(
struct oscap_htable *htable,
const char *key);
153 void *oscap_htable_detach(
struct oscap_htable *htable,
const char *key);
155 void oscap_htable_dump(
struct oscap_htable *htable, oscap_dump_func dumper,
int depth);
162 void oscap_htable_free(
struct oscap_htable *htable, oscap_destruct_func destructor);
164 void oscap_print_depth(
int depth);