altos/scheme: Allow ao_scheme_read_eval_print to be restarted
authorKeith Packard <keithp@keithp.com>
Mon, 11 Dec 2017 02:35:53 +0000 (18:35 -0800)
committerKeith Packard <keithp@keithp.com>
Mon, 11 Dec 2017 20:20:25 +0000 (12:20 -0800)
Reset exceptions at the top so that we can call it more than once.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/scheme/ao_scheme_rep.c
src/scheme/test/Makefile

index 9dbce5f2476d8bd57e7ba765b81f2e387fe1453d..5b94d9401302e5b9fddb091c0336064d744ab116 100644 (file)
@@ -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)
index 9d39d33ef30159274959b9bd92ab4670b1a0f8b5..c48add1f3b6a604b2e705f401a92665dc6d21b50 100644 (file)
@@ -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