From c9f4916f1f4024618055fc3402752f9fdeb18200 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 16 Sep 2001 22:47:10 +0000 Subject: virtual machine status --- mixguile/xmixguile_cmd_dispatcher.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'mixguile') 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}, -- cgit v1.2.3