if (dtr != -1) {
sr_spew("Setting DTR %s.", dtr ? "high" : "low");
- if (rts)
+ if (dtr)
dcb.fDtrControl = DTR_CONTROL_ENABLE;
else
dcb.fDtrControl = DTR_CONTROL_DISABLE;
return SR_ERR;
}
- /* Do not translate carriage return to newline on input. */
- term.c_iflag &= ~(ICRNL);
+ /* Turn off all serial port cooking. */
+ term.c_iflag &= ~(ISTRIP | INLCR | ICRNL);
+ term.c_oflag &= ~(ONLCR | OCRNL | ONOCR);
+#if !defined(__NetBSD__)
+ term.c_oflag &= ~OFILL;
+#endif
/* Disable canonical mode, and don't echo input characters. */
term.c_lflag &= ~(ICANON | ECHO);