From cf5729a0bae51172f12fc9ec4339d4e975a45fcc Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 17 Nov 2017 23:23:50 -0800 Subject: altos/lisp: Finish first pass through r7rs * print -> write, patom -> display * Add read-char, write-char * Add exit, current-jiffy, current-second, jiffies-per-second * Add for-each and string-for-each * Avoid duplicate builtins with different atoms Signed-off-by: Keith Packard --- src/lisp/ao_lisp_error.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/lisp/ao_lisp_error.c') diff --git a/src/lisp/ao_lisp_error.c b/src/lisp/ao_lisp_error.c index 54a9be10..d1c9b941 100644 --- a/src/lisp/ao_lisp_error.c +++ b/src/lisp/ao_lisp_error.c @@ -28,7 +28,7 @@ ao_lisp_error_poly(char *name, ao_poly poly, ao_poly last) printf("\t\t "); else first = 0; - ao_lisp_poly_print(cons->car); + ao_lisp_poly_write(cons->car); printf("\n"); if (poly == last) break; @@ -38,7 +38,7 @@ ao_lisp_error_poly(char *name, ao_poly poly, ao_poly last) } else printf(")\n"); } else { - ao_lisp_poly_print(poly); + ao_lisp_poly_write(poly); printf("\n"); } } @@ -66,9 +66,9 @@ ao_lisp_error_frame(int indent, char *name, struct ao_lisp_frame *frame) tabs(indent); printf(" "); } - ao_lisp_poly_print(frame->vals[f].atom); + ao_lisp_poly_write(frame->vals[f].atom); printf(" = "); - ao_lisp_poly_print(frame->vals[f].val); + ao_lisp_poly_write(frame->vals[f].val); printf("\n"); } if (frame->prev) @@ -92,11 +92,11 @@ ao_lisp_error(int error, char *format, ...) vprintf(format, args); va_end(args); printf("\n"); - printf("Value: "); ao_lisp_poly_print(ao_lisp_v); printf("\n"); + printf("Value: "); ao_lisp_poly_write(ao_lisp_v); printf("\n"); printf("Stack:\n"); - ao_lisp_stack_print(ao_lisp_stack_poly(ao_lisp_stack)); + ao_lisp_stack_write(ao_lisp_stack_poly(ao_lisp_stack)); printf("Globals:\n\t"); - ao_lisp_frame_print(ao_lisp_frame_poly(ao_lisp_frame_global)); + ao_lisp_frame_write(ao_lisp_frame_poly(ao_lisp_frame_global)); printf("\n"); return AO_LISP_NIL; } -- cgit v1.2.3