summaryrefslogtreecommitdiff
path: root/stack.h
diff options
context:
space:
mode:
authorthing 1 <thing1@seacrossedlovers.xyz>2025-01-10 17:38:56 +0000
committerthing 1 <thing1@seacrossedlovers.xyz>2025-01-10 17:38:56 +0000
commite46e08fceff29622399855043554635d6e33c3c4 (patch)
treeb8074819364bd54b54b4798f07002fe234c506ac /stack.h
init commit
Diffstat (limited to 'stack.h')
-rw-r--r--stack.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/stack.h b/stack.h
new file mode 100644
index 0000000..ab3491b
--- /dev/null
+++ b/stack.h
@@ -0,0 +1,14 @@
+#include <stdlib.h>
+
+typedef struct stack stack;
+
+typedef struct stack {
+ char *tape;
+ int len;
+ char *ptr;
+} stack;
+
+stack *push(stack *s, char c);
+char pop(stack *s);
+char peek(stack *s);
+void cleanstack(stack *s);