Re: Telnet, <CR><LF>, etc.


Jerry F Aguirre (amdahl!oliveb!jerry@ames.arpa)
7 Aug 87 04:24:44 GMT


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



This archive was generated by hypermail 2.0b3 on Thu Mar 09 2000 - 14:38:49 GMT