summaryrefslogtreecommitdiff
path: root/src/include/stack.h
diff options
context:
space:
mode:
authorPreston Pan <preston@nullring.xyz>2023-01-02 22:31:49 -0800
committerPreston Pan <preston@nullring.xyz>2023-01-02 22:31:49 -0800
commit64feef1b9ea72adf7ba32998e9dca7d507607498 (patch)
treea409e61877bb51aa6fb2477175dabbf3dbccf298 /src/include/stack.h
a lot of stuff.
Diffstat (limited to 'src/include/stack.h')
-rw-r--r--src/include/stack.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/include/stack.h b/src/include/stack.h
new file mode 100644
index 0000000..e8047c8
--- /dev/null
+++ b/src/include/stack.h
@@ -0,0 +1,16 @@
+#ifndef STACK_H
+#define STACK_H
+#include "./hash_table.h"
+typedef struct {
+ hash_table_t **stack;
+ int cur;
+} stack_t;
+
+stack_t *init_stack(int ht_size);
+
+void stack_push(stack_t *s, hash_table_t *h);
+
+hash_table_t *stack_peek(stack_t *s);
+
+hash_table_t *stack_pop(stack_t *s);
+#endif