Bill Nowicki (nowicki@Sun.COM)
Thu, 6 Aug 87 17:54:57 PDT
My two cents worth on this subject:
In SunOS 3.4 I changed the telnet daemon to send \r instead of \n to
the pty when it gets <CR><LF>. However, this broke the local line edit
mode. In SunOS 4.0 I originally put in a check to see if local editing
was being done, and if so sent \n to the pty, otherwise \r. Steve
Casner's message, however, convinced me that a slightly cleaner fix
would be to just keep the pty in the mode that treats \r as \n when
doing local editing. I don't understand the rationale behind the code
that explicitly cleared it.
The change is simple (your line numbers may vary). In the function
< case TELOPT_ECHO:
< * we should stop echoing, since the client side will be doing it,
< * but keep mapping CR since CR-LF will be mapped to it.
< mode(0, ECHO);
--- > case TELOPT_ECHO: /* we should stop echoing */ > mode(0, ECHO|CRMOD);
This, in combination with the change from \n to \r for incoming <CR><LF>s seems to work for most telnets in both line and character modes.
This archive was generated by hypermail 2.0b3 on Thu Mar 09 2000 - 14:38:49 GMT