From 23c0ec2222be9680dce65e51b9c19ba217ae83a8 Mon Sep 17 00:00:00 2001 From: victor Date: Thu, 8 Jan 2004 17:15:14 +0000 Subject: rm SUPPORT_GB code mv protos to convert.c rename Jaky_outs git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1476 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/convert.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'mbbsd/convert.c') diff --git a/mbbsd/convert.c b/mbbsd/convert.c index 1dd90308..1fcb078f 100644 --- a/mbbsd/convert.c +++ b/mbbsd/convert.c @@ -6,12 +6,19 @@ extern read_write_type write_type; extern read_write_type read_type; +unsigned char *gb2big(unsigned char *, int* , int); +unsigned char *big2gb(unsigned char *, int* , int); +unsigned char *utf8_uni(unsigned char *, int *, int); +unsigned char *uni_utf8(unsigned char *, int *, int); +unsigned char *uni2big(unsigned char *, int* , int); +unsigned char *big2uni(unsigned char *, int* , int); + static int gb_read(int fd, void *buf, size_t count) { - int len = read(fd, buf, count); - if (len > 0) - gb2big((char *)buf, &len, 0); - return len; + count = read(fd, buf, count); + if (count > 0) + gb2big((char *)buf, &count, 0); + return count; } static int gb_write(int fd, void *buf, size_t count) -- cgit v1.2.3