aboutsummaryrefslogtreecommitdiff
path: root/src/hash.h
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2023-03-23 15:30:21 -0400
committerCara Salter <cara@devcara.com>2023-03-23 15:30:21 -0400
commit192dd9d656742b1931ae44f05e1604ff18d64d3b (patch)
tree39ffaed9ebe7a951352b8ed654debd01e9ce57c6 /src/hash.h
parent0a838a6932beb1f89a81b16a568098fb45ecb266 (diff)
downloadcmud-192dd9d656742b1931ae44f05e1604ff18d64d3b.tar.gz
cmud-192dd9d656742b1931ae44f05e1604ff18d64d3b.zip
Work on game.h
Diffstat (limited to 'src/hash.h')
-rw-r--r--src/hash.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/hash.h b/src/hash.h
new file mode 100644
index 0000000..3806799
--- /dev/null
+++ b/src/hash.h
@@ -0,0 +1,36 @@
+/*
+ * =====================================================================================
+ *
+ * Filename: hash.h
+ *
+ * Description: Prototypes and structs for the hashmap implementation
+ *
+ * Version: 1.0
+ * Created: 12/09/2022 07:35:39 PM
+ * Revision: none
+ * Compiler: gcc
+ *
+ * Author: Cara Salter (muirrum), cara@devcara.com
+ * Organization:
+ *
+ * =====================================================================================
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+
+typedef void* any_type;
+
+typedef any_type hash_map;
+
+hash_map map_init();
+
+int map_add(hash_map m, int key, any_type value);
+
+int map_get(hash_map m, int key, any_type* value);
+
+int map_del(hash_map m, int key);
+
+void map_free(hash_map m);
+
+int map_len(hash_map m);