summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-12-26 17:46:04 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-12-26 17:46:04 +0800
commit36c134390f60ed96184dd3e3e7f6d28c2b5bbf5e (patch)
treeed2762e77057b325266f5413b4482d7b39a121c5 /mbbsd
parent86618fc1fff4cc2379bd65fe113e5586f34b4bc5 (diff)
downloadpttbbs-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')
-rw-r--r--mbbsd/edit.c5
-rw-r--r--mbbsd/gamble.c11
-rw-r--r--mbbsd/guess.c14
-rw-r--r--mbbsd/user.c4
4 files changed, 17 insertions, 17 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c
index 0d77f9a8..1107a6f1 100644
--- a/mbbsd/edit.c
+++ b/mbbsd/edit.c
@@ -1,4 +1,4 @@
-/* $Id: edit.c,v 1.22 2002/11/23 04:15:30 ptt Exp $ */
+/* $Id: edit.c,v 1.23 2002/12/26 09:46:04 kcwu Exp $ */
#include "bbs.h"
typedef struct textline_t {
struct textline_t *prev;
@@ -1575,7 +1575,7 @@ int
vedit(char *fpath, int saveheader, int *islocal)
{
FILE *fp1;
- char last = 0, buf[200]; /* the last key you press */
+ char last = 0; /* the last key you press */
int ch, foo;
int lastindent = -1;
int last_margin;
@@ -1649,6 +1649,7 @@ vedit(char *fpath, int saveheader, int *islocal)
}
/* �s��240��interval�@�� , �����O�b�İ]
if (count >= 240) {
+ char buf[200];
snprintf(buf, sizeof(buf), "\033[1;33;46m%s\033[37m�b\033[37;45m%s"
"\033[37m�O�H�k�ȿ� , %s\033[m", cuser.userid,
currboard, ctime(&now));
diff --git a/mbbsd/gamble.c b/mbbsd/gamble.c
index 836dbc25..8ade3999 100644
--- a/mbbsd/gamble.c
+++ b/mbbsd/gamble.c
@@ -1,4 +1,4 @@
-/* $Id: gamble.c,v 1.28 2002/07/22 19:02:00 in2 Exp $ */
+/* $Id: gamble.c,v 1.29 2002/12/26 09:46:04 kcwu Exp $ */
#include "bbs.h"
#ifndef _BBS_UTIL_C_
@@ -113,12 +113,11 @@ show_ticket_data(char *direct, int *price, boardheader_t * bh)
prints("\033[32m���W:\033[m 1.�i�ʶR�H�U���P�������m���C�C�i�n�� \033[32m%d\033[m ���C\n"
" 2.%s\n"
- " 3.�}���ɥu���@�رm������, ���ʶR�ӱm����, �h�i���ʶR���i�Ƨ���"
- "�`����C\n"
- " 4.�C�������Ѩt�Ω�� 5% ���|��%s�C\n\n"
+ " 3.�}���ɥu���@�رm������, ���ʶR�ӱm����, �h�i���ʶR���i�Ƨ����`����C\n"
+ " 4.�C�������Ѩt�Ω�� 5%% ���|��%s�C\n\n"
"\033[32m%s:\033[m", *price,
- bh ? "����L�ѪO�D�t�d�|��åB�M�w�}���ɶ����G, ��������, �@��A��C" :
- "�t�ΨC�� 2:00 11:00 16:00 21:00 �}���C",
+ bh ? "����L�ѪO�D�t�d�|��åB�M�w�}���ɶ����G, ��������, �@��A��C" :
+ "�t�ΨC�� 2:00 11:00 16:00 21:00 �}���C",
bh ? ", �䤤 2% �����}���O�D" : "",
bh ? "�O�D�ۭq�W�h�λ���" : "�e�X���}�����G");
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("�z�U�` :%d Ptt$", money);
+ prints("�z�U�` :%lu Ptt$", money);
getdata_str(4, 0, "�z�n�M�q�����ɶ�? <y/n>[y]:",
ifcomputer, sizeof(ifcomputer), LCECHO, "y");
@@ -292,7 +292,7 @@ guess_main()
if (count > c_count) {
prints("�A�鵹�q���F");
move(18, 35);
- prints("�A�ߤF %d ", money);
+ prints("�A�ߤF %lu ", money);
if ((file = fopen(LOGPASS, "a"))) {
fprintf(file, "�q����%d���q��, ", c_count);
if (youwin)
@@ -308,7 +308,7 @@ guess_main()
} else if (count < c_count) {
prints("�u�F�`, ���A�Ȩ��o");
move(18, 35);
- prints("�A�Ȩ��F %d ", money * 2);
+ prints("�A�Ȩ��F %lu ", money * 2);
demoney(money * 2);
if ((file = fopen(LOGPASS, "a"))) {
fprintf(file, "id: %s, ��%d���q��, �q����%d���q��, "
@@ -320,7 +320,7 @@ guess_main()
pressanykey();
return 1;
} else {
- prints("�u�F�`, �M�q����������F, ���^����%d\n", money);
+ prints("�u�F�`, �M�q����������F, ���^����%lu\n", money);
demoney(money);
if ((file = fopen(LOGPASS, "a"))) {
fprintf(file, "id: %s �M�q�������F����\n", cuser.userid);
@@ -351,9 +351,9 @@ guess_main()
prints("�����q�X��, �٧A�����a");
move(18, 35);
clrtoeol();
- prints("�A���^�F%d Ptt$\n", money);
+ prints("�A���^�F%lu Ptt$\n", money);
if ((file = fopen(LOGPASS, "a"))) {
- fprintf(file, "id: %s, ��%d���q��, ���^�F���� %ld Ptt$\n",
+ fprintf(file, "id: %s, ��%d���q��, ���^�F���� %lu Ptt$\n",
cuser.userid, count, money);
fclose(file);
}
diff --git a/mbbsd/user.c b/mbbsd/user.c
index d3501822..5de29e36 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -1,4 +1,4 @@
-/* $Id: user.c,v 1.42 2002/12/14 08:02:18 in2 Exp $ */
+/* $Id: user.c,v 1.43 2002/12/26 09:46:04 kcwu Exp $ */
#include "bbs.h"
static char *sex[8] = {
@@ -55,7 +55,7 @@ user_display(userec_t * u, int real)
" �~�����}: %s\n"
" �q�l�H�c: %s\n"
" �� �O: %s\n"
- " �Ȧ�b��: %ld �Ȩ�\n",
+ " �Ȧ�b��: %d �Ȩ�\n",
u->userid, u->username, u->realname, u->address, u->email,
sex[u->sex % 8], u->money);