From aed3b8cb4e1e9274df734b61844845ea0e33e79b Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Thu, 22 Jun 2000 20:50:55 +0000 Subject: [PATCH] cfmakeraw() is not posix --- lib/isc/unix/keyboard.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/isc/unix/keyboard.c b/lib/isc/unix/keyboard.c index ba0a1419d3..b7bc38c64c 100644 --- a/lib/isc/unix/keyboard.c +++ b/lib/isc/unix/keyboard.c @@ -53,7 +53,13 @@ isc_keyboard_open(isc_keyboard_t *keyboard) { current_mode = keyboard->saved_mode; - cfmakeraw(¤t_mode); + current_mode.c_iflag &= + ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON); + current_mode.c_oflag &= ~OPOST; + current_mode.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); + current_mode.c_cflag &= ~(CSIZE|PARENB); + current_mode.c_cflag |= CS8; + current_mode.c_cc[VMIN] = 1; current_mode.c_cc[VTIME] = 0; if (tcsetattr(fd, TCSAFLUSH, ¤t_mode) < 0) {