summaryrefslogtreecommitdiff
path: root/inc/stack.h
diff options
context:
space:
mode:
authorRasmus Luha <rasmus.luha@gmail.com>2022-11-03 01:08:28 +0200
committerRasmus Luha <rasmus.luha@gmail.com>2022-11-03 01:08:28 +0200
commit4bdad2d5c7dec0eb19c418cadb47cc3124092310 (patch)
treec80d9cceb8e10e91daf38657cf64d8ce0bbf3104 /inc/stack.h
parentfcb9ff2b96de6989e9a676e96753b1b1279acf67 (diff)
praks IV doneHEADmaster
Diffstat (limited to 'inc/stack.h')
-rw-r--r--inc/stack.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/inc/stack.h b/inc/stack.h
index fcc976a..45f8daa 100644
--- a/inc/stack.h
+++ b/inc/stack.h
@@ -5,13 +5,16 @@
struct stack_st {
int len;
- int arr[STACK_SIZE];
+ int size;
+ int* arr;
};
-void stackPush(int val);
-int stackPop(void);
-int stackIsEmpty(void);
-int stackPeek(void);
-void stackPrint(void);
+void stackPush(struct stack_st *s, int val);
+int stackPop(struct stack_st *s);
+int stackIsEmpty(struct stack_st *s);
+int stackPeek(struct stack_st *s);
+void stackPrint(struct stack_st *s);
+
+void stackFree(struct stack_st *s);
#endif