From 50c5667f1414f805d16aff3bcd62c6be3ffac241 Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Wed, 22 Jan 2020 17:08:48 -0500 Subject: fixed tests --- tests/bf/bf.toc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/bf/bf.toc') 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 +}; -- cgit v1.2.3