summaryrefslogtreecommitdiffstats
path: root/mbbsd/io.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-17 11:26:22 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-17 11:26:22 +0800
commitf665f13b5bdcb87f19a0681481f6044cbcc109b9 (patch)
tree59dc95cf053cc3e4ee3cbabc18f218f78d866404 /mbbsd/io.c
parente12b8fb5f87d5bede1af88074cd6c85be93b121c (diff)
downloadpttbbs-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.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())