summaryrefslogtreecommitdiffstats
path: root/console.c
diff options
context:
space:
mode:
Diffstat (limited to 'console.c')
-rw-r--r--console.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/console.c b/console.c
index 6c1ae53..4ab263d 100644
--- a/console.c
+++ b/console.c
@@ -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) {