From 9ba18b505d9fba120a3ecb95ff8d5a5dee62afa4 Mon Sep 17 00:00:00 2001 From: Benjamin Vedder Date: Sun, 3 Apr 2022 12:40:27 +0200 Subject: [PATCH] Added verbose error setting --- lispBM/lispif.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lispBM/lispif.c b/lispBM/lispif.c index 41cbef5c..9a71a198 100644 --- a/lispBM/lispif.c +++ b/lispBM/lispif.c @@ -244,8 +244,14 @@ void lispif_process_cmd(unsigned char *data, unsigned int len, ":continue\n" " Continue running LBM"); commands_printf_lisp( - ":step\n" - " Run single LBM step"); + ":step \n" + " Run num_steps LBM steps"); + commands_printf_lisp( + ":undef \n" + " Undefine symbol"); + commands_printf_lisp( + ":verb\n" + " Toggle verbose error messages"); commands_printf_lisp(" "); commands_printf_lisp("Anything else will be evaluated as an expression in LBM."); commands_printf_lisp(" "); @@ -314,6 +320,11 @@ void lispif_process_cmd(unsigned char *data, unsigned int len, commands_printf_lisp("undefining: %s", sym); commands_printf_lisp("%s", lbm_undefine(sym) ? "Cleared bindings" : "No definition found"); lbm_continue_eval(); + } else if (strncmp(str, ":verb", 5) == 0) { + static bool verbose_now = false; + verbose_now = !verbose_now; + lbm_set_verbose(verbose_now); + commands_printf_lisp("Verbose errors %s", verbose_now ? "Enabled" : "Disabled"); } else { bool ok = true; int timeout_cnt = 1000;