summaryrefslogtreecommitdiff
path: root/src/lib/utils.h
diff options
context:
space:
mode:
authorbpc2003 <wpesfriendnva@gmail.com>2025-04-22 16:45:36 -0400
committerbpc2003 <wpesfriendnva@gmail.com>2025-04-22 16:45:36 -0400
commitba5422d8ac64ca864dca168780a957a92f22a5d0 (patch)
tree7dbc2c9dd25038cb1af8f153331cd0bd417aa3d5 /src/lib/utils.h
parentdc83060f785031f1607dc4152e678472bff06b8a (diff)
Add utils.h and moved batch operations into their own files
Diffstat (limited to 'src/lib/utils.h')
-rw-r--r--src/lib/utils.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/utils.h b/src/lib/utils.h
new file mode 100644
index 0000000..64e2787
--- /dev/null
+++ b/src/lib/utils.h
@@ -0,0 +1,19 @@
+#ifndef UTILS_H
+#define UTILS_H
+
+#include "mdb.h"
+
+// dellist: deletes the provided table
+void dellist(tablist_t *list);
+
+/* hash: calculates the DJB2 hash of a string,
+ * and returns that mod TABLEN */
+int hash(char *str);
+
+// clone: clones and returns a pointer to int
+int *clone(int n);
+
+// copytab: copys table src into table dst
+tablist_t *copytab(tablist_t *dst, tablist_t *src);
+
+#endif