summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-03-12 13:42:52 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-03-12 13:42:52 +0800
commit786d63f533b3cd2ff6cda0ef1797fdace352561c (patch)
treeb654b75bfe80b0c2de54d92842958cca7ecde696
parent282e3972e1b6cb2345dd9c1281c5d3a2eb5614ca (diff)
downloadpttbbs-786d63f533b3cd2ff6cda0ef1797fdace352561c.tar
pttbbs-786d63f533b3cd2ff6cda0ef1797fdace352561c.tar.gz
pttbbs-786d63f533b3cd2ff6cda0ef1797fdace352561c.tar.bz2
pttbbs-786d63f533b3cd2ff6cda0ef1797fdace352561c.tar.lz
pttbbs-786d63f533b3cd2ff6cda0ef1797fdace352561c.tar.xz
pttbbs-786d63f533b3cd2ff6cda0ef1797fdace352561c.tar.zst
pttbbs-786d63f533b3cd2ff6cda0ef1797fdace352561c.zip
Remove unused strcpy().
Add bbsmail into Makefile variable CPROG_WITHOUT_UTIL git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1588 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/convert.c4
-rw-r--r--mbbsd/kaede.c3
-rw-r--r--util/Makefile5
3 files changed, 5 insertions, 7 deletions
diff --git a/mbbsd/convert.c b/mbbsd/convert.c
index 1fcb078f..f07e21db 100644
--- a/mbbsd/convert.c
+++ b/mbbsd/convert.c
@@ -31,7 +31,7 @@ static int utf8_read(int fd, void *buf, size_t count)
{
count = read(fd, buf, count);
if (count > 0) {
- strcpy(buf, utf8_uni(buf, &count, 0));
+ utf8_uni(buf, &count, 0);
uni2big(buf, &count, 0);
((char *)buf)[count] = 0;
}
@@ -40,7 +40,7 @@ static int utf8_read(int fd, void *buf, size_t count)
static int utf8_write(int fd, void *buf, size_t count)
{
- strcpy(buf, big2uni(buf, &count, 0));
+ big2uni(buf, &count, 0);
uni_utf8(buf, &count, 0);
((char *)buf)[count] = 0;
return write(fd, buf, count);
diff --git a/mbbsd/kaede.c b/mbbsd/kaede.c
index 486e5aef..9023557d 100644
--- a/mbbsd/kaede.c
+++ b/mbbsd/kaede.c
@@ -58,8 +58,7 @@ Ptt_prints(char *str, int mode)
}
}
strbuf[w] = 0;
- strcpy(str, strbuf);
- strip_ansi(str, str, mode);
+ strip_ansi(str, strbuf, mode);
return str;
}
diff --git a/util/Makefile b/util/Makefile
index 693ee50e..6f946f7a 100644
--- a/util/Makefile
+++ b/util/Makefile
@@ -29,7 +29,7 @@ CPROG_WITHOUT_UTIL= \
shmsweep uhash_loader showboard antispam \
countalldice webgrep bbsrf initbbs \
userlist tunepasswd buildir merge_passwd \
- merge_board xchatd
+ merge_board xchatd bbsmail
# 下面這些程式會被 install
PROGS= ${UTIL_OBJS} ${CPROG_WITH_UTIL} ${CPROG_WITHOUT_UTIL} \
@@ -37,8 +37,7 @@ PROGS= ${UTIL_OBJS} ${CPROG_WITH_UTIL} ${CPROG_WITHOUT_UTIL} \
openticket.sh stock.sh topsong.sh weather.sh \
stock.perl weather.perl toplazyBM.sh toplazyBBM.sh \
dailybackup.pl tarqueue.pl waterball.pl filtermail.pl \
- getbackup.pl udnnews.pl rebuildaloha.pl railway_wrapper.pl\
- bbsmail
+ getbackup.pl udnnews.pl rebuildaloha.pl railway_wrapper.pl
all: ${CPROG_WITH_UTIL} ${CPROG_WITHOUT_UTIL} ${PROGS}