summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-11-16 13:30:57 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-11-16 13:30:57 +0800
commit8792f8321fa572f5e8749a3dc2f1d65fb16cee35 (patch)
treee746e4bb8454b4df62361ed4f3729b1d9ca49ed2
parent2d670e0e811f17e052bcd4a66c3e660355df38ba (diff)
downloadpttbbs-8792f8321fa572f5e8749a3dc2f1d65fb16cee35.tar
pttbbs-8792f8321fa572f5e8749a3dc2f1d65fb16cee35.tar.gz
pttbbs-8792f8321fa572f5e8749a3dc2f1d65fb16cee35.tar.bz2
pttbbs-8792f8321fa572f5e8749a3dc2f1d65fb16cee35.tar.lz
pttbbs-8792f8321fa572f5e8749a3dc2f1d65fb16cee35.tar.xz
pttbbs-8792f8321fa572f5e8749a3dc2f1d65fb16cee35.tar.zst
pttbbs-8792f8321fa572f5e8749a3dc2f1d65fb16cee35.zip
fix last commit's fault
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2327 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/read.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mbbsd/read.c b/mbbsd/read.c
index 839c8021..bfb3f430 100644
--- a/mbbsd/read.c
+++ b/mbbsd/read.c
@@ -269,12 +269,12 @@ thread(keeploc_t * locmem, int stypen)
fileheader_t fh;
int pos = locmem->crs_ln, jump = 200, new_ln;
int fd = -1, amatch = -1;
- int step = (stypen == RS_FORWARD) ? 1 : -1;
+ int step = (stypen & RS_FORWARD) ? 1 : -1;
char *key;
- if (stypen == RS_AUTHOR)
+ if (stypen & RS_AUTHOR)
key = headers[pos - locmem->top_ln].owner;
- else if (stypen == RS_CURRENT)
+ else if (stypen & RS_CURRENT)
key = subject(currtitle);
else
key = subject(headers[pos - locmem->top_ln].title );
@@ -283,8 +283,8 @@ thread(keeploc_t * locmem, int stypen)
new_ln > 0 && new_ln <= last_line && --jump > 0;
new_ln += step ) {
get_record_keep(currdirect, &fh, sizeof(fileheader_t), new_ln, &fd);
- if( stypen == RS_TITLE ){
- if( stypen == RS_FIRST ){
+ if( stypen & RS_TITLE ){
+ if( stypen & RS_FIRST ){
if( !strncmp(fh.title, key, PROPER_TITLE_LEN) )
break;
else if( !strncmp(&fh.title[4], key, PROPER_TITLE_LEN) )
@@ -293,7 +293,7 @@ thread(keeploc_t * locmem, int stypen)
else if( !strncmp(subject(fh.title), key, PROPER_TITLE_LEN) )
break;
}
- else if( stypen == RS_NEWPOST ){
+ else if( stypen & RS_NEWPOST ){
if( strncmp(fh.title, "Re:", 3) )
break;
}