From ee92ec9eeb638686391b9c9a8638a3f084f905b6 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 13 Sep 1995 19:56:13 +0000 Subject: [PATCH] Change MAKE-GENERIC-I/O-PORT to allow setting of input and output line translation independently. --- v7/src/runtime/genio.scm | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/v7/src/runtime/genio.scm b/v7/src/runtime/genio.scm index e8579f3ef..fda9c373f 100644 --- a/v7/src/runtime/genio.scm +++ b/v7/src/runtime/genio.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: genio.scm,v 1.5 1995/04/21 19:58:06 cph Exp $ +$Id: genio.scm,v 1.6 1995/09/13 19:56:13 cph Exp $ Copyright (c) 1991-95 Massachusetts Institute of Technology @@ -118,18 +118,23 @@ MIT in each case. |# (define (make-generic-i/o-port input-channel output-channel input-buffer-size output-buffer-size - #!optional line-translation) - (let ((line-translation - (if (default-object? line-translation) + #!optional input-line-translation + output-line-translation) + (let ((input-line-translation + (if (default-object? input-line-translation) 'DEFAULT - line-translation))) - (make-generic-port generic-i/o-template - (make-input-buffer input-channel - input-buffer-size - line-translation) - (make-output-buffer output-channel - output-buffer-size - line-translation)))) + input-line-translation))) + (let ((output-line-translation + (if (default-object? output-line-translation) + input-line-translation + output-line-translation))) + (make-generic-port generic-i/o-template + (make-input-buffer input-channel + input-buffer-size + input-line-translation) + (make-output-buffer output-channel + output-buffer-size + output-line-translation))))) (define (make-generic-port template input-buffer output-buffer) (let ((port (port/copy template (vector input-buffer output-buffer)))) -- 2.25.1