From: Simon Tatham Date: Tue, 3 Oct 2006 17:16:26 +0000 (+0000) Subject: Disable a bunch of undesirable termios flags. ICRNL, in particular, X-Git-Tag: 0.59~67 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=e9ce146b9f9ce041ec066885fd60c45ae89e9e66;p=PuTTY.git Disable a bunch of undesirable termios flags. ICRNL, in particular, is liable to have been set on serial ports previously used as terminal devices, and definitely wants not to be set on serial ports being used for callout. [originally from svn r6865] --- diff --git a/unix/uxser.c b/unix/uxser.c index 463f4c43..d6471084 100644 --- a/unix/uxser.c +++ b/unix/uxser.c @@ -205,7 +205,16 @@ static const char *serial_configure(Serial serial, Config *cfg) options.c_cflag |= CLOCAL | CREAD; options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); - options.c_oflag &= ~OPOST; + options.c_iflag &= ~(ISTRIP | IGNCR | INLCR | ICRNL +#ifdef IUCLC + | IUCLC +#endif + ); + options.c_oflag &= ~(OPOST +#ifdef ONLCR + | ONLCR +#endif + | OCRNL | ONOCR | ONLRET); options.c_cc[VMIN] = 1; options.c_cc[VTIME] = 0;