summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-03-12 17:52:18 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-03-12 17:52:18 +0800
commit3a28305e6403f72205ca96c1804eb537939c0868 (patch)
tree8fb5826876996ef2587d7fcc3e470686e3829445
parentf10d92d96581666a7ac2898168f0cc6f7558f32c (diff)
downloadpttbbs-3a28305e6403f72205ca96c1804eb537939c0868.tar
pttbbs-3a28305e6403f72205ca96c1804eb537939c0868.tar.gz
pttbbs-3a28305e6403f72205ca96c1804eb537939c0868.tar.bz2
pttbbs-3a28305e6403f72205ca96c1804eb537939c0868.tar.lz
pttbbs-3a28305e6403f72205ca96c1804eb537939c0868.tar.xz
pttbbs-3a28305e6403f72205ca96c1804eb537939c0868.tar.zst
pttbbs-3a28305e6403f72205ca96c1804eb537939c0868.zip
fix compile error
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1590 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--include/proto.h1
-rw-r--r--include/pttstruct.h1
-rw-r--r--mbbsd/board.c7
-rw-r--r--mbbsd/fav.c2
4 files changed, 6 insertions, 5 deletions
diff --git a/include/proto.h b/include/proto.h
index 388e03e8..6a540073 100644
--- a/include/proto.h
+++ b/include/proto.h
@@ -254,6 +254,7 @@ void fav_cleanup(void);
void fav_clean_invisible(void);
char current_fav_at_root(void);
fav_t *get_fav_folder(fav_type_t *ft);
+fav_t *get_fav_root(void);
void updatenewfav(int mode);
void subscribe_newfav(void);
diff --git a/include/pttstruct.h b/include/pttstruct.h
index d22f4701..d8774f8b 100644
--- a/include/pttstruct.h
+++ b/include/pttstruct.h
@@ -165,6 +165,7 @@ typedef struct boardheader_t {
#define BRD_SYMBOLIC 000100000 /* symbolic link to board */
#define BRD_LINK_TARGET(x) ((x)->postexpire)
+#define GROUPOP() (currmode & MODE_GROUPOP)
diff --git a/mbbsd/board.c b/mbbsd/board.c
index 57a5519b..6d766ff3 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -282,7 +282,6 @@ brc_unread(const char *fname, int bnum, const int *blist)
#define NBRD_SYMBOLIC 64
#define TITLE_MATCH(bptr, key) ((key)[0] && !strcasestr((bptr)->title, (key)))
-#define GROUPOP() (currmode & MODE_GROUPOP)
#define B_TOTAL(bptr) (SHM->total[(bptr)->bid - 1])
@@ -327,7 +326,7 @@ void load_brdbuf(void)
fav_load();
/* subscribe new fav (deprecated) */
- if (fav_stack_num <= 0)
+ if (get_fav_root() == NULL)
updatenewfav(1);
}
@@ -556,7 +555,7 @@ load_boards(char *key)
nbrd = (boardstat_t *)malloc(sizeof(boardstat_t) * SHM->nHOTs);
for( i = 0 ; i < SHM->nHOTs ; ++i )
addnewbrdstat(SHM->HBcache[i] - SHM->bcache,
- Ben_Perm(SHM->HBcache[i]));
+ HasPerm(SHM->HBcache[i]));
}
#endif
else { // general case
@@ -567,7 +566,7 @@ load_boards(char *key)
n = getbid(bptr);
if (!bptr->brdname[0] ||
(bptr->brdattr & (BRD_GROUPBOARD | BRD_SYMBOLIC)) ||
- !((state = Ben_Perm(bptr)) || GROUPOP()) ||
+ !((state = HasPerm(bptr)) || GROUPOP()) ||
TITLE_MATCH(bptr, key)
#ifndef HOTBOARDCACHE
|| (class_bid == -1 && bptr->nuser < 5)
diff --git a/mbbsd/fav.c b/mbbsd/fav.c
index 4cf1da34..45b8b615 100644
--- a/mbbsd/fav.c
+++ b/mbbsd/fav.c
@@ -205,7 +205,7 @@ fav_item_copy(fav_type_t *target, const fav_type_t *source){
target->fp = source->fp;
}
-inline static fav_t *get_fav_root(void){
+inline fav_t *get_fav_root(void){
return fav_stack[0];
}