aboutsummaryrefslogtreecommitdiffstats
path: root/test/ccured_olden/mst/hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/ccured_olden/mst/hash.h')
-rw-r--r--test/ccured_olden/mst/hash.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/ccured_olden/mst/hash.h b/test/ccured_olden/mst/hash.h
new file mode 100644
index 00000000..99475263
--- /dev/null
+++ b/test/ccured_olden/mst/hash.h
@@ -0,0 +1,23 @@
+/* For copyright information, see olden_v1.0/COPYRIGHT */
+
+#include "stdio.h"
+
+typedef struct hash_entry {
+ unsigned int key;
+ void *entry;
+ struct hash_entry *next;
+ unsigned int padding;
+} *HashEntry;
+
+typedef struct hash {
+ HashEntry *array;
+ int (*mapfunc)(unsigned int);
+ int size;
+ unsigned int padding;
+} *Hash;
+
+Hash MakeHash(int size, int map(unsigned int));
+void *HashLookup(unsigned int key, Hash hash);
+void HashInsert(void *entry,unsigned int key, Hash hash);
+void HashDelete(unsigned int key, Hash hash);
+