aboutsummaryrefslogtreecommitdiff
path: root/map.h
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-04-17 20:01:51 -0700
committerMichael Forney <mforney@mforney.org>2019-04-17 20:11:06 -0700
commitf4d1b8acc04c4f2beeffafa8ff1cca0bdfbe71b2 (patch)
tree5b4c35d218c5b6574083e5685ae3c1063a5e0801 /map.h
parent523a70ada5cf4ead38e637eb62138af0ed36463c (diff)
htab -> map
Diffstat (limited to 'map.h')
-rw-r--r--map.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/map.h b/map.h
new file mode 100644
index 0000000..c1dd5e1
--- /dev/null
+++ b/map.h
@@ -0,0 +1,13 @@
+struct mapkey {
+ uint64_t hash;
+ const char *str;
+ size_t len;
+};
+
+void mapstrkey(struct mapkey *, const char *);
+void mapbufkey(struct mapkey *, const char *, size_t);
+
+struct map *mkmap(size_t);
+void delmap(struct map *, void(void *));
+void **mapput(struct map *, struct mapkey *);
+void *mapget(struct map *, struct mapkey *);