diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-01-29 00:10:37 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-01-29 00:10:37 +0100 |
commit | e26d9ffc4cdc69a2a329f6fb46cd065962657eeb (patch) | |
tree | cb98198bd4826b497d29d253e75f46164f8ed450 /term | |
parent | 8c9832096315a85f5b481305ee37c18cfd6fbf2a (diff) | |
download | hurd-e26d9ffc4cdc69a2a329f6fb46cd065962657eeb.tar.gz hurd-e26d9ffc4cdc69a2a329f6fb46cd065962657eeb.tar.bz2 hurd-e26d9ffc4cdc69a2a329f6fb46cd065962657eeb.zip |
Add compatibility with previous value of _POSIX_VDISABLE
Setting _POSIX_VDISABLE to -1 was actually not POSIX compliant, so it
was changed to '\0'. Keep the compatibility for now.
* term/munge.c (term/munge.c): Consider (unsigned char) -1 as
_POSIX_VDISABLE.
Diffstat (limited to 'term')
-rw-r--r-- | term/munge.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/term/munge.c b/term/munge.c index 242dd367..e0e90453 100644 --- a/term/munge.c +++ b/term/munge.c @@ -240,7 +240,9 @@ reprint_line () { short *cp; - if (termstate.c_cc[VREPRINT] != _POSIX_VDISABLE) + if (termstate.c_cc[VREPRINT] != _POSIX_VDISABLE + /* XXX: Remove this -1 compatibility later */ + && termstate.c_cc[VREPRINT] != (unsigned char) -1) echo_char (termstate.c_cc[VREPRINT], 0, 0); else echo_char (CHAR_DC2, 0, 0); @@ -346,7 +348,9 @@ input_character (int c) /* Check to see if we should send IXOFF */ if ((iflag & IXOFF) && !qavail (*qp) - && (cc[VSTOP] != _POSIX_VDISABLE)) + && (cc[VSTOP] != _POSIX_VDISABLE) + /* XXX: Remove this -1 compatibility later */ + && (cc[VSTOP] != (unsigned char) -1)) { poutput (cc[VSTOP]); termflags |= SENT_VSTOP; |