From d7fa5cbbd0f8b06c68926c29dff7934aee36d719 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 16 Sep 2001 22:42:16 +0000 Subject: header corrected --- mixguile/mixguile-vm-stat.scm | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) (limited to 'mixguile/mixguile-vm-stat.scm') 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)))) + + -- cgit v1.2.3