summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2001-09-16 22:47:10 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2001-09-16 22:47:10 +0000
commitc9f4916f1f4024618055fc3402752f9fdeb18200 (patch)
tree6a3e954e080350a77b2ae815e9ed44768a56bd98
parent3aa406e62376d5bac34f8b3392b1836bf0bf5892 (diff)
downloadmdk-c9f4916f1f4024618055fc3402752f9fdeb18200.tar.gz
mdk-c9f4916f1f4024618055fc3402752f9fdeb18200.tar.bz2
virtual machine status
-rw-r--r--mixguile/xmixguile_cmd_dispatcher.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/mixguile/xmixguile_cmd_dispatcher.c b/mixguile/xmixguile_cmd_dispatcher.c
index 8eec209..83603aa 100644
--- a/mixguile/xmixguile_cmd_dispatcher.c
+++ b/mixguile/xmixguile_cmd_dispatcher.c
@@ -1,7 +1,7 @@
/* -*-c-*- -------------- xmixguile_cmd_dispatcher.c :
* Implementation of the functions declared in xmixguile_cmd_dispatcher.h
* ------------------------------------------------------------------
- * Last change: Time-stamp: "01/08/21 23:55:06 jao"
+ * $Id: xmixguile_cmd_dispatcher.c,v 1.7 2001/09/16 22:47:10 jao Exp $
* ------------------------------------------------------------------
* Copyright (C) 2001 Free Software Foundation, Inc.
*
@@ -82,6 +82,12 @@ mixvm_cmd_ (SCM cmd, SCM arg)
return SCM_UNSPECIFIED;
}
+static SCM
+mixvm_status_ (void)
+{
+ return gh_long2scm (mix_vm_get_run_status (vm_));
+}
+
static long
word_to_long_ (mix_word_t word)
{
@@ -333,7 +339,7 @@ mix_src_line_ (SCM opt)
SCM_ASSERT (line >= 0, opt, SCM_ARG1, "mix-src-line");
if (no > 0)
- line = mix_vm_cmd_dispatcher_get_src_file_line (vm_dispatcher_, no);
+ line = mix_vm_cmd_dispatcher_get_src_file_line (vm_dispatcher_, no, FALSE);
return gh_str02scm ((char *)line);
}
@@ -346,6 +352,7 @@ mix_src_line_no_ (void)
}
/* ----- hook functions ---- */
+
/* auxiliar arg list maker */
static SCM
make_arg_list_ (const gchar *arg)
@@ -511,6 +518,7 @@ mix_add_global_post_hook_ (SCM function)
/* NULL-terminated list of available scm commands */
const scm_command_t DEFAULT_SCM_COMMANDS_[] = {
{"mixvm-cmd", mixvm_cmd_, 2, 0, 0},
+ {"mixvm-status", mixvm_status_, 0, 0, 0},
{"mix-reg", mix_reg_, 1, 0, 0},
{"mix-set-reg!", mix_set_reg_, 2, 0, 0},
{"mix-cell", mix_cell_, 1, 0, 0},