diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 24 |
1 files changed, 17 insertions, 7 deletions
@@ -13,12 +13,10 @@ * Description: Entrypoint */ -#include "./base.h" -#include "./lisp.h" -#include "./memory.h" -#include "./reader.h" -#include "./sv.h" -#include "./vec.h" +#include <lib/sv.h> +#include <lib/vec.h> +#include <lisp/lisp.h> +#include <lisp/reader.h> #include <assert.h> #include <ctype.h> @@ -27,6 +25,15 @@ #include <stdio.h> #include <string.h> +void usage(char *prog_name, FILE *fp) +{ + fprintf(fp, + "Usage: %s [FILE]\n" + "Interpret FILE as scheme in the OATS interpreter.\n" + "\t[FILE]: name of file\n", + prog_name); +} + int main(int argc, char *argv[]) { int exit = 0; @@ -36,7 +43,10 @@ int main(int argc, char *argv[]) if (argc > 1) filename = argv[1]; else - filename = "./r7rs-tests.scm"; + { + usage(argv[0], stderr); + return 1; + } FILE *fp = fopen(filename, "r"); if (!fp) |