+ Check arguments of select-ports/port-channels

+ Fix typo in really-select-port-channels
This commit is contained in:
mainzelm 2002-12-06 12:53:55 +00:00
parent 923ada9986
commit e47611a0ae
1 changed files with 11 additions and 1 deletions

View File

@ -949,7 +949,15 @@
(values n-read-ready n-write-ready 0)))))))))
(define (verify-select-port-arguments! proc lst)
(for-each (lambda (p)
(or (input-port? p)
(output-port? p)
(call-error "Argument not a port" proc p)))
lst))
(define (select-ports timeout . ports)
(verify-select-port-arguments! select-ports ports)
(let ((read-list (filter input-port? ports))
(write-list (filter output-port? ports)))
@ -969,6 +977,7 @@
(really-select-port-channels timeout read-list write-list)))))
(define (select-port-channels timeout . ports)
(verify-select-port-arguments! select-ports ports)
(let ((read-list (filter input-port? ports))
(write-list (filter output-port? ports)))
@ -1007,5 +1016,6 @@
(filter (lambda (write-port)
(any (lambda (write-channel)
(eq? write-channel
(port/fdes->output-channel write-port)))))
(port/fdes->output-channel write-port)))
ready-write-channels))
write-list))))))