From e786158f0a2e3f051e182a94c20c686be0aec766 Mon Sep 17 00:00:00 2001 From: crc Date: Tue, 9 Oct 2018 19:48:54 +0000 Subject: [PATCH] work on rre error messages with s:evaluate FossilOrigin-Name: 5e3e92ee30be95df4b479b2190fb9431d86408941f52ea3768939c8b35f4f181 --- interfaces/rre.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/interfaces/rre.c b/interfaces/rre.c index b8e628d..db2032d 100644 --- a/interfaces/rre.c +++ b/interfaces/rre.c @@ -1201,14 +1201,18 @@ void restore_term() { #define IO_TTY_GETC 1001 void execute(CELL cell, int silent) { - CELL a, b; + CELL a, b, token; CELL opcode; rp = 1; ip = cell; + token = TIB; while (ip < IMAGE_SIZE) { if (ip == NotFound) { printf("\nERROR: Word Not Found: "); - printf("%s\n\n", string_extract(TIB)); + printf("`%s`\n\n", string_extract(token)); + } + if (ip == interpret) { + token = TOS; } opcode = memory[ip]; if (ngaValidatePackedOpcodes(opcode) != 0) {