summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-07-20 08:55:34 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-07-20 08:55:34 +0800
commit24ec3204b34c9e6749b9312f2edb84edb2a4cb34 (patch)
tree4c4bc5443344d91ab20163b0ed491732d2a732ed /include
parent047bb28fce410663731f69295cff89ab902a6085 (diff)
downloadpttbbs-24ec3204b34c9e6749b9312f2edb84edb2a4cb34.tar
pttbbs-24ec3204b34c9e6749b9312f2edb84edb2a4cb34.tar.gz
pttbbs-24ec3204b34c9e6749b9312f2edb84edb2a4cb34.tar.bz2
pttbbs-24ec3204b34c9e6749b9312f2edb84edb2a4cb34.tar.lz
pttbbs-24ec3204b34c9e6749b9312f2edb84edb2a4cb34.tar.xz
pttbbs-24ec3204b34c9e6749b9312f2edb84edb2a4cb34.tar.zst
pttbbs-24ec3204b34c9e6749b9312f2edb84edb2a4cb34.zip
merge from MergeCache
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@1065 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'include')
-rw-r--r--include/proto.h7
-rw-r--r--include/pttstruct.h9
2 files changed, 11 insertions, 5 deletions
diff --git a/include/proto.h b/include/proto.h
index f02f7c1d..ee59329d 100644
--- a/include/proto.h
+++ b/include/proto.h
@@ -1,4 +1,4 @@
-/* $Id: proto.h,v 1.45 2003/07/17 03:27:27 victor Exp $ */
+/* $Id: proto.h,v 1.46 2003/07/20 00:55:34 in2 Exp $ */
#ifndef INCLUDE_PROTO_H
#define INCLUDE_PROTO_H
@@ -130,7 +130,10 @@ int get_fileheader_cache(int bid, char *direct, fileheader_t *headers,
int recbase, int nlines);
void *attach_shm(int shmkey, int shmsize);
void attach_SHM(void);
-void sort_utmp();
+void sort_utmp(void);
+int is_BM_cache(int);
+void buildBMcache(int);
+void reload_bcache(void);
/* cal */
int give_tax(int money);
diff --git a/include/pttstruct.h b/include/pttstruct.h
index d34e8f3a..2401c26b 100644
--- a/include/pttstruct.h
+++ b/include/pttstruct.h
@@ -1,4 +1,4 @@
-/* $Id: pttstruct.h,v 1.42 2003/07/17 03:27:27 victor Exp $ */
+/* $Id: pttstruct.h,v 1.43 2003/07/20 00:55:34 in2 Exp $ */
#ifndef INCLUDE_STRUCT_H
#define INCLUDE_STRUCT_H
@@ -102,7 +102,7 @@ typedef struct userec_t {
typedef struct boardheader_t {
char brdname[IDLEN + 1]; /* bid */
char title[BTLEN + 1];
- char BM[IDLEN * 3 + 3]; /* BMs' uid, token '/' */
+ char BM[IDLEN * 3 + 3]; /* BMs' userid, token '/' */
unsigned int brdattr; /* board的屬性 */
char pad[3]; /* 沒用到的 */
time_t bupdate; /* note update time */
@@ -298,6 +298,9 @@ typedef struct keeploc_t {
#define USHM_SIZE (MAX_ACTIVE + 4) /* why+4? */
+/* MAX_BMs is dirty hardcode 4 in mbbsd/cache.c:is_BM_cache() */
+#define MAX_BMs 4 /* for BMcache, 一個看板最多幾板主 */
+
typedef struct {
/* uhash */
char userid[MAX_USERS][IDLEN + 1];
@@ -319,7 +322,7 @@ typedef struct {
char UTMPbusystate;
/* brdshm */
- int BMcache[MAX_BOARD][4];
+ int BMcache[MAX_BOARD][MAX_BMs];
boardheader_t bcache[MAX_BOARD];
boardheader_t *bsorted[2][MAX_BOARD]; /* 0: by name 1: by class */
fileheader_t dircache[MAX_BOARD][DIRCACHESIZE];