From 99080bd960207a217ddd28bfefde6ffb867c426f Mon Sep 17 00:00:00 2001 From: Bradley Smith Date: Sat, 8 Mar 2008 22:54:23 +0000 Subject: Add error message when given an invalid instruction. Add initial ui update to avoid corruption. Signed-off-by: Bradley Smith --- ChangeLog | 3 +++ src/main.c | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 15c0ef2..decaefd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,9 @@ Correct Map Type, and tidy up. * lib/x11plugin.h: Correct X11_Plugin Type, and tidy up. + * src/main.c: + Add error message when given an invalid instruction. + Add initial ui update to avoid corruption. 2008-03-07 Bradley Smith diff --git a/src/main.c b/src/main.c index 960d8cc..fc0d6b6 100644 --- a/src/main.c +++ b/src/main.c @@ -347,6 +347,7 @@ main_prog (void *closure, gint argc, gchar *argv[]) SCM value; g_printf ("Robot program not specified. Entering interactive mode..\n"); + user_interface_update_status (ui, "", -1, -1, -1); while (1) { user_interface_get_string (ui, "guile> ", buff, BUFF_LEN); @@ -368,7 +369,9 @@ main_prog (void *closure, gint argc, gchar *argv[]) SCM catch_handler (void *data, SCM tag, SCM throw_args) { - gchar *message = "Could'nt get error message\n"; + +/* + gchar *message = "Couldn't get error message\n"; if (scm_ilength (throw_args) > 1 && SCM_NFALSEP (scm_string_p (SCM_CADR (throw_args)))) @@ -382,6 +385,9 @@ catch_handler (void *data, SCM tag, SCM throw_args) } user_interface_update_status (ui, message, -1, -1, -1); +*/ + + g_printf("Invalid Instruction\n"); return SCM_BOOL_F; } -- cgit v1.1