summaryrefslogtreecommitdiffstats
path: root/mbbsd/read.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-14 19:41:27 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-14 19:41:27 +0800
commitd08db5565702465469052e01d06ff76194d03cd4 (patch)
tree58db90bc271d5f58bdc0c75b7efd3a8228e93a68 /mbbsd/read.c
parent115cf628efd96f27a9f8b4379e1b87b31293921f (diff)
downloadpttbbs-d08db5565702465469052e01d06ff76194d03cd4.tar
pttbbs-d08db5565702465469052e01d06ff76194d03cd4.tar.gz
pttbbs-d08db5565702465469052e01d06ff76194d03cd4.tar.bz2
pttbbs-d08db5565702465469052e01d06ff76194d03cd4.tar.lz
pttbbs-d08db5565702465469052e01d06ff76194d03cd4.tar.xz
pttbbs-d08db5565702465469052e01d06ff76194d03cd4.tar.zst
pttbbs-d08db5565702465469052e01d06ff76194d03cd4.zip
remove dircache
prevent error for push bottom git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1758 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/read.c')
-rw-r--r--mbbsd/read.c50
1 files changed, 13 insertions, 37 deletions
diff --git a/mbbsd/read.c b/mbbsd/read.c
index a0302cdf..55a446c8 100644
--- a/mbbsd/read.c
+++ b/mbbsd/read.c
@@ -896,29 +896,13 @@ i_read(int cmdmode, char *direct, void (*dotitle) (), void (*doentry) (), onekey
recbase = 1;
locmem->top_ln = recbase;
}
-#if DIRCACHESIZE
- if( bidcache > 0 &&
- !(currmode & (MODE_SELECT | MODE_DIGEST)))
- {
- if((last_line - recbase) < DIRCACHESIZE )
- entries = get_fileheader_cache(currbid, currdirect,
- headers, recbase, p_lines);
- else
- entries += get_records(currdirect, headers, FHSZ,
- recbase, p_lines);
- }
- else
-#endif
- {
- entries = get_records(currdirect, headers, FHSZ, recbase,
+ if(recbase <= bottom_line)
+ entries = get_records(currdirect, headers, FHSZ, recbase,
p_lines);
- if( entries>=0 && entries<p_lines && n_bottom)
- entries +=get_records(directbottom,&headers[entries],FHSZ,
- 1, p_lines-entries);
- }
-
-
-
+ if( entries>=0 && entries<p_lines && n_bottom)
+ entries +=get_records(directbottom,&headers[entries],FHSZ,
+ recbase<=bottom_line ? 1 : recbase-bottom_line,
+ p_lines-entries);
}
if (locmem->crs_ln > last_line)
locmem->crs_ln = last_line;
@@ -1000,21 +984,13 @@ i_read(int cmdmode, char *direct, void (*dotitle) (), void (*doentry) (), onekey
} else if (reload) {
recbase = locmem->top_ln;
-#if DIRCACHESIZE
- if (bidcache > 0 && !(currmode & (MODE_SELECT | MODE_DIGEST))
- && last_line - recbase < DIRCACHESIZE)
- entries = get_fileheader_cache(currbid, currdirect,
- headers, recbase, p_lines);
- else
-#endif
- {
- sprintf(directbottom, "%s.bottom", direct);
- entries = get_records(currdirect, headers, FHSZ, recbase,
- p_lines);
- if( entries>=0 && entries<p_lines && n_bottom)
- entries+=get_records(directbottom,&headers[entries],FHSZ,
- 1, p_lines-entries);
- }
+ if(recbase <= bottom_line)
+ entries = get_records(currdirect, headers, FHSZ, recbase,
+ p_lines);
+ if( entries>=0 && entries<p_lines && n_bottom)
+ entries +=get_records(directbottom,&headers[entries],FHSZ,
+ recbase<=bottom_line ? 1 : recbase-bottom_line,
+ p_lines-entries);
}
num = locmem->crs_ln - locmem->top_ln;