aboutsummaryrefslogtreecommitdiffstats
path: root/stack.c
diff options
context:
space:
mode:
authordan <[email protected]>2023-05-29 16:04:01 -0400
committerdan <[email protected]>2023-05-29 16:04:01 -0400
commiteeca88e98212d7b61253b4be5f4ebb2f4b36e770 (patch)
treed3384cfeec663c2e79574dbf8b9cc9a08ff6b8de /stack.c
parent41b4e2123260eed2aab5ab76d42f106c73ec6bf2 (diff)
downloadforth-eeca88e98212d7b61253b4be5f4ebb2f4b36e770.tar.gz
forth-eeca88e98212d7b61253b4be5f4ebb2f4b36e770.tar.bz2
forth-eeca88e98212d7b61253b4be5f4ebb2f4b36e770.zip
feat: tuck and clearstack commands
Diffstat (limited to 'stack.c')
-rw-r--r--stack.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/stack.c b/stack.c
index e1f0281..0fe7235 100644
--- a/stack.c
+++ b/stack.c
@@ -77,3 +77,7 @@ void stack_pick(stack *s) {
stack_push(s, 0);
}
}
+
+void stack_clear(stack* s) {
+ s->size = 0;
+}