summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-11-02 19:02:44 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-11-02 19:02:44 +0800
commit2dc136d20bd5963cc7827f1383c45d7ff62f2738 (patch)
tree583f67ea53d88718b1a7114f23bb6df6d9ffdd2f
parent87e05ea3f3ac90f87736bff8141e245bf5572595 (diff)
downloadpttbbs-2dc136d20bd5963cc7827f1383c45d7ff62f2738.tar
pttbbs-2dc136d20bd5963cc7827f1383c45d7ff62f2738.tar.gz
pttbbs-2dc136d20bd5963cc7827f1383c45d7ff62f2738.tar.bz2
pttbbs-2dc136d20bd5963cc7827f1383c45d7ff62f2738.tar.lz
pttbbs-2dc136d20bd5963cc7827f1383c45d7ff62f2738.tar.xz
pttbbs-2dc136d20bd5963cc7827f1383c45d7ff62f2738.tar.zst
pttbbs-2dc136d20bd5963cc7827f1383c45d7ff62f2738.zip
warning free
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@550 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--util/BM_money.c3
-rw-r--r--util/birth.c1
-rw-r--r--util/horoscope.c3
-rw-r--r--util/indexuser.c8
-rw-r--r--util/jungo.c3
-rw-r--r--util/openticket.c3
-rw-r--r--util/reaper.c3
-rw-r--r--util/toplazyBBM.c3
-rw-r--r--util/toplazyBM.c3
-rw-r--r--util/topusr.c4
-rw-r--r--util/userlist.c4
-rw-r--r--util/util_passwd.c4
-rw-r--r--util/util_record.c3
-rw-r--r--util/yearsold.c4
14 files changed, 30 insertions, 19 deletions
diff --git a/util/BM_money.c b/util/BM_money.c
index db7b1538..e2ed960f 100644
--- a/util/BM_money.c
+++ b/util/BM_money.c
@@ -1,7 +1,8 @@
-/* $Id: BM_money.c,v 1.5 2002/06/19 13:38:01 lwms Exp $ */
+/* $Id: BM_money.c,v 1.6 2002/11/02 11:02:44 in2 Exp $ */
/* 給板主錢的程式 */
+#define _UTIL_C_
#include "bbs.h"
#define FUNCTION (2100 - c*5)
diff --git a/util/birth.c b/util/birth.c
index 5c13c54f..23272d6f 100644
--- a/util/birth.c
+++ b/util/birth.c
@@ -1,5 +1,6 @@
/* 壽星程式 96 10/11 */
+#define _UTIL_C_
#include "bbs.h"
#define OUTFILE BBSHOME "/etc/birth.today"
diff --git a/util/horoscope.c b/util/horoscope.c
index f1183591..53d69e31 100644
--- a/util/horoscope.c
+++ b/util/horoscope.c
@@ -1,4 +1,5 @@
-/* $Id: horoscope.c,v 1.2 2002/06/06 21:34:14 in2 Exp $ */
+/* $Id: horoscope.c,v 1.3 2002/11/02 11:02:44 in2 Exp $ */
+#define _UTIL_C_
#include "bbs.h"
struct userec_t cuser;
diff --git a/util/indexuser.c b/util/indexuser.c
index 3668269a..8b39fdd0 100644
--- a/util/indexuser.c
+++ b/util/indexuser.c
@@ -1,3 +1,5 @@
+/* $Id: indexuser.c,v 1.5 2002/11/02 11:02:44 in2 Exp $ */
+#define _UTIL_C_
#include "bbs.h"
#define INDEXPATH BBSHOME"/index"
@@ -36,17 +38,17 @@ int main()
if(u.realname[0])
{
sprintf(buf,INDEXPATH"/realname/%X",string_hash(u.realname));
- append_record(buf, &j, sizeof(j));
+ append_record(buf, (fileheader_t*)&j, sizeof(j));
}
if(u.email[0])
{
sprintf(buf,INDEXPATH"/email/%X",string_hash(u.email));
- append_record(buf, &j, sizeof(j));
+ append_record(buf, (fileheader_t*)&j, sizeof(j));
}
if(u.ident[0])
{
sprintf(buf,INDEXPATH"/ident/%X",string_hash(u.ident));
- append_record(buf, &j, sizeof(j));
+ append_record(buf, (fileheader_t*)&j, sizeof(j));
}
}
return 0;
diff --git a/util/jungo.c b/util/jungo.c
index 6221023b..4c7c2d94 100644
--- a/util/jungo.c
+++ b/util/jungo.c
@@ -1,4 +1,5 @@
-/* $Id: jungo.c,v 1.5 2002/06/19 13:38:01 lwms Exp $ */
+/* $Id: jungo.c,v 1.6 2002/11/02 11:02:44 in2 Exp $ */
+#define _UTIL_C_
#include "bbs.h"
#define OUTFILE BBSHOME "/etc/toplazyBBM"
diff --git a/util/openticket.c b/util/openticket.c
index 643c55fb..55e04b0e 100644
--- a/util/openticket.c
+++ b/util/openticket.c
@@ -1,5 +1,6 @@
-/* $Id: openticket.c,v 1.8 2002/06/16 22:21:12 ptt Exp $ */
+/* $Id: openticket.c,v 1.9 2002/11/02 11:02:44 in2 Exp $ */
/* 開獎的 utility */
+#define _UTIL_C_
#include "bbs.h"
static char *betname[8] = {"Ptt", "Jaky", "Action", "Heat",
diff --git a/util/reaper.c b/util/reaper.c
index d605bb70..9ed1b11f 100644
--- a/util/reaper.c
+++ b/util/reaper.c
@@ -1,4 +1,5 @@
-/* $Id: reaper.c,v 1.2 2002/06/06 21:34:14 in2 Exp $ */
+/* $Id: reaper.c,v 1.3 2002/11/02 11:02:44 in2 Exp $ */
+#define _UTIL_C_
#include "bbs.h"
time_t now;
diff --git a/util/toplazyBBM.c b/util/toplazyBBM.c
index 076e6cc0..1b12eab9 100644
--- a/util/toplazyBBM.c
+++ b/util/toplazyBBM.c
@@ -1,4 +1,5 @@
-/* $Id: toplazyBBM.c,v 1.5 2002/06/19 13:38:01 lwms Exp $ */
+/* $Id: toplazyBBM.c,v 1.6 2002/11/02 11:02:44 in2 Exp $ */
+#define _UTIL_C_
#include "bbs.h"
#define OUTFILE BBSHOME "/etc/toplazyBBM"
diff --git a/util/toplazyBM.c b/util/toplazyBM.c
index f54d7770..fc656817 100644
--- a/util/toplazyBM.c
+++ b/util/toplazyBM.c
@@ -1,4 +1,5 @@
-/* $Id: toplazyBM.c,v 1.16 2002/06/30 04:14:46 ptt Exp $ */
+/* $Id: toplazyBM.c,v 1.17 2002/11/02 11:02:44 in2 Exp $ */
+#define _UTIL_C_
#include "bbs.h"
#define OUTFILE BBSHOME "/etc/toplazyBM"
#define FIREFILE BBSHOME "/etc/firelazyBM"
diff --git a/util/topusr.c b/util/topusr.c
index 0f64777d..3b90a7e2 100644
--- a/util/topusr.c
+++ b/util/topusr.c
@@ -1,6 +1,6 @@
-/* $Id: topusr.c,v 1.2 2002/06/06 21:34:14 in2 Exp $ */
+/* $Id: topusr.c,v 1.3 2002/11/02 11:02:44 in2 Exp $ */
/* 使用者 上站記錄/文章篇數 排行榜 */
-
+#define _UTIL_C_
#include "bbs.h"
#define REAL_INFO
diff --git a/util/userlist.c b/util/userlist.c
index c8d53389..794a3daf 100644
--- a/util/userlist.c
+++ b/util/userlist.c
@@ -33,9 +33,9 @@ int main(int argc, char **argv) {
f = &SHM->uinfo[i];
printf(
- "%4d(%d) p[%d] i[%d] u[%s] n[%s] f[%s] m[%d] d[%d] t[%ld]\n",
+ "%4d(%d) p[%d] i[%d] u[%s] n[%s] f[%s] m[%d] t[%ld]\n",
++counter, i, f->pager, f->invisible, f->userid,
- f->username, f->from, f->mode, f->mind, f->lastact);
+ f->username, f->from, f->mode, f->lastact);
}
printf("\nTotal: %d(%d)\n", counter, SHM->number);
if(counter != SHM->number) {
diff --git a/util/util_passwd.c b/util/util_passwd.c
index c9fe4eac..17961d87 100644
--- a/util/util_passwd.c
+++ b/util/util_passwd.c
@@ -1,4 +1,4 @@
-/* $Id: util_passwd.c,v 1.2 2002/03/09 17:44:30 in2 Exp $ */
+/* $Id: util_passwd.c,v 1.3 2002/11/02 11:02:44 in2 Exp $ */
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
@@ -36,7 +36,7 @@ static userec_t *passwd_image = NULL;
static int passwd_image_size;
static int semid = -1;
-int passwd_mmap() {
+int passwd_mmap(void) {
int fd;
if(passwd_image!=NULL) return 0;
diff --git a/util/util_record.c b/util/util_record.c
index 8f1c9d02..98b6e43f 100644
--- a/util/util_record.c
+++ b/util/util_record.c
@@ -1,5 +1,6 @@
-/* $Id: util_record.c,v 1.2 2002/06/22 18:21:25 ptt Exp $ */
+/* $Id: util_record.c,v 1.3 2002/11/02 11:02:44 in2 Exp $ */
#include <stdio.h>
+#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
diff --git a/util/yearsold.c b/util/yearsold.c
index e0aa5142..93cb4a1b 100644
--- a/util/yearsold.c
+++ b/util/yearsold.c
@@ -1,6 +1,6 @@
-/* $Id: yearsold.c,v 1.3 2002/08/29 18:31:44 kcwu Exp $ */
+/* $Id: yearsold.c,v 1.4 2002/11/02 11:02:44 in2 Exp $ */
/* 站上年齡統計 */
-
+#define _UTIL_C_
#include "bbs.h"
#define MAX_LINE 16