summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2001-09-16 22:42:16 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2001-09-16 22:42:16 +0000
commitd7fa5cbbd0f8b06c68926c29dff7934aee36d719 (patch)
tree18863b86e27bd2d73f540a6a0a78b53ee836ac75
parent64fe592b3d1d56841f9160ae20dcada6f2f9df0f (diff)
downloadmdk-d7fa5cbbd0f8b06c68926c29dff7934aee36d719.tar.gz
mdk-d7fa5cbbd0f8b06c68926c29dff7934aee36d719.tar.bz2
header corrected
-rw-r--r--mixguile/mixguile-vm-stat.scm41
1 files changed, 32 insertions, 9 deletions
diff --git a/mixguile/mixguile-vm-stat.scm b/mixguile/mixguile-vm-stat.scm
index 9b401ee..71dfe46 100644
--- a/mixguile/mixguile-vm-stat.scm
+++ b/mixguile/mixguile-vm-stat.scm
@@ -1,7 +1,7 @@
-;; -*-scheme-*- -------------- mixguile-commands.scm :
+;; -*-scheme-*- -------------- mixguile-vm-stat.scm :
; mixvm status functions
; ------------------------------------------------------------------
-; $Id: mixguile-vm-stat.scm,v 1.2 2001/09/04 02:36:37 jao Exp $
+; $Id: mixguile-vm-stat.scm,v 1.3 2001/09/16 22:42:16 jao Exp $
; ------------------------------------------------------------------
; Copyright (C) 2001 Free Software Foundation, Inc.
;
@@ -37,12 +37,35 @@
(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)))
+(define mix-vm-error? (lambda () (mix-vm-status? 'MIX_ERROR)))
+(define mix-vm-break? (lambda () (mix-vm-status? 'MIX_BREAK)))
+(define mix-vm-cond-break? (lambda () (mix-vm-status? 'MIX_COND_BREAK)))
+(define mix-vm-halted? (lambda () (mix-vm-status? 'MIX_HALTED)))
+(define mix-vm-running? (lambda () (mix-vm-status? 'MIX_RUNNING)))
+(define mix-vm-loaded? (lambda () (mix-vm-status? 'MIX_LOADED)))
+(define mix-vm-empty? (lambda () (mix-vm-status? 'MIX_EMPTY)))
+;; define hooks on break conditions
+
+(define mix-make-conditional-hook
+ (lambda (test hook)
+ (lambda (arglist)
+ (if (test) (hook (mix-src-line-no) (mix-loc))))))
+
+(define mix-add-run-next-hook
+ (lambda (hook)
+ (mix-add-post-hook 'run hook)
+ (mix-add-post-hook 'next hook)))
+
+
+(define mix-add-break-hook
+ (lambda (hook)
+ (mix-add-run-next-hook (mix-make-conditional-hook mix-vm-break? hook))))
+
+(define mix-add-cond-break-hook
+ (lambda (hook)
+ (mix-add-run-next-hook (mix-make-conditional-hook
+ mix-vm-cond-break? hook))))
+
+