aboutsummaryrefslogtreecommitdiffstats
path: root/stack.h
diff options
context:
space:
mode:
authorGalin Simeonov <gts@volconst.com>2021-05-17 17:29:08 +0300
committerGalin Simeonov <gts@volconst.com>2021-07-15 18:00:15 +0300
commitf768d9bdb84e846d89aac66a4f3433a44241c298 (patch)
treeb7e8248bebd80c8b1f911f666260ad52b7213b84 /stack.h
parent679cbe58c4e53f0163588a7731154f3afe2d25aa (diff)
downloadMEGATRON-f768d9bdb84e846d89aac66a4f3433a44241c298.tar.gz
parser formed
Diffstat (limited to 'stack.h')
-rw-r--r--stack.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/stack.h b/stack.h
new file mode 100644
index 0000000..14e557a
--- /dev/null
+++ b/stack.h
@@ -0,0 +1,22 @@
+#ifndef GSTACK_H
+#define GSTACK_H GSTACK_H
+#include<stdlib.h>
+typedef struct Stack Stack;
+
+struct Stack_Node
+{
+ struct Stack_Node *next;
+ void *data;
+};
+struct Stack
+{
+ struct Stack_Node *first;
+ size_t size;
+};
+
+void Stack_Init(Stack *stack);
+void Stack_Push(Stack *stack,void* data);
+void* Stack_Pop(Stack *stack);
+
+
+#endif