From b48c6873e1cd4f8dcd0ce59f1c73a60a53818840 Mon Sep 17 00:00:00 2001 From: ptt Date: Mon, 12 Apr 2004 16:20:16 +0000 Subject: push bottom fix git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1744 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/bbs.c | 2 +- mbbsd/read.c | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 2fe205e2..e9a1ca6d 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -2355,7 +2355,7 @@ push_bottom(int ent, fileheader_t * fhdr, char *direct) delete_record(buf, sizeof(fileheader_t), i+1); } } - //setbottomtotal(currbid); + setbottomtotal(currbid); touchdircache(currbid); return DIRCHANGED; } diff --git a/mbbsd/read.c b/mbbsd/read.c index e96a9449..eb6c69db 100644 --- a/mbbsd/read.c +++ b/mbbsd/read.c @@ -873,8 +873,8 @@ i_read(int cmdmode, char *direct, void (*dotitle) (), void (*doentry) (), onekey if (last_line < locmem->top_ln + p_lines) { if (bidcache > 0 && !(currmode & (MODE_SELECT | MODE_DIGEST))) { - bottom_line = getbtotal(currbid); - num = bottom_line+getbottomtotal(currbid); + bottom_line = getbtotal(currbid); + num = bottom_line+getbottomtotal(currbid); } else num = get_num_records(currdirect, FHSZ); @@ -902,13 +902,19 @@ i_read(int cmdmode, char *direct, void (*dotitle) (), void (*doentry) (), onekey entries = get_fileheader_cache(currbid, currdirect, headers, recbase, p_lines); else - entries = get_records(currdirect, headers, FHSZ, + entries += get_records(currdirect, headers, FHSZ, recbase, p_lines); } else #endif + { entries = get_records(currdirect, headers, FHSZ, recbase, p_lines); + if( entries>=0 && entries=0 && entriescrs_ln - locmem->top_ln; -- cgit v1.2.3