diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-04 21:52:01 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-04 21:52:01 +0800 |
commit | a71c8d13bd0557184bd9a7dfea39e9cc8d163f8f (patch) | |
tree | ac487ed735d7f26f1497a515247d6c031d931676 | |
parent | cdecea1b733d6337bdbeca7aba3096a7765e98de (diff) | |
download | pttbbs-a71c8d13bd0557184bd9a7dfea39e9cc8d163f8f.tar pttbbs-a71c8d13bd0557184bd9a7dfea39e9cc8d163f8f.tar.gz pttbbs-a71c8d13bd0557184bd9a7dfea39e9cc8d163f8f.tar.bz2 pttbbs-a71c8d13bd0557184bd9a7dfea39e9cc8d163f8f.tar.lz pttbbs-a71c8d13bd0557184bd9a7dfea39e9cc8d163f8f.tar.xz pttbbs-a71c8d13bd0557184bd9a7dfea39e9cc8d163f8f.tar.zst pttbbs-a71c8d13bd0557184bd9a7dfea39e9cc8d163f8f.zip |
1. Patch make error. please remember to undate define
in config.h not only in your local pttbbs.conf
2. DonaldLam need function to search the money of post.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2977 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | include/modes.h | 1 | ||||
-rw-r--r-- | include/pttbbs.conf | 1 | ||||
-rw-r--r-- | mbbsd/read.c | 20 |
3 files changed, 20 insertions, 2 deletions
diff --git a/include/modes.h b/include/modes.h index 391efadd..1af93afb 100644 --- a/include/modes.h +++ b/include/modes.h @@ -138,6 +138,7 @@ #define RS_NEWPOST 0x80 /* search new posts */ #define RS_KEYWORD_EXCLUDE 0x100 /* exclude keyword */ #define RS_RECOMMEND 0x200 /* search by recommends */ +#define RS_MONEY 0x400 /* search by recommends */ #define CURSOR_FIRST (RS_TITLE | RS_FIRST) #define CURSOR_NEXT (RS_TITLE | RS_FORWARD) diff --git a/include/pttbbs.conf b/include/pttbbs.conf index 3017382d..4de87cb6 100644 --- a/include/pttbbs.conf +++ b/include/pttbbs.conf @@ -20,3 +20,4 @@ #define MEM_CHECK 0 #define MEM_CHECK 0 #define REGCODE_MAGIC "ptt1bbsXyZ" +#define THREAD_SEARCH_RANGE (500) diff --git a/mbbsd/read.c b/mbbsd/read.c index 0e9974e7..cdcba6cd 100644 --- a/mbbsd/read.c +++ b/mbbsd/read.c @@ -419,7 +419,8 @@ select_read(const keeploc_t * locmem, int sr_mode) char keyword[TTLEN + 1] = ""; char genbuf[MAXPATHLEN], *p = strstr(currdirect, "SR."); static int _mode = 0; - int len, fd, fr, i, count=0, reference = 0, n_recommend = 0; + int len, fd, fr, i, count=0, reference = 0, n_recommend = 0, + n_money=0; fileheader_t *fh = &headers[locmem->crs_ln - locmem->top_ln]; STATINC(STAT_SELECTREAD); @@ -457,6 +458,15 @@ select_read(const keeploc_t * locmem, int sr_mode) keyword, 7, LCECHO) || (n_recommend = atoi(keyword)) <= 0 )) return READ_REDRAW; } + else if (sr_mode & RS_MONEY) + { + if(currstat != RMAIL && ( + !getdata(b_lines, 0, + (currmode & MODE_SELECT) ? + "增加條件 稿籌: ":"最低稿籌: ", + keyword, 7, LCECHO) || (n_money = atoi(keyword)) <= 0 )) + return READ_REDRAW; + } else { if(p && _mode & sr_mode & (RS_TITLE | RS_NEWPOST | RS_MARK)) @@ -513,6 +523,9 @@ select_read(const keeploc_t * locmem, int sr_mode) else if ((sr_mode & RS_RECOMMEND) && fhs[i].recommend < n_recommend ) continue; + else if ((sr_mode & RS_MONEY) && + fhs[i].recommend < n_money ) + continue; ++count; if(p == NULL) { @@ -598,10 +611,13 @@ i_read_key(const onekey_t * rcmdlist, keeploc_t * locmem, break; case 'a': - case 'A': mode = select_read(locmem, RS_AUTHOR); break; + case 'A': + mode = select_read(locmem, RS_MONEY); + break; + case 'G': mode = select_read(locmem, RS_MARK); break; |