summaryrefslogtreecommitdiffstats
path: root/mbbsd/board.c
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-06-12 22:59:46 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-06-12 22:59:46 +0800
commited870cef48392b5006d413b043589eb866988a87 (patch)
treeb6dc781083029411b9c490eccf48aede211e5797 /mbbsd/board.c
parentb1742a061cfe32ebd4619a8f8a91812eaaf58bc0 (diff)
downloadpttbbs-ed870cef48392b5006d413b043589eb866988a87.tar
pttbbs-ed870cef48392b5006d413b043589eb866988a87.tar.gz
pttbbs-ed870cef48392b5006d413b043589eb866988a87.tar.bz2
pttbbs-ed870cef48392b5006d413b043589eb866988a87.tar.lz
pttbbs-ed870cef48392b5006d413b043589eb866988a87.tar.xz
pttbbs-ed870cef48392b5006d413b043589eb866988a87.tar.zst
pttbbs-ed870cef48392b5006d413b043589eb866988a87.zip
revise brc interface and its document.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3542 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/board.c')
-rw-r--r--mbbsd/board.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c
index 8a228287..e9267703 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -133,9 +133,7 @@ HasBoardPerm(boardheader_t *bptr)
static int
check_newpost(boardstat_t * ptr)
{ /* Ptt зя */
- int tbrc_num;
time4_t ftime;
- time4_t *tbrc_list;
ptr->myattr &= ~NBRD_UNREAD;
if (B_BH(ptr)->brdattr & (BRD_GROUPBOARD | BRD_SYMBOLIC))
@@ -155,8 +153,7 @@ check_newpost(boardstat_t * ptr)
if (ftime > now + 10)
ftime = B_LASTPOSTTIME(ptr) = now - 1;
- tbrc_list = brc_find_record(ptr->bid, &tbrc_num);
- if ( brc_unread_time(ftime, tbrc_num, tbrc_list) )
+ if ( brc_unread_time(ptr->bid, ftime) )
ptr->myattr |= NBRD_UNREAD;
return 1;
@@ -451,7 +448,7 @@ unread_position(char *dirfile, boardstat_t * ptr)
while (num > 0) {
lseek(fd, (off_t) (num * sizeof(fh)), SEEK_SET);
if (read(fd, fname, FNLEN) <= 0 ||
- !brc_unread(fname, brc_num, brc_list))
+ !brc_unread(ptr->bid, fname))
break;
num -= step;
if (step < 32)
@@ -462,7 +459,7 @@ unread_position(char *dirfile, boardstat_t * ptr)
while (num < total) {
lseek(fd, (off_t) (num * sizeof(fh)), SEEK_SET);
if (read(fd, fname, FNLEN) <= 0 ||
- brc_unread(fname, brc_num, brc_list))
+ brc_unread(ptr->bid, fname))
break;
num++;
}
@@ -1129,9 +1126,9 @@ choose_board(int newflag)
break;
if (ch == 'v') {
ptr->myattr &= ~NBRD_UNREAD;
- brc_trunc(ptr->bid, now);
+ brc_toggle_all_read(ptr->bid, 1);
} else {
- brc_trunc(ptr->bid, 1);
+ brc_toggle_all_read(ptr->bid, 0);
ptr->myattr |= NBRD_UNREAD;
}
show_brdlist(head, 0, newflag);