diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | main.c | 2 | ||||
-rw-r--r-- | tests/bf/bf.toc | 5 |
3 files changed, 5 insertions, 3 deletions
@@ -12,3 +12,4 @@ tags *.o compatibility std/*.c +std/*.o @@ -18,7 +18,7 @@ /* TODO: -run time foreign functions +get tests to compile without warnings foreign non-functions no foreign parameter declarations variadic fns diff --git a/tests/bf/bf.toc b/tests/bf/bf.toc index 29f0bcc..b624101 100644 --- a/tests/bf/bf.toc +++ b/tests/bf/bf.toc @@ -1,4 +1,5 @@ getstdin ::= fn() []char { +#C("extern void *stdin; extern char *fgets(char *buf, size_t sz, void *f);"); contents : []char; contents_sz : int; contents_len : int; @@ -96,7 +97,7 @@ main ::= fn() { } } elif code[i] == '.' { c := tape[ptr] as char; - #C("putc(c, stdout)"); + #C("putchar(c)"); } elif code[i] == ',' { // Input doesn't really work, because you // need to send an EOF to end the program. @@ -105,4 +106,4 @@ main ::= fn() { } del(tape); del(code); -};
\ No newline at end of file +}; |