summaryrefslogtreecommitdiffstats
path: root/mbbsd/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/io.c')
-rw-r--r--mbbsd/io.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/mbbsd/io.c b/mbbsd/io.c
index 1c3f9e7a..bd4c89df 100644
--- a/mbbsd/io.c
+++ b/mbbsd/io.c
@@ -61,12 +61,16 @@ oflush(void)
}
}
+// deprecated?
+#if 0
void
init_buf(void)
{
-
memset(inbuf, 0, IBUFSIZE);
+ ibufsize = icurrchar = 0;
}
+#endif
+
void
output(const char *s, int len)
{
@@ -260,7 +264,7 @@ _debug_check_keyinput()
move(b_lines, 0);
if(dbcsaware)
{
- prints( ANSI_COLOR(7) "游標在此" ANSI_RESET
+ outs( ANSI_COLOR(7) "游標在此" ANSI_RESET
" 測試中文模式會不會亂送鍵。 'q' 離開, 'd' 回英文模式 ");
move(b_lines, 4);
} else {
@@ -870,6 +874,11 @@ oldgetdata(int line, int col, const char *prompt, char *buf, int len, int echo)
case KEY_UNKNOWN:
break;
default:
+ if (echo == NUMECHO && !isdigit(ch))
+ {
+ bell();
+ break;
+ }
if (isprint2(ch) && clen < len && x + clen < scr_cols) {
#ifdef DBCSAWARE
if(ISDBCSAWARE())