Handle multiple input characters at once.
This commit is contained in:
parent
9a3719817e
commit
0c3b7443d5
1 changed files with 19 additions and 21 deletions
22
tts.c
22
tts.c
|
|
@ -456,7 +456,6 @@ struct kevent64_s evs[2], rev;
|
||||||
struct timeval timeout;
|
struct timeval timeout;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
if (doexit)
|
if (doexit)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -509,16 +508,7 @@ struct kevent64_s evs[2], rev;
|
||||||
continue;
|
continue;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (GETCH(&c) == ERR) {
|
while (GETCH(&c) != ERR) {
|
||||||
if (doexit)
|
|
||||||
break;
|
|
||||||
if (time(NULL) - laststatus >= 2)
|
|
||||||
drawstatus(WIDE(""));
|
|
||||||
if (time(NULL) - lastsave > 60)
|
|
||||||
save();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef KEY_RESIZE
|
#ifdef KEY_RESIZE
|
||||||
if (c == KEY_RESIZE)
|
if (c == KEY_RESIZE)
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -530,13 +520,21 @@ struct kevent64_s evs[2], rev;
|
||||||
if (bi->bi_code != c)
|
if (bi->bi_code != c)
|
||||||
continue;
|
continue;
|
||||||
bi->bi_func->fn_hdl();
|
bi->bi_func->fn_hdl();
|
||||||
goto next;
|
goto next;;
|
||||||
}
|
}
|
||||||
|
|
||||||
drawstatus(WIDE("Unknown command."));
|
drawstatus(WIDE("Unknown command."));
|
||||||
next: ;
|
next: ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (doexit)
|
||||||
|
break;
|
||||||
|
if (time(NULL) - laststatus >= 2)
|
||||||
|
drawstatus(WIDE(""));
|
||||||
|
if (time(NULL) - lastsave > 60)
|
||||||
|
save();
|
||||||
|
}
|
||||||
|
|
||||||
save();
|
save();
|
||||||
endwin();
|
endwin();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue