aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2011-05-24 16:45:10 +0100
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2011-05-24 16:45:10 +0100
commitdad0e5019cce4f66dddf148eda4e8042d386f013 (patch)
tree300a039977a38075b4961ea926b465896a826b47
parent6b17f3f620d99670e915ae97f21d24cd765b7b4d (diff)
downloadtermo-dad0e5019cce4f66dddf148eda4e8042d386f013.tar.gz
termo-dad0e5019cce4f66dddf148eda4e8042d386f013.tar.xz
termo-dad0e5019cce4f66dddf148eda4e8042d386f013.zip
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
-rw-r--r--termkey.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/termkey.c b/termkey.c
index 3966d5a..c95dbf4 100644
--- a/termkey.c
+++ b/termkey.c
@@ -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);