diff --git a/scsh/newports.scm b/scsh/newports.scm index a74ae0c..4365ce3 100644 --- a/scsh/newports.scm +++ b/scsh/newports.scm @@ -33,9 +33,6 @@ (if (fdport-data:revealed fdport*) (vector-set! fdports ch-number fdport) (weak-vector-set! fdports ch-number fdport)))) -; (add-finalizer! -; fdport -; (lambda (the-port) (close-fdport* (fdport-data the-port)))))) (define (maybe-fdes->port fdes) (weak-vector-ref fdports fdes)) @@ -43,7 +40,7 @@ ;Hmm... these shouldn't be necessary. But still. ;Fake defrec routines for backwards compatibility. (define (fdport-data:fd fdport*) - (channel-os-index (channel-cell-ref (fdport-data:channel fdport*)))) + (channel-os-index (fdport-data:channel fdport*))) (define (fdport-data:closed? fdport*) (eq? (channel-status (fdport-data:channel fdport*)) @@ -143,6 +140,9 @@ (define fdport-data port-data) ; That was easy. +(define (set-port-buffering port policy . maybe-size) + (warn "JMG: use of set-port-buffering")) + ;;; Open & Close ;;; ------------ @@ -265,6 +265,11 @@ ;;; Initialise the system ;;; --------------------- +;;; JMG: should be deprecated-proc +(define error-output-port + current-error-port) + + (define old-inport #f) ; Just because. (define old-outport #f) (define old-errport #f) @@ -279,8 +284,8 @@ (set-fluid! $current-input-port (channel-port->input-fdport (current-input-port))) (set-fluid! $current-output-port (channel-port->output-fdport (current-output-port))) - (set-fluid! $current-error-port (channel-port->output-fdport (current-error-port)))) - + (set-fluid! $current-error-port (channel-port->output-fdport (current-error-port))) + (set-fluid! $current-noise-port (make-null-output-port))) ;;; Generic port operations ;;; ----------------------- @@ -322,7 +327,8 @@ ((if (input-port? port) make-input-fdchannel make-output-fdchannel) fd)) (vector-set! fdports fd old-vector-ref) (%set-cloexec fd (not new-revealed))) - (release-port-lock port)) + (release-port-lock port) + #f) ; JMG: It used to return #f on succes in 0.5.1, so we do the same (define (close-fdes fd) (evict-ports fd)