Added fake set-port-buffering which produces a warning

Added error-output-port, but not yet as deprecated-proc
set $current-noise-port to null-output
%move-fdport now returns #f on success, just like 0.5.1
This commit is contained in:
marting 1999-10-08 16:43:39 +00:00
parent 38dd943bf7
commit 734daac16f
1 changed files with 13 additions and 7 deletions

View File

@ -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)