Change API for getch to make it the caller's responsibility to poll for

input, allowing it to do other stuff if it wants to.
This commit is contained in:
2011-06-04 19:28:59 +00:00
parent 9f79b3d82e
commit fa84a1b8bb
3 changed files with 10 additions and 12 deletions

3
main.c
View File

@@ -172,7 +172,8 @@ int main(void) {
while (1) {
char c;
putstr("prompt> ");
c = getch();
while (!getch(&c))
FP0XVAL ^= 0x04000000;
if (c == 0x0a)
continue;
putch(c);