diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-12-26 17:46:04 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-12-26 17:46:04 +0800 |
commit | 36c134390f60ed96184dd3e3e7f6d28c2b5bbf5e (patch) | |
tree | ed2762e77057b325266f5413b4482d7b39a121c5 /mbbsd/guess.c | |
parent | 86618fc1fff4cc2379bd65fe113e5586f34b4bc5 (diff) | |
download | pttbbs-36c134390f60ed96184dd3e3e7f6d28c2b5bbf5e.tar pttbbs-36c134390f60ed96184dd3e3e7f6d28c2b5bbf5e.tar.gz pttbbs-36c134390f60ed96184dd3e3e7f6d28c2b5bbf5e.tar.bz2 pttbbs-36c134390f60ed96184dd3e3e7f6d28c2b5bbf5e.tar.lz pttbbs-36c134390f60ed96184dd3e3e7f6d28c2b5bbf5e.tar.xz pttbbs-36c134390f60ed96184dd3e3e7f6d28c2b5bbf5e.tar.zst pttbbs-36c134390f60ed96184dd3e3e7f6d28c2b5bbf5e.zip |
use gcc's extension to check format string
and make compiler happier
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@588 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/guess.c')
-rw-r--r-- | mbbsd/guess.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mbbsd/guess.c b/mbbsd/guess.c index 0d655108..bd32450c 100644 --- a/mbbsd/guess.c +++ b/mbbsd/guess.c @@ -1,4 +1,4 @@ -/* $Id: guess.c,v 1.6 2002/07/22 19:02:00 in2 Exp $ */ +/* $Id: guess.c,v 1.7 2002/12/26 09:46:04 kcwu Exp $ */ #include "bbs.h" #define LOGPASS BBSHOME "/etc/winguess.log" @@ -246,7 +246,7 @@ guess_main() Diff_Random(answer); move(2, 0); clrtoeol(); - prints("您下注 :%d Ptt$", money); + prints("您下注 :%lu Ptt$", money); getdata_str(4, 0, "您要和電腦比賽嗎? <y/n>[y]:", ifcomputer, sizeof(ifcomputer), LCECHO, "y"); @@ -292,7 +292,7 @@ guess_main() if (count > c_count) { prints("你輸給電腦了"); move(18, 35); - prints("你賠了 %d ", money); + prints("你賠了 %lu ", money); if ((file = fopen(LOGPASS, "a"))) { fprintf(file, "電腦第%d次猜中, ", c_count); if (youwin) @@ -308,7 +308,7 @@ guess_main() } else if (count < c_count) { prints("真厲害, 讓你賺到囉"); move(18, 35); - prints("你賺走了 %d ", money * 2); + prints("你賺走了 %lu ", money * 2); demoney(money * 2); if ((file = fopen(LOGPASS, "a"))) { fprintf(file, "id: %s, 第%d次猜中, 電腦第%d次猜中, " @@ -320,7 +320,7 @@ guess_main() pressanykey(); return 1; } else { - prints("真厲害, 和電腦打成平手了, 拿回本錢%d\n", money); + prints("真厲害, 和電腦打成平手了, 拿回本錢%lu\n", money); demoney(money); if ((file = fopen(LOGPASS, "a"))) { fprintf(file, "id: %s 和電腦打成了平手\n", cuser.userid); @@ -351,9 +351,9 @@ guess_main() prints("五次猜出來, 還你本錢吧"); move(18, 35); clrtoeol(); - prints("你拿回了%d Ptt$\n", money); + prints("你拿回了%lu Ptt$\n", money); if ((file = fopen(LOGPASS, "a"))) { - fprintf(file, "id: %s, 第%d次猜中, 拿回了本錢 %ld Ptt$\n", + fprintf(file, "id: %s, 第%d次猜中, 拿回了本錢 %lu Ptt$\n", cuser.userid, count, money); fclose(file); } |