aboutsummaryrefslogtreecommitdiff
path: root/include/htab.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/htab.h')
-rw-r--r--include/htab.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/htab.h b/include/htab.h
new file mode 100644
index 0000000..70a0893
--- /dev/null
+++ b/include/htab.h
@@ -0,0 +1,18 @@
+#include <search.h>
+
+#ifndef HTAB_H
+
+struct htab {
+ struct hsearch_data *table;
+ char **keys;
+ size_t keys_size, key_filled;
+};
+
+void htab_free(struct htab *htab);
+int htab_init(struct htab **htab);
+int htab_delete(struct htab *htab, const char *key);
+int htab_enter(struct htab *htab, const char *key, void *data);
+int htab_search(struct htab *htab, char *key, ENTRY **ep);
+
+#define HTAB_H
+#endif