summaryrefslogtreecommitdiffstats
path: root/mbbsd/board.c
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-06-02 09:55:21 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-06-02 09:55:21 +0800
commit20a09fdf769533f7efc09990481e131f1e289874 (patch)
tree817f574143a5ad6382a8f216956f3c7e5bf7891e /mbbsd/board.c
parent1fcc5da29d40392d24c3dc5f9afd65290ab6ddbe (diff)
downloadpttbbs-20a09fdf769533f7efc09990481e131f1e289874.tar
pttbbs-20a09fdf769533f7efc09990481e131f1e289874.tar.gz
pttbbs-20a09fdf769533f7efc09990481e131f1e289874.tar.bz2
pttbbs-20a09fdf769533f7efc09990481e131f1e289874.tar.lz
pttbbs-20a09fdf769533f7efc09990481e131f1e289874.tar.xz
pttbbs-20a09fdf769533f7efc09990481e131f1e289874.tar.zst
pttbbs-20a09fdf769533f7efc09990481e131f1e289874.zip
iswritable_stat, isvisible_stat
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@270 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/board.c')
-rw-r--r--mbbsd/board.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c
index 54237fa5..c0fed91c 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -1,4 +1,4 @@
-/* $Id: board.c,v 1.27 2002/06/01 22:08:53 ptt Exp $ */
+/* $Id: board.c,v 1.28 2002/06/02 01:55:21 in2 Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -263,8 +263,8 @@ void init_brdbuf() {
close(n);
}
- for(n = 0; n < size; n++)
- favbuf[n] &= ~BRD_TAG;
+ for(n = 0; n < numboards; n++)
+ favbuf[n] &= ~BRD_TAG;
brc_expire_time = login_start_time - 365 * 86400;
}
@@ -430,9 +430,10 @@ static boardstat_t * addnewbrdstat(int n, int state)
return ptr;
}
-static int cmpboardname(boardstat_t *brd, boardstat_t *tmp) {
- return tmp->bh->nuser - brd->bh->nuser;
-}
+static int cmpboardname(const void *brd, const void *tmp)
+{
+ return ((boardstat_t *)tmp)->bh->nuser - ((boardstat_t *)brd)->bh->nuser;
+}
static void load_boards(char *key) {
boardheader_t *bptr = NULL;
@@ -464,7 +465,7 @@ static void load_boards(char *key) {
) continue;
addnewbrdstat(n, state);
if(class_bid==-1)
- qsort(nbrd, brdnum, sizeof(boardstat_t), cmpboardname);
+ qsort(nbrd, brdnum, sizeof(boardstat_t), cmpboardname);
}
}
else