diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-06-10 15:08:55 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-06-10 15:08:55 +0800 |
commit | 7844305800a7a4781ac46777d429dbe667327911 (patch) | |
tree | 28e429be86f0ecc20cb7d30d95d054b420f09bc9 /mbbsd/announce.c | |
parent | 3b109adbea257408835589c45e0125f77064274c (diff) | |
download | pttbbs-7844305800a7a4781ac46777d429dbe667327911.tar pttbbs-7844305800a7a4781ac46777d429dbe667327911.tar.gz pttbbs-7844305800a7a4781ac46777d429dbe667327911.tar.bz2 pttbbs-7844305800a7a4781ac46777d429dbe667327911.tar.lz pttbbs-7844305800a7a4781ac46777d429dbe667327911.tar.xz pttbbs-7844305800a7a4781ac46777d429dbe667327911.tar.zst pttbbs-7844305800a7a4781ac46777d429dbe667327911.zip |
replace some prints() with outs(),
replace some outs() with outc(),
replace some fprintf() with fputs(),
and so on.
for performance.
and don't treat user input as format string.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2055 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/announce.c')
-rw-r--r-- | mbbsd/announce.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mbbsd/announce.c b/mbbsd/announce.c index 092723db..844a6f72 100644 --- a/mbbsd/announce.c +++ b/mbbsd/announce.c @@ -243,16 +243,16 @@ a_newitem(menu_t * pm, int mode) currboard[0], currboard, buf); break; case 1: - snprintf(lpath, sizeof(lpath), "%s%s/%c/%s", - BBSHOME, "/man/boards/", buf[0], buf); + snprintf(lpath, sizeof(lpath), BBSHOME "/man/boards/%c/%s", + buf[0], buf); break; case 2: - snprintf(lpath, sizeof(lpath), "%s%s%s", - BBSHOME, "/", buf); + snprintf(lpath, sizeof(lpath), BBSHOME "/%s", + buf); break; case 3: - snprintf(lpath, sizeof(lpath), "%s%s%s", - BBSHOME, "/etc/", buf); + snprintf(lpath, sizeof(lpath), BBSHOME "/etc/%s", + buf); break; } if (dashf(lpath)) { @@ -1093,7 +1093,7 @@ void BlogMain(int num) showtitle("部落格", genbuf); while( !exit ){ move(1, 0); - prints("請選擇您要執行的重作:\n" + outs("請選擇您要執行的重作:\n" "0.回到上一層\n" "1.製作部落格樣板格式\n" " 使用新的 config 目錄下樣板資料\n" |