diff --git a/scsh/newports.scm b/scsh/newports.scm index 54d56f3..b73e63e 100644 --- a/scsh/newports.scm +++ b/scsh/newports.scm @@ -631,6 +631,9 @@ (define (with-current-error-port* port thunk) (let-fluid $current-error-port port thunk)) +(define (with-error-output-port* port thunk) + (let-fluid $current-error-port port thunk)) + (define-simple-syntax (with-current-input-port port body ...) (with-current-input-port* port (lambda () body ...))) @@ -640,6 +643,8 @@ (define-simple-syntax (with-current-error-port port body ...) (with-current-error-port* port (lambda () body ...))) +(define-simple-syntax (with-error-output-port port body ...) + (with-error-output-port* port (lambda () body ...))) ;;; set-foo-port! procs ;;; ------------------- @@ -648,6 +653,7 @@ (define (set-current-input-port! port) (set-fluid! $current-input-port port)) (define (set-current-output-port! port) (set-fluid! $current-output-port port)) (define (set-current-error-port! port) (set-fluid! $current-error-port port)) +(define (set-error-output-port! port) (set-fluid! $current-error-port port)) ;;; call-with-foo-file with-foo-to-file diff --git a/scsh/scsh-interfaces.scm b/scsh/scsh-interfaces.scm index 7eaf64a..160805a 100644 --- a/scsh/scsh-interfaces.scm +++ b/scsh/scsh-interfaces.scm @@ -191,9 +191,12 @@ (with-current-output-port :syntax) with-current-error-port* (with-current-error-port :syntax) + with-error-output-port* + (with-error-output-port :syntax) set-current-input-port! set-current-output-port! set-current-error-port! + set-error-output-port! stdports->stdio stdio->stdports