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/dark.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/dark.c')
-rw-r--r-- | mbbsd/dark.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mbbsd/dark.c b/mbbsd/dark.c index c567cced..03777a2e 100644 --- a/mbbsd/dark.c +++ b/mbbsd/dark.c @@ -163,7 +163,7 @@ draw_line(sint y, sint f) move(cury[y], 3); clrtoeol(); - prints("%s", buf); + outs(buf); } static void @@ -307,7 +307,7 @@ playing(sint fd, sint color, sint ch, sint * b, userinfo_t * uin) else rcount--; move(cur_eaty, cur_eatx); - prints("%s", (color) ? bname[brd[my][mx].value] : rname[brd[my][mx].value]); + outs((color) ? bname[brd[my][mx].value] : rname[brd[my][mx].value]); if (cur_eatx >= 26) { cur_eatx = 5; cur_eaty++; @@ -524,11 +524,11 @@ main_dark(int fd, userinfo_t * uin) if (currutmp->turn == 'w') { move(22, 0); clrtoeol(); - prints("[1;31m你贏了.. 真是恭喜~~[m"); + outs("[1;31m你贏了.. 真是恭喜~~[m"); } else { move(22, 0); clrtoeol(); - prints("[1;31m輸掉了啦.....下次讓他好看!![m"); + outs("[1;31m輸掉了啦.....下次讓他好看!![m"); } break; case -3: |