added dfishers steal-port stuff
This commit is contained in:
parent
0cdf8896be
commit
20081c537b
|
@ -21,7 +21,9 @@
|
||||||
((channel-cell-closer channel-cell)
|
((channel-cell-closer channel-cell)
|
||||||
(channel-cell-ref channel-cell)))
|
(channel-cell-ref channel-cell)))
|
||||||
(lambda (channel-cell buffer start needed)
|
(lambda (channel-cell buffer start needed)
|
||||||
(channel-read buffer start needed (channel-cell-ref channel-cell)))))
|
(channel-read buffer start needed (channel-cell-ref channel-cell)))
|
||||||
|
(lambda (channel-cell owner)
|
||||||
|
(steal-channel! (channel-cell-ref) owner))))
|
||||||
|
|
||||||
(define (input-channel->port channel . maybe-buffer-size)
|
(define (input-channel->port channel . maybe-buffer-size)
|
||||||
(real-input-channel->port channel maybe-buffer-size close-input-channel))
|
(real-input-channel->port channel maybe-buffer-size close-input-channel))
|
||||||
|
@ -51,7 +53,9 @@
|
||||||
((channel-cell-closer channel-cell)
|
((channel-cell-closer channel-cell)
|
||||||
(channel-cell-ref channel-cell)))
|
(channel-cell-ref channel-cell)))
|
||||||
(lambda (channel-cell buffer start count)
|
(lambda (channel-cell buffer start count)
|
||||||
(channel-write buffer start count (channel-cell-ref channel-cell)))))
|
(channel-write buffer start count (channel-cell-ref channel-cell)))
|
||||||
|
(lambda (channel-cell owner)
|
||||||
|
(steal-channel! (channel-cell-ref channel-cell) owner))))
|
||||||
|
|
||||||
; Unbuffered channel output ports. Used for the default error port.
|
; Unbuffered channel output ports. Used for the default error port.
|
||||||
|
|
||||||
|
@ -65,7 +69,9 @@
|
||||||
(channel-cell-ref channel-cell)))
|
(channel-cell-ref channel-cell)))
|
||||||
(lambda (channel-cell char)
|
(lambda (channel-cell char)
|
||||||
(code-vector-set! buffer 0 (char->ascii char))
|
(code-vector-set! buffer 0 (char->ascii char))
|
||||||
(channel-write buffer 0 1 (channel-cell-ref channel-cell))))))
|
(channel-write buffer 0 1 (channel-cell-ref channel-cell)))
|
||||||
|
(lambda (channel-cell owner)
|
||||||
|
(steal-channel! (channel-cell-ref channel-cell) owner)))))
|
||||||
|
|
||||||
; Dispatch on the buffer size to make the appropriate port. A buffer
|
; Dispatch on the buffer size to make the appropriate port. A buffer
|
||||||
; size of zero creates an unbuffered port. Buffered output ports get a
|
; size of zero creates an unbuffered port. Buffered output ports get a
|
||||||
|
|
Loading…
Reference in New Issue