Clear all POSIX.1-2017 local mode flags in tty.cfmakeraw().
Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
This commit is contained in:
parent
a68414222d
commit
3673a79bbc
11
Lib/tty.py
11
Lib/tty.py
|
@ -29,19 +29,16 @@ def cfmakeraw(mode):
|
||||||
INLCR | IGNCR | ICRNL | IXON | IXANY | IXOFF)
|
INLCR | IGNCR | ICRNL | IXON | IXANY | IXOFF)
|
||||||
|
|
||||||
# Do not post-process output.
|
# Do not post-process output.
|
||||||
mode[OFLAG] &= ~(OPOST)
|
mode[OFLAG] &= ~OPOST
|
||||||
|
|
||||||
# Disable parity generation and detection; clear character size mask;
|
# Disable parity generation and detection; clear character size mask;
|
||||||
# let character size be 8 bits.
|
# let character size be 8 bits.
|
||||||
mode[CFLAG] &= ~(PARENB | CSIZE)
|
mode[CFLAG] &= ~(PARENB | CSIZE)
|
||||||
mode[CFLAG] |= CS8
|
mode[CFLAG] |= CS8
|
||||||
|
|
||||||
# Do not echo characters (including NL); disable canonical input; disable
|
# Clear all POSIX.1-2017 local mode flags.
|
||||||
# the checking of characters against the special control characters INTR,
|
mode[LFLAG] &= ~(ECHO | ECHOE | ECHOK | ECHONL | ICANON |
|
||||||
# QUIT, and SUSP (disable sending of signals using control characters);
|
IEXTEN | ISIG | NOFLSH | TOSTOP)
|
||||||
# disable any implementation-defined special control characters not
|
|
||||||
# currently controlled by ICANON, ISIG, IXON, or IXOFF.
|
|
||||||
mode[LFLAG] &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN)
|
|
||||||
|
|
||||||
# POSIX.1-2017, 11.1.7 Non-Canonical Mode Input Processing,
|
# POSIX.1-2017, 11.1.7 Non-Canonical Mode Input Processing,
|
||||||
# Case B: MIN>0, TIME=0
|
# Case B: MIN>0, TIME=0
|
||||||
|
|
Loading…
Reference in New Issue