1 comment:
wanted.c_cflag &= ~(PARENB | CSTOPB | CSIZE | CRTSCTS);
wanted.c_cflag |= (CS8 | CLOCAL | CREAD);
wanted.c_lflag &= ~(ICANON | ECHO | ECHOE | ECHOK | ECHONL | ISIG | IEXTEN);
wanted.c_lflag &= ~(ECHOCTL | ECHOKE);
wanted.c_iflag &= ~(IXON | IXOFF | IXANY | ICRNL | IGNCR | INLCR);
wanted.c_iflag &= ~(PARMRK);
wanted.c_oflag &= ~OPOST;
It might be wise to start with cfmakeraw(3). Although it does not appear to be standardized by Open Group, I see cfmakeraw(3) available on my GNU/Linux installations.
https://nxr.netbsd.org/xref/src/lib/libc/termios/cfmakeraw.c#51
But, if you've covered all the bits that NetBSD's cfmakeraw(3) does, I have no objection.
To view, visit change 23693. To unsubscribe, or for help writing mail filters, visit settings.