summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--main.c2
-rw-r--r--tests/bf/bf.toc5
3 files changed, 5 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index ba8d9a8..3326907 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,4 @@ tags
*.o
compatibility
std/*.c
+std/*.o
diff --git a/main.c b/main.c
index 3d7f527..c979e5f 100644
--- a/main.c
+++ b/main.c
@@ -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
+};