Use _POSIX_VDISABLE rather than hardcoded 0 to disable individual entries in termios.c_cc; most BSDs use 0xff rather than 0 for this value

This commit is contained in:
Paul LeoNerd Evans 2011-05-24 16:45:10 +01:00
parent 6b17f3f620
commit dad0e5019c

View File

@ -285,8 +285,8 @@ static TermKey *termkey_new_full(int fd, int flags, size_t buffsize, int waittim
termios.c_lflag &= ~ISIG;
else {
/* Disable Ctrl-\==VQUIT and Ctrl-D==VSUSP but leave Ctrl-C as SIGINT */
termios.c_cc[VQUIT] = 0;
termios.c_cc[VSUSP] = 0;
termios.c_cc[VQUIT] = _POSIX_VDISABLE;
termios.c_cc[VSUSP] = _POSIX_VDISABLE;
}
tcsetattr(fd, TCSANOW, &termios);