From: Ben Harris Date: Sat, 15 Jan 2005 20:39:27 +0000 (+0000) Subject: Turn of ICRNL in the client tty when we're not in editing mode. This X-Git-Tag: 0.58~224 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=178a66ea0f5fc106d22955a0daea12a9d14ef624;p=PuTTY.git Turn of ICRNL in the client tty when we're not in editing mode. This 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] --- diff --git a/unix/uxplink.c b/unix/uxplink.c index 99acc6f4..88d580c7 100644 --- a/unix/uxplink.c +++ b/unix/uxplink.c @@ -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); }