Changed terminal i/o for the bbs

This commit is contained in:
Michiel Broek
2004-11-03 20:48:45 +00:00
parent fd8eb8b6f3
commit 3fb35f698c
57 changed files with 6202 additions and 4999 deletions

View File

@@ -47,7 +47,7 @@ unsigned char readkey(int y, int x, int fg, int bg)
perror("open /dev/tty");
exit(MBERR_TTYIO_ERROR);
}
Setraw();
mbse_Setraw();
i = 0;
while (rc == -1) {
@@ -56,12 +56,12 @@ unsigned char readkey(int y, int x, int fg, int bg)
mbse_locate(y, x);
fflush(stdout);
rc = Waitchar(&ch, 5);
rc = mbse_Waitchar(&ch, 5);
if ((rc == 1) && (ch != KEY_ESCAPE))
break;
if ((rc == 1) && (ch == KEY_ESCAPE))
rc = Escapechar(&ch);
rc = mbse_Escapechar(&ch);
if (rc == 1)
break;
@@ -69,7 +69,7 @@ unsigned char readkey(int y, int x, int fg, int bg)
Nopper();
}
Unsetraw();
mbse_Unsetraw();
close(ttyfd);
return ch;
@@ -90,15 +90,15 @@ unsigned char testkey(int y, int x)
perror("open /dev/tty");
exit(MBERR_TTYIO_ERROR);
}
Setraw();
mbse_Setraw();
rc = Waitchar(&ch, 50);
rc = mbse_Waitchar(&ch, 50);
if (rc == 1) {
if (ch == KEY_ESCAPE)
rc = Escapechar(&ch);
rc = mbse_Escapechar(&ch);
}
Unsetraw();
mbse_Unsetraw();
close(ttyfd);
if (rc == 1)