From 7927367f491153da54a7622413f17068b2781f5a Mon Sep 17 00:00:00 2001 From: marting Date: Fri, 8 Oct 1999 18:38:10 +0000 Subject: [PATCH] jsut small fixes and comments --- scsh/event.scm | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/scsh/event.scm b/scsh/event.scm index aab95cf..e03c2f8 100644 --- a/scsh/event.scm +++ b/scsh/event.scm @@ -47,20 +47,21 @@ ;;; extensions by JMG +;;; takes list of interrupt/xxx's +;;; blocks until one of the interrupts in the set occurs (define (wait-interrupt-set set pre-event) (let ((event (next-event pre-event))) (if (memq (event-type event) set) event - (wait-interrupt set event)))) + (wait-interrupt-set set event)))) ; would need placeholder-queue exported.. - -(define (placeholder-value-set? placeholder) - (not (placeholder-queue placeholder))) +;(define (placeholder-value-set? placeholder) +; (not (placeholder-queue placeholder))) (define (most-recent-event? event) - (eq? event most-recent-event)) + (eq? event (most-recent-event))) (define (nonblockwait-interrupt type event ) (general-nonblockwait-interrupt type event eq?)) @@ -68,10 +69,10 @@ (define (nonblockwait-interrupt-set set event ) (general-nonblockwait-interrupt set event memq)) -(define (general-nonblockwait-interrupt waiting-for event compare) - (if (most-recent-event? event) +(define (general-nonblockwait-interrupt waiting-for pre-event compare?) + (if (most-recent-event? pre-event) #f (let ((event (next-event pre-event))) - (if (compare (event-type event) waiting-for) + (if (compare? (event-type event) waiting-for) event - (nonblockwait-interrupt type event))))) + (general-nonblockwait-interrupt waiting-for event compare?)))))