diff options
Diffstat (limited to 'mbbsd/io.c')
-rw-r--r-- | mbbsd/io.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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()) |