~brenns10/funlisp

a0d48eff6ed1c9ec2ad9613396f7ef0816191f82 — Stephen Brennan 3 years ago 39f6151
Remove debug prints and fix nul-terminator
2 files changed, 1 insertions(+), 2 deletions(-)

M src/parse.c
M src/public_util.c
M src/parse.c => src/parse.c +1 -0
@@ 176,6 176,7 @@ static char *read_file(FILE *input)
	}

	if (feof(input)) {
		buf[length] = '\0';
		return buf;
	} else {
		free(buf);

M src/public_util.c => src/public_util.c +0 -2
@@ 47,12 47,10 @@ lisp_value *lisp_run_main_if_exists(lisp_runtime *rt, lisp_scope *scope,
	if (main_func->type == type_error) {
		return NULL;
	}
	lisp_print(stdout, main_func);

	args = lisp_list_of_strings(rt, argv, argc, 0);
	args = lisp_quote(rt, args);
	args = lisp_singleton_list(rt, args);
	lisp_print(stdout, args);
	printf("\n");
	return lisp_call(rt, scope, main_func, args);
}