diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-12-17 11:26:22 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-12-17 11:26:22 +0800 |
commit | f665f13b5bdcb87f19a0681481f6044cbcc109b9 (patch) | |
tree | 59dc95cf053cc3e4ee3cbabc18f218f78d866404 /mbbsd/io.c | |
parent | e12b8fb5f87d5bede1af88074cd6c85be93b121c (diff) | |
download | pttbbs-f665f13b5bdcb87f19a0681481f6044cbcc109b9.tar pttbbs-f665f13b5bdcb87f19a0681481f6044cbcc109b9.tar.gz pttbbs-f665f13b5bdcb87f19a0681481f6044cbcc109b9.tar.bz2 pttbbs-f665f13b5bdcb87f19a0681481f6044cbcc109b9.tar.lz pttbbs-f665f13b5bdcb87f19a0681481f6044cbcc109b9.tar.xz pttbbs-f665f13b5bdcb87f19a0681481f6044cbcc109b9.tar.zst pttbbs-f665f13b5bdcb87f19a0681481f6044cbcc109b9.zip |
- general message update and optimization
- change search_num() to getdata(), allow unified control
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3698 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
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()) |