diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2001-09-01 00:19:50 +0000 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2001-09-01 00:19:50 +0000 |
commit | 879b84f0f16a441566015902ec34f102c058097b (patch) | |
tree | 022dab2a600851710a2e5ae21efb50a95ff0fec9 /mixutils | |
parent | 5d0786103dcb47b2a01e1b280f5f7218d7714363 (diff) | |
download | mdk-879b84f0f16a441566015902ec34f102c058097b.tar.gz mdk-879b84f0f16a441566015902ec34f102c058097b.tar.bz2 |
new commands: pddir, sddir, ptime, psrc, pprog, pline
Diffstat (limited to 'mixutils')
-rw-r--r-- | mixutils/.cvsignore | 1 | ||||
-rw-r--r-- | mixutils/mixvm_command.c | 12 |
2 files changed, 9 insertions, 4 deletions
diff --git a/mixutils/.cvsignore b/mixutils/.cvsignore index 49cabc0..2f7ed7f 100644 --- a/mixutils/.cvsignore +++ b/mixutils/.cvsignore @@ -1,6 +1,7 @@ .deps Makefile Makefile.in +foo mixasm mixcmp mixguile 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); |