From 7ae131cf0c3ff11a496b7295862125e3d6cd491d Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 1 Nov 1997 19:12:16 +0000 Subject: [PATCH] Change default line translation for TCP stream sockets. These almost always use CR/LF, regardless of the operating system. --- v7/src/runtime/io.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/v7/src/runtime/io.scm b/v7/src/runtime/io.scm index eb9f9a46b..fda662aa3 100644 --- a/v7/src/runtime/io.scm +++ b/v7/src/runtime/io.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: io.scm,v 14.50 1997/05/19 17:37:43 cph Exp $ +$Id: io.scm,v 14.51 1997/11/01 19:12:16 cph Exp $ Copyright (c) 1988-97 Massachusetts Institute of Technology @@ -601,7 +601,9 @@ MIT in each case. |# (if (or (default-object? line-translation) ;; Kludge because of DEFAULT-OBJECT?: (eq? 'DEFAULT line-translation)) - (os/default-end-of-line-translation) + (if (eq? 'TCP-STREAM-SOCKET (channel-type channel)) + "\r\n" + (os/default-end-of-line-translation)) line-translation))) (with-values (lambda () (output-buffer-sizes translation buffer-size)) (lambda (logical-size string-size) @@ -777,7 +779,9 @@ MIT in each case. |# (if (or (default-object? line-translation) ;; Kludge because of DEFAULT-OBJECT?: (eq? 'DEFAULT line-translation)) - (os/default-end-of-line-translation) + (if (eq? 'TCP-STREAM-SOCKET (channel-type channel)) + "\r\n" + (os/default-end-of-line-translation)) line-translation)) (string-size (input-buffer-size translation buffer-size))) (%make-input-buffer channel -- 2.25.1