back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/stack.h
diff options
context:
space:
mode:
authorscratko <m@scratko.xyz>2024-03-31 21:05:36 +0300
committerscratko <m@scratko.xyz>2024-03-31 21:05:36 +0300
commit7d07ff825dc7cff7ee80b04346e0d2c49a91e190 (patch)
treef3bf4c72c22107b0d74143f09af39b0071106540 /stack.h
downloadarithmetic-expression-computator-7d07ff825dc7cff7ee80b04346e0d2c49a91e190.tar.gz
arithmetic-expression-computator-7d07ff825dc7cff7ee80b04346e0d2c49a91e190.tar.bz2
arithmetic-expression-computator-7d07ff825dc7cff7ee80b04346e0d2c49a91e190.zip
Initial commit
Diffstat (limited to 'stack.h')
-rw-r--r--stack.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/stack.h b/stack.h
new file mode 100644
index 0000000..f7d0cfb
--- /dev/null
+++ b/stack.h
@@ -0,0 +1,17 @@
+#ifndef STACK_H_SENTRY
+#define STACK_H_SENTRY
+
+struct item {
+ long data;
+ struct item *next;
+};
+typedef struct item* stack;
+
+void init_stack(stack *st);
+void push_stack(stack *st, long num);
+long pop_stack(stack *st);
+int is_empty_stack(const stack *st);
+long top_stack(const stack *st);
+extern void* heap_base;
+
+#endif