From: simon Date: Tue, 3 Oct 2006 17:16:26 +0000 (+0000) Subject: Disable a bunch of undesirable termios flags. ICRNL, in particular, X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/9a41f8d3877bc717e3eec330637122c390dc4240 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. git-svn-id: svn://svn.tartarus.org/sgt/putty@6865 cda61777-01e9-0310-a592-d414129be87e --- 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;