diff options
author | Andrey Nazarov <skuller@skuller.net> | 2012-07-27 16:53:32 +0400 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2012-07-27 16:53:32 +0400 |
commit | 88f63c6a3b6a4135a5de858ab6a57a2c7d9261b3 (patch) | |
tree | b9fcae9cfaba22acd52f7cfb8db808720cf9c9bf | |
parent | 1bb95d85e35156a4dd4097e0aac40f6fbad50ff3 (diff) |
Fix wrong TTY flags being cleared.
-rw-r--r-- | src/unix/system.c | 7 |
1 files 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; |