diff options
Diffstat (limited to 'coreutils/stty.c')
-rw-r--r-- | coreutils/stty.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/coreutils/stty.c b/coreutils/stty.c index 0cb4fb234..e28e15c97 100644 --- a/coreutils/stty.c +++ b/coreutils/stty.c | |||
@@ -1110,16 +1110,16 @@ static void set_mode(const struct mode_info *info, int reversed, | |||
1110 | if (reversed) | 1110 | if (reversed) |
1111 | mode->c_cflag = (mode->c_cflag & ~PARENB & ~CSIZE) | CS8; | 1111 | mode->c_cflag = (mode->c_cflag & ~PARENB & ~CSIZE) | CS8; |
1112 | else | 1112 | else |
1113 | mode->c_cflag = (mode->c_cflag & ~PARODD & ~CSIZE) | PARENB | CS7; | 1113 | mode->c_cflag = (mode->c_cflag & ~PARODD & ~CSIZE) | PARENB | CS7; |
1114 | } else if (info == &mode_info[IDX_oddp]) { | 1114 | } else if (info == &mode_info[IDX_oddp]) { |
1115 | if (reversed) | 1115 | if (reversed) |
1116 | mode->c_cflag = (mode->c_cflag & ~PARENB & ~CSIZE) | CS8; | 1116 | mode->c_cflag = (mode->c_cflag & ~PARENB & ~CSIZE) | CS8; |
1117 | else | 1117 | else |
1118 | mode->c_cflag = (mode->c_cflag & ~CSIZE) | CS7 | PARODD | PARENB; | 1118 | mode->c_cflag = (mode->c_cflag & ~CSIZE) | CS7 | PARODD | PARENB; |
1119 | } else if (info == &mode_info[IDX_nl]) { | 1119 | } else if (info == &mode_info[IDX_nl]) { |
1120 | if (reversed) { | 1120 | if (reversed) { |
1121 | mode->c_iflag = (mode->c_iflag | ICRNL) & ~INLCR & ~IGNCR; | 1121 | mode->c_iflag = (mode->c_iflag | ICRNL) & ~INLCR & ~IGNCR; |
1122 | mode->c_oflag = (mode->c_oflag | ONLCR) & ~OCRNL & ~ONLRET; | 1122 | mode->c_oflag = (mode->c_oflag | ONLCR) & ~OCRNL & ~ONLRET; |
1123 | } else { | 1123 | } else { |
1124 | mode->c_iflag = mode->c_iflag & ~ICRNL; | 1124 | mode->c_iflag = mode->c_iflag & ~ICRNL; |
1125 | if (ONLCR) mode->c_oflag = mode->c_oflag & ~ONLCR; | 1125 | if (ONLCR) mode->c_oflag = mode->c_oflag & ~ONLCR; |