about summary refs log tree commit diff
path: root/src/stack.c
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2025-03-23 21:11:13 +0300
committerNakidai <nakidai@disroot.org>2025-03-23 21:11:13 +0300
commitad9d6a199db7c28f8b20f131dfb55a26e0e251de (patch)
treee5bb112cd902d9c09f5ad79ce98ba8a315d20bbb /src/stack.c
parent159666bae6cc185a5abac154b85c49406f32f30c (diff)
download3cl-ad9d6a199db7c28f8b20f131dfb55a26e0e251de.tar.gz
3cl-ad9d6a199db7c28f8b20f131dfb55a26e0e251de.zip
Again...
Diffstat (limited to 'src/stack.c')
-rw-r--r--src/stack.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/stack.c b/src/stack.c
deleted file mode 100644
index 3a1f697..0000000
--- a/src/stack.c
+++ /dev/null
@@ -1,22 +0,0 @@
-#include "3cl.h"
-
-#include <stdlib.h>
-
-
-static inline void resize(struct CCLStack *stack)
-{
-    stack->length *= 2;
-    stack->stack = realloc(stack->stack, stack->length * sizeof(*stack->stack));
-}
-
-void ccl_stack_push(struct CCLStack *stack, CCLNum num)
-{
-    if (stack->cur + 1 == stack->length)
-        resize(stack);
-    stack->stack[++stack->cur] = num;
-}
-
-CCLNum ccl_stack_pop(struct CCLStack *stack, CCLNum num)
-{
-    return stack->stack[stack->cur--];
-}