diff options
Diffstat (limited to 'console.c')
-rw-r--r-- | console.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -55,11 +55,12 @@ void console_leave(struct console *cons, PANEL *pan) { cbreak(); } -void console_update(struct console *cons, PANEL *pan) { - ssize_t nb; +int console_update(struct console *cons, PANEL *pan) { char c; + int did_read = 0; - while ((nb = read(cons->master, &c, 1)) > 0) { + while (read(cons->master, &c, 1) > 0) { + did_read = 1; if (!cons->isesc) { if (c == 0x1b) { cons->isesc = 1; @@ -72,6 +73,8 @@ void console_update(struct console *cons, PANEL *pan) { } } } + + return did_read; } void console_input(struct console *cons, int ch) { |