From: Keith Packard Date: Mon, 11 Dec 2017 02:35:53 +0000 (-0800) Subject: altos/scheme: Allow ao_scheme_read_eval_print to be restarted X-Git-Tag: 1.8.3~1^2~9 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=ec638405045d33d48476ab85edf09a2e1756e3e3;p=fw%2Faltos altos/scheme: Allow ao_scheme_read_eval_print to be restarted Reset exceptions at the top so that we can call it more than once. Signed-off-by: Keith Packard --- diff --git a/src/scheme/ao_scheme_rep.c b/src/scheme/ao_scheme_rep.c index 9dbce5f2..5b94d940 100644 --- a/src/scheme/ao_scheme_rep.c +++ b/src/scheme/ao_scheme_rep.c @@ -18,6 +18,8 @@ ao_poly ao_scheme_read_eval_print(void) { ao_poly in, out = AO_SCHEME_NIL; + + ao_scheme_exception = 0; for(;;) { in = ao_scheme_read(); if (in == _ao_scheme_atom_eof) diff --git a/src/scheme/test/Makefile b/src/scheme/test/Makefile index 9d39d33e..c48add1f 100644 --- a/src/scheme/test/Makefile +++ b/src/scheme/test/Makefile @@ -17,3 +17,6 @@ $(OBJS): $(SCHEME_HDRS) clean:: rm -f $(OBJS) ao_scheme_test + +install: ao_scheme_test + cp ao_scheme_test $$HOME/bin/ao-scheme