]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Turn of ICRNL in the client tty when we're not in editing mode. This
authorBen Harris <bjh21@bjh21.me.uk>
Sat, 15 Jan 2005 20:39:27 +0000 (20:39 +0000)
committerBen Harris <bjh21@bjh21.me.uk>
Sat, 15 Jan 2005 20:39:27 +0000 (20:39 +0000)
means that we send literal CRs and let the remote pty layer work out what to
do with them, so that if it wants raw mode it can have it.

[originally from svn r5114]

unix/uxplink.c

index 99acc6f4bd1bd662e222a97bb7360cd185b7bacc..88d580c73f7b430a476b1c894c22844c02c01b6e 100644 (file)
@@ -129,10 +129,13 @@ void ldisc_update(void *frontend, int echo, int edit)
     else
        mode.c_lflag &= ~ECHO;
 
-    if (edit)
+    if (edit) {
+       mode.c_iflag |= ICRNL;
        mode.c_lflag |= ISIG | ICANON;
-    else
+    } else {
+       mode.c_iflag &= ~ICRNL;
        mode.c_lflag &= ~(ISIG | ICANON);
+    }
 
     tcsetattr(0, TCSANOW, &mode);
 }