From 308ad7194aa1632322c33d695198fefd7d4f3b79 Mon Sep 17 00:00:00 2001 From: kcwu Date: Sat, 16 Oct 2004 09:04:53 +0000 Subject: strip none-big5 char in user's nick git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2257 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- include/proto.h | 2 +- mbbsd/io.c | 33 +++++++++++++++++++++++++-------- mbbsd/mbbsd.c | 2 +- 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/include/proto.h b/include/proto.h index 221b71f0..68b39f86 100644 --- a/include/proto.h +++ b/include/proto.h @@ -288,7 +288,7 @@ int getdata_buf(int line, int col, char *prompt, char *buf, int len, int echo); void add_io(int fd, int timeout); void oflush(void); int strip_ansi(char *buf, char *str, int mode); -void strip_iac(unsigned char *str, int maxlen); +void strip_nonebig5(unsigned char *str, int maxlen); int oldgetdata(int line, int col, char *prompt, char *buf, int len, int echo); void output(char *s, int len); int num_in_buf(void); diff --git a/mbbsd/io.c b/mbbsd/io.c index 57d639c2..1f7658f2 100644 --- a/mbbsd/io.c +++ b/mbbsd/io.c @@ -485,16 +485,33 @@ strip_ansi(char *buf, char *str, int mode) } void -strip_iac(unsigned char *str, int maxlen) +strip_nonebig5(unsigned char *str, int maxlen) { - int i,len=0; - - for(i=0;i