-
-
Couldn't load subscription status.
- Fork 299
improve & fix libc termios bindings #2372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
We need to retain the old names for backwards compatibility, but please annotate them with |
|
I've added operator overloads that depend on #2374 with the old constants to have almost full backwards compatibility (it won't work if someone stored the flags in a something like this (example from my old project): term.c_lflag &= ~(termios::ECHO | termios::ICANON | termios::ISIG | termios::IEXTEN);
term.c_iflag &= ~(termios::IXON | termios::ICRNL | termios::BRKINT | termios::INPCK | termios::ISTRIP);
term.c_oflag &= ~(termios::OPOST);
term.c_cflag |= (termios::CS8);will work properly (after the operator overload bug is fixed), and behave exactly the same as this: term.c_lflag &= ~(Tc_lflags){.echo, .icanon, .isig, .iexten};
term.c_iflag &= ~(Tc_iflags){.ixon, .icrnl, .brkint, .inpck, .istrip};
term.c_oflag.opost = false;
term.c_cflag.csize = CS8; |
|
I've changed it so the deprecated constants use bitstructs instead of relying on operator overloading that shouldn't work. |
|
Thank you! |
Speedconstants and many of theTcflags)Tcflagsto bitstructsafter doing some testing with the termios flags things seem to work fine.