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/page.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/page.c')
-rw-r--r-- | mbbsd/page.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mbbsd/page.c b/mbbsd/page.c index ce6e6ea8..25d43eac 100644 --- a/mbbsd/page.c +++ b/mbbsd/page.c @@ -1,7 +1,7 @@ /* $Id$ */ #include "bbs.h" -#define hpressanykey(a) {move(22, 0); prints(a); pressanykey();} +#define hpressanykey(a) {move(22, 0); outs(a); pressanykey();} #define TITLE "\033[1;37;45m 火車查詢系統 \033[1;44;33m原作者:Heat\033[m" static void @@ -16,7 +16,7 @@ print_station(const char * const addr[6][100], int path, int *line, int *num) prints(" %2d.%-6s", (*num)+1, addr[path - 1][*num]); (*num)++; } - outs("\n"); + outc('\n'); (*line)++; }while(i==7); } @@ -79,7 +79,7 @@ main_railway() setutmpmode(RAIL_WAY); clear(); move(0, 25); - prints(TITLE); + outs(TITLE); move(1, 0); getdata(3, 0, "\033[1;35m你確定要搜尋嗎?[y/n]:\033[m", buf, 2, LCECHO); @@ -94,7 +94,7 @@ main_railway() clear(); move(0, 25); - prints(TITLE); + outs(TITLE); line = 3; print_station(addr, path, &line, &station_num); sprintf(genbuf, "\033[1;35m請輸入起站(1-%d):\033[m", station_num); |