diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2001-09-04 02:35:53 +0000 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2001-09-04 02:35:53 +0000 |
commit | a7411eadf4c79ee6298a31d90d13327d98fa8801 (patch) | |
tree | ea45cfad461657f71f39600c4ea41c36ddbd694a | |
parent | 68f6d854c06fa3c8c4aa6dd527fc55df2c0eceb2 (diff) | |
download | mdk-a7411eadf4c79ee6298a31d90d13327d98fa8801.tar.gz mdk-a7411eadf4c79ee6298a31d90d13327d98fa8801.tar.bz2 |
vm status guile commands
-rw-r--r-- | mixguile/mixguile-vm-stat.scm | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/mixguile/mixguile-vm-stat.scm b/mixguile/mixguile-vm-stat.scm new file mode 100644 index 0000000..5bd8233 --- /dev/null +++ b/mixguile/mixguile-vm-stat.scm @@ -0,0 +1,48 @@ +;; -*-scheme-*- -------------- mixguile-commands.scm : +; mixvm status functions +; ------------------------------------------------------------------ +; Last change: Time-stamp: "01/09/04 04:25:40 jao" +; ------------------------------------------------------------------ +; Copyright (C) 2001 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 +; the Free Software Foundation; either version 2 of the License, or +; (at your option) any later version. +; +; This program is distributed in the hope that it will be useful, +; but WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with this program; if not, write to the Free Software +; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +; +;; + +;; possible status index +(define mix-status-values (vector 'MIX_ERROR + 'MIX_BREAK + 'MIX_COND_BREAK + 'MIX_HALTED + 'MIX_RUNNING + 'MIX_LOADED + 'MIX_EMPTY)) +;; return status as a simbol +(define mix-vm-status (lambda () (vector-ref mix-status-values (mixvm-status)))) + +;; check for a given status +(define mix-vm-status? + (lambda (status) (eq? status (mix-vm-status)))) + +;; predicates for each possible status +(define mix-vm-status-error? (lambda () (mix-vm-status? 'MIX_ERROR))) +(define mix-vm-status-break? (lambda () (mix-vm-status? 'MIX_BREAK))) +(define mix-vm-status-cond-break? (lambda () (mix-vm-status? 'MIX_COND_BREAK))) +(define mix-vm-status-halted? (lambda () (mix-vm-status? 'MIX_HALTED))) +(define mix-vm-status-running? (lambda () (mix-vm-status? 'MIX_RUNNING))) +(define mix-vm-status-loaded? (lambda () (mix-vm-status? 'MIX_LOADED))) +(define mix-vm-status-empty? (lambda () (mix-vm-status? 'MIX_EMPTY))) + + |