aboutsummaryrefslogtreecommitdiffstats
path: root/forth.c
diff options
context:
space:
mode:
authordan <[email protected]>2023-05-29 13:53:46 -0400
committerdan <[email protected]>2023-05-29 13:53:46 -0400
commitb72c271d8731e1f67fdef29cd64726dfce893fe7 (patch)
tree319f74cf68c0eecd2b4764fa4fbea018af11dfb9 /forth.c
parent2455c38a09be3708062fef3e90bc006ab44dfacb (diff)
downloadforth-b72c271d8731e1f67fdef29cd64726dfce893fe7.tar.gz
forth-b72c271d8731e1f67fdef29cd64726dfce893fe7.tar.bz2
forth-b72c271d8731e1f67fdef29cd64726dfce893fe7.zip
feat: add .s,roll,pick,and depth commands to c forth
Diffstat (limited to 'forth.c')
-rw-r--r--forth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/forth.c b/forth.c
index 4c5d910..0ebb7d5 100644
--- a/forth.c
+++ b/forth.c
@@ -42,7 +42,7 @@ void exec(stack *s, char *word, int len, char* line, int* i) {
break;
}
} else if (isnumber(word)) {
- push(s, atoi(word));
+ stack_push(s, atoi(word));
}
}
@@ -68,7 +68,7 @@ void eval(stack* s, int len, char* line) {
}
int main(int argc, char** argv) {
- stack* s = newstack();
+ stack* s = stack_new();
char *line = NULL;
size_t len = 0;
ssize_t read;