diff options
author | (no author) <(no author)@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-09-04 18:16:03 +0800 |
---|---|---|
committer | (no author) <(no author)@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-09-04 18:16:03 +0800 |
commit | 9f9f9619a9fe96a172ec444373224625a3f09df6 (patch) | |
tree | 17efbe96d1d41006f50ddf38b3529aa91b79d93a /mbbsd | |
parent | 157642992e5f2d5dc367b6905a7d453a4ea66845 (diff) | |
download | pttbbs-9f9f9619a9fe96a172ec444373224625a3f09df6.tar pttbbs-9f9f9619a9fe96a172ec444373224625a3f09df6.tar.gz pttbbs-9f9f9619a9fe96a172ec444373224625a3f09df6.tar.bz2 pttbbs-9f9f9619a9fe96a172ec444373224625a3f09df6.tar.lz pttbbs-9f9f9619a9fe96a172ec444373224625a3f09df6.tar.xz pttbbs-9f9f9619a9fe96a172ec444373224625a3f09df6.tar.zst pttbbs-9f9f9619a9fe96a172ec444373224625a3f09df6.zip |
reduce usage of get_record()
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1156 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/menu.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/mbbsd/menu.c b/mbbsd/menu.c index d7984950..c506b3e9 100644 --- a/mbbsd/menu.c +++ b/mbbsd/menu.c @@ -1,4 +1,4 @@ -/* $Id: menu.c,v 1.26 2003/05/22 01:16:45 in2 Exp $ */ +/* $Id$ */ #include "bbs.h" /* help & menu processring */ @@ -33,7 +33,6 @@ showtitle(char *title, char *mid) { char buf[40], numreg[50]; int nreg, spc = 0, pad, bid; - boardheader_t bh; static char lastboard[16] = {0}; spc = strlen(mid); @@ -74,10 +73,10 @@ showtitle(char *title, char *mid) if (strcmp(currboard, lastboard)) { /* change board */ if (currboard[0] != 0 && - (bid = getbnum(currboard)) > 0 && - (get_record(fn_board, &bh, sizeof(bh), bid) != -1)) { - board_hidden_status = ((bh.brdattr & BRD_HIDE) && - (bh.brdattr & BRD_POSTMASK)); + (bid = getbnum(currboard)) > 0) { + // XXX: bid starts from 1 + board_hidden_status = ((bcache[bid - 1].brdattr & BRD_HIDE) && + (bcache[bid - 1].brdattr & BRD_POSTMASK)); strncpy(lastboard, currboard, sizeof(lastboard)); } } |