summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-28 21:44:19 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-28 21:44:19 +0800
commit10706337ff35bf00080907c24a7d66f72e82bfa5 (patch)
treeec1b72a065ac6a1ae5213fd163af18ac5115ea3a
parent6aa3fa39ec6f366c494713f9ecf0dee5056a4866 (diff)
downloadpttbbs-10706337ff35bf00080907c24a7d66f72e82bfa5.tar
pttbbs-10706337ff35bf00080907c24a7d66f72e82bfa5.tar.gz
pttbbs-10706337ff35bf00080907c24a7d66f72e82bfa5.tar.bz2
pttbbs-10706337ff35bf00080907c24a7d66f72e82bfa5.tar.lz
pttbbs-10706337ff35bf00080907c24a7d66f72e82bfa5.tar.xz
pttbbs-10706337ff35bf00080907c24a7d66f72e82bfa5.tar.zst
pttbbs-10706337ff35bf00080907c24a7d66f72e82bfa5.zip
remove default keyword
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1883 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/read.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/mbbsd/read.c b/mbbsd/read.c
index 68014749..a4edf806 100644
--- a/mbbsd/read.c
+++ b/mbbsd/read.c
@@ -339,26 +339,28 @@ select_read(keeploc_t * locmem, int sr_mode)
int len, fd, fr, i, count=0, reference = 0;
fileheader_t *fh = &headers[locmem->crs_ln - locmem->top_ln];
- if(sr_mode & RS_AUTHOR){
- if(!getdata_str(b_lines, 0,
- currmode & MODE_SELECT ? "增加條件 作者:":"搜尋作者:",
- keyword, IDLEN+1, LCECHO, fh->owner))
- return READ_REDRAW;
- }
- else if(sr_mode & RS_KEYWORD){
- if(!getdata_str(b_lines, 0,
- currmode & MODE_SELECT ? "增加條件 標題:":"搜尋標題:",
- keyword, TTLEN, DOECHO, subject(fh->title)))
- return READ_REDRAW;
- }
+ if(sr_mode & RS_AUTHOR)
+ {
+ if(!getdata(b_lines, 0,
+ currmode & MODE_SELECT ? "增加條件 作者:":"搜尋作者:",
+ keyword, IDLEN+1, LCECHO))
+ return READ_REDRAW;
+ }
+ else if(sr_mode & RS_KEYWORD)
+ {
+ if(!getdata(b_lines, 0,
+ currmode & MODE_SELECT ? "增加條件 標題:":"搜尋標題:",
+ keyword, TTLEN, DOECHO))
+ return READ_REDRAW;
+ }
else if(sr_mode & RS_TITLE)
strcpy(keyword, subject(fh->title));
p = strstr(currdirect, "SR");
- snprintf(genbuf, sizeof(genbuf), "%s.%X.%X",
+ snprintf(genbuf, sizeof(genbuf), "%s.%X.%X.%X",
p ? p : "SR",
- sr_mode, StringHash(keyword));
+ sr_mode, strlen(keyword), StringHash(keyword));
if( strlen(genbuf) > MAXPATHLEN - 50 )
return READ_REDRAW; // avoid overflow
@@ -380,16 +382,16 @@ select_read(keeploc_t * locmem, int sr_mode)
if( sr_mode & RS_MARK &&
!(fhs[i].filemode & FILE_MARKED) )
continue;
- if(sr_mode & RS_NEWPOST &&
+ else if(sr_mode & RS_NEWPOST &&
!strncmp(fhs[i].title, "Re:", 3))
continue;
- if(sr_mode & RS_AUTHOR &&
+ else if(sr_mode & RS_AUTHOR &&
!strcasestr(fhs[i].owner, keyword))
continue;
- if(sr_mode & RS_KEYWORD &&
+ else if(sr_mode & RS_KEYWORD &&
!strcasestr(fhs[i].title, keyword))
continue;
- if(sr_mode & RS_TITLE &&
+ else if(sr_mode & RS_TITLE &&
strcmp(subject(fhs[i].title), keyword))
continue;
++count;