diff options
Diffstat (limited to 'mixutils')
-rw-r--r-- | mixutils/mixvm_command.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/mixutils/mixvm_command.c b/mixutils/mixvm_command.c index 0818abe..f85550a 100644 --- a/mixutils/mixvm_command.c +++ b/mixutils/mixvm_command.c @@ -1,7 +1,9 @@ /* -*-c-*- -------------- mixvm_command.c : * Implementation of the functions declared in mixvm_command.h * ------------------------------------------------------------------ - * Copyright (C) 2000, 2001 Free Software Foundation, Inc. + * $Id: mixvm_command.c,v 1.8 2002/04/08 00:32:32 jao Exp $ + * ------------------------------------------------------------------ + * Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -60,6 +62,7 @@ try_guile_ (char *line) # define try_guile_(ignored) FALSE #endif /* MAKE_GUILE */ +#include "mixvm_loop.h" #include "mixvm_command.h" /* mixvm dispatcher */ @@ -72,8 +75,10 @@ static gboolean cmd_##name (mix_vm_cmd_dispatcher_t *dis, const char *arg) DEC_FUN (shell_); DEC_FUN (quit_); +DEC_FUN (prompt_); mix_vm_command_info_t commands[] = { + { "prompt", cmd_prompt_, N_("Set command prompt"), "prompt PROMPT" }, { "shell", cmd_shell_, N_("Execute shell command"), "shell COMMAND" }, { "quit", cmd_quit_, N_("Quit the program"), "quit" }, { (char *)NULL, (Function *)NULL, (char *)NULL } @@ -167,7 +172,6 @@ cmd_quit_ (mix_vm_cmd_dispatcher_t *dis, const char *arg) return FALSE; } - static int cmd_shell_ (mix_vm_cmd_dispatcher_t *dis, const char *arg) { @@ -175,7 +179,13 @@ cmd_shell_ (mix_vm_cmd_dispatcher_t *dis, const char *arg) return TRUE; } - +static int +cmd_prompt_ (mix_vm_cmd_dispatcher_t *dis, const char *arg) +{ + if (arg && strlen (arg)) mix_vmloop_set_prompt (arg); + return TRUE; +} + /* external interface */ static void |