summaryrefslogtreecommitdiffstats
path: root/src/libmain.c
diff options
context:
space:
mode:
authorLibravatar bigfoot547 <[email protected]>2024-01-30 23:27:28 -0600
committerLibravatar bigfoot547 <[email protected]>2024-01-30 23:34:25 -0600
commit062bd8269c6b1ce9ba3279f36fe37d0a570c9e73 (patch)
treee14b14d0b7efe4d12405e128c7da07e6d34e736b /src/libmain.c
initial commit
Diffstat (limited to 'src/libmain.c')
-rw-r--r--src/libmain.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/libmain.c b/src/libmain.c
new file mode 100644
index 0000000..eca383a
--- /dev/null
+++ b/src/libmain.c
@@ -0,0 +1,28 @@
+#include "xxhash.h"
+#include <string.h>
+
+#include <stdint.h>
+#include <stdio.h>
+
+#define HT_IMPLEMENTATIONS
+#include "htgen.h"
+
+int main(int argc, char **argv) {
+ shash_t *hash = shash_create(8, 0.75f);
+ printf("%d\n", shash_put(hash, "test1", "test2"));
+ printf("%d\n", shash_put(hash, "abc", "def"));
+ printf("%d\n", shash_put(hash, "amingus", "val"));
+ printf("%d\n", shash_put(hash, "afungus", "val2"));
+ printf("%d\n", shash_put(hash, "abungus", "val3"));
+ printf("%d\n", shash_put(hash, "lethalbumpany", "crewmate_sus"));
+ printf("%d\n", shash_put(hash, "uuuu", "something"));
+ printf("%d\n", shash_put(hash, "99asdas", "please collide >:O"));
+
+ bool found = false;
+ char *val = shash_getn(hash, "99asdas", 0, &found);
+ printf("%s %d\n", val ? val : "(null)", found);
+
+ shash__debug_table(hash);
+
+ return 0;
+}