Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!ll-xn!ames!amdahl!oliveb!jerry From: jerry@oliveb.UUCP (Jerry F Aguirre) Newsgroups: comp.protocols.tcp-ip Subject: Re: Telnet, , etc. Message-ID: <2631@oliveb.UUCP> Date: Fri, 7-Aug-87 00:24:44 EDT Article-I.D.: oliveb.2631 Posted: Fri Aug 7 00:24:44 1987 Date-Received: Sat, 8-Aug-87 18:06:43 EDT References: <8707311950.AA12026@opal.berkeley.edu> <555127536.0.CASNER@VENERA.ISI.EDU> Reply-To: jerry@oliveb.UUCP (Jerry F Aguirre) Distribution: world Organization: Olivetti ATC; Cupertino, Ca Lines: 21 Keywords: telnet pty newline Unix Summary: The mode of the pty defines the end of line character In article <555127536.0.CASNER@VENERA.ISI.EDU> CASNER@VENERA.ISI.EDU (Stephen Casner) writes: >You say that you could have mapped CR-LF to '\r', but that it would have >violated the philosophy of Unix that '\n' is the newline character. I >disagree, because the philosophy of Unix does not require that terminals >send '\n' to the tty driver; instead the tty driver receives '\r' from >the terminal and maps it to '\n' WHEN APPROPRIATE. Since telnetd does >not feed the application program directly, but rather feeds a pty, I >claim telnetd should map CR-LF to '\r' and let the pty driver map to >'\n' when appropriate. I agree. The telnet daemon is not talking to "Unix" but to the pty. For the pty driver linefeed is not necessarily the end of line character. The end of line character depends on the mode of the pty. I would add that the telnet daemon should map CR-LF to '\n' if the pty is in newline mode but should map it to '\r' if the mode is not newline. The user can then, either automatically (via getty), or explicitly (via stty), set the newline processing as appropriate for their terminal. This offers greater functionality with no loss that I can perceive. Jerry Aguirre