summaryrefslogtreecommitdiffhomepage
path: root/mixutils/mixvm_command.c
diff options
context:
space:
mode:
Diffstat (limited to 'mixutils/mixvm_command.c')
-rw-r--r--mixutils/mixvm_command.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/mixutils/mixvm_command.c b/mixutils/mixvm_command.c
index 4e9d9f8..0818abe 100644
--- a/mixutils/mixvm_command.c
+++ b/mixutils/mixvm_command.c
@@ -64,6 +64,7 @@ try_guile_ (char *line)
/* mixvm dispatcher */
static mix_vm_cmd_dispatcher_t *dis_ = NULL;
+static mix_config_t *config_ = NULL;
/* The names of functions that actually do the manipulation. */
#define DEC_FUN(name) \
@@ -158,8 +159,8 @@ static int
cmd_quit_ (mix_vm_cmd_dispatcher_t *dis, const char *arg)
{
puts ("Quitting ...");
- if ( dis_ ) mix_vm_cmd_dispatcher_delete (dis_);
-
+ if (dis_) mix_vm_cmd_dispatcher_delete (dis_);
+ if (config_) mix_config_delete (config_);
exit (0);
/* pek: anything needed here to make the marker disappear??? */
@@ -211,7 +212,8 @@ mixvm_cmd_init (mix_config_t *config, char *arg, gboolean use_emacs)
#endif /* HAVE_LIBREADLINE */
/* initialise the dispatcher */
- dis_ = mix_vm_cmd_dispatcher_new_with_config (stdout, stderr, config);
+ config_ = config;
+ dis_ = mix_vm_cmd_dispatcher_new_with_config (stdout, stderr, config_);
if ( dis_ == NULL)
g_error (_("Failed initialisation (no memory resources)"));
@@ -247,7 +249,9 @@ mixvm_cmd_exec (char *line)
/* strip white space */
line = g_strstrip(line);
-
+
+ if (strlen (line) == 0) return TRUE;
+
if (try_guile_ (line)) return TRUE;
(void)mix_vm_cmd_dispatcher_dispatch_text (dis_, line);