From 88f63c6a3b6a4135a5de858ab6a57a2c7d9261b3 Mon Sep 17 00:00:00 2001 From: Andrey Nazarov Date: Fri, 27 Jul 2012 16:53:32 +0400 Subject: Fix wrong TTY flags being cleared. --- src/unix/system.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/unix/system.c b/src/unix/system.c index 481f1f8..33e8243 100644 --- a/src/unix/system.c +++ b/src/unix/system.c @@ -161,7 +161,8 @@ static void tty_init_input(void) tcgetattr(STDIN_FILENO, &tty_orig); tty = tty_orig; - tty.c_lflag &= ~(ECHO | ICANON | INPCK | ISTRIP); + tty.c_iflag &= ~(INPCK | ISTRIP); + tty.c_lflag &= ~(ICANON | ECHO); tty.c_cc[VMIN] = 1; tty.c_cc[VTIME] = 0; tcsetattr(STDIN_FILENO, TCSADRAIN, &tty); @@ -399,13 +400,13 @@ static void tty_parse_input(const char *text) #if 0 case 'C': if (f->text[f->cursorPos]) { - Sys_ConsoleWrite("\033[C", 3); + stdout_write("\033[C", 3); f->cursorPos++; } break; case 'D': if (f->cursorPos) { - Sys_ConsoleWrite("\033[D", 3); + stdout_write("\033[D", 3); f->cursorPos--; } break; -- cgit v1.2.3