commit 68b89e8eab2f57625ea8ee8b492adb3c314c3b37
parent b64410a8040cbcb1236a0157d4a12cd100ecaf92
Author: Ed van Bruggen <edvb@uw.edu>
Date: Wed, 22 May 2019 16:20:08 -0700
Fix quit command printing an extra newline
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/main.c b/main.c
@@ -40,8 +40,6 @@ main(int argc, char *argv[])
else
tisp_print(stdout, tisp_eval(env, tisp_parse_file(env, argv[i])));
- puts("");
-
/* tisp_env_free(env); */
return 0;
diff --git a/tibs/io.c b/tibs/io.c
@@ -45,8 +45,10 @@ prim_read(Env env, Val args)
char *file;
Val v;
struct Str str = { NULL };
- if (!(file = tisp_read_file(NULL)))
+ if (!(file = tisp_read_file(NULL))) {
+ putchar('\n');
return mk_sym(env, "quit");
+ }
str.d = file;
v = tisp_read(env, &str);
free(file);