diff options
-rw-r--r-- | include/modes.h | 5 | ||||
-rw-r--r-- | mbbsd/read.c | 24 | ||||
-rw-r--r-- | mbbsd/user.c | 3 |
3 files changed, 25 insertions, 7 deletions
diff --git a/include/modes.h b/include/modes.h index 689a2853..749b943f 100644 --- a/include/modes.h +++ b/include/modes.h @@ -150,12 +150,13 @@ #define RS_KEYWORD 0x04 #define RS_FIRST 0x08 /* find first article */ #define RS_CURRENT 0x10 /* match current read article */ -#define RS_MARK 0x20 /* search the first article */ +#define RS_MARK 0x20 /* search by 'm' mark */ #define RS_AUTHOR 0x40 /* search author's article */ #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 RS_MONEY 0x400 /* search by money */ +#define RS_SOLVED 0x800 /* search by 's' mark */ #define CURSOR_FIRST (RS_TITLE | RS_FIRST) #define CURSOR_NEXT (RS_TITLE | RS_FORWARD) diff --git a/mbbsd/read.c b/mbbsd/read.c index 85347d9e..3de710aa 100644 --- a/mbbsd/read.c +++ b/mbbsd/read.c @@ -551,7 +551,7 @@ select_read(const keeploc_t * locmem, int sr_mode) } else { // Ptt: only once for these modes. - if(!first_select && _mode & sr_mode & (RS_TITLE | RS_NEWPOST | RS_MARK)) + if(!first_select && _mode & sr_mode & (RS_TITLE | RS_NEWPOST | RS_MARK | RS_SOLVED)) return DONOTHING; if(sr_mode & RS_TITLE) { @@ -608,7 +608,7 @@ select_read(const keeploc_t * locmem, int sr_mode) } /* mark and recommend shouldn't incremental select */ - if(sr_mode & (RS_MARK | RS_RECOMMEND)) + if(sr_mode & (RS_MARK | RS_RECOMMEND | RS_SOLVED)) inc = 0; if(reload) { @@ -652,6 +652,9 @@ select_read(const keeploc_t * locmem, int sr_mode) if( (sr_mode & RS_MARK) && !(fhs[i].filemode & FILE_MARKED) ) continue; + if( (sr_mode & RS_SOLVED) && + !(fhs[i].filemode & FILE_SOLVED) ) + continue; else if((sr_mode & RS_NEWPOST) && !strncmp(fhs[i].title, "Re:", 3)) continue; @@ -708,7 +711,6 @@ i_read_key(const onekey_t * rcmdlist, keeploc_t * locmem, { int mode = DONOTHING, num, new_top=10; int ch, new_ln = locmem->crs_ln, lastmode = DONOTHING; - char direct[60]; static char default_ch = 0; do { @@ -894,7 +896,20 @@ i_read_key(const onekey_t * rcmdlist, keeploc_t * locmem, break; case 'G': - mode = select_read(locmem, RS_MARK); + // special types + switch(getans( currmode & MODE_SELECT ? + "增加條件 標記(m/s)[m]: ": + "搜尋標記(m/s)[m]: ")) + { + case 's': + mode = select_read(locmem, RS_SOLVED); + break; + + default: + case 'm': + mode = select_read(locmem, RS_MARK); + break; + } break; case '/': @@ -1098,6 +1113,7 @@ i_read_key(const onekey_t * rcmdlist, keeploc_t * locmem, if(!rcmdlist[ch - 1].needitem) mode = (*func)(); else if( num > 0 ){ + char direct[60]; sprintf(direct,"%s.bottom", currdirect); mode= (*func)(num, &headers[locmem->crs_ln-locmem->top_ln], direct, locmem->crs_ln - locmem->top_ln); diff --git a/mbbsd/user.c b/mbbsd/user.c index 4893d406..cbbcd96b 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -169,7 +169,8 @@ user_display(const userec_t * u, int adminmode) prints(" 小 天 使: %s\n", u->myangel[0] ? u->myangel : "無"); #endif - prints(" 註冊日期: %s", ctime4(&u->firstlogin)); + prints(" 註冊日期: %s (已滿%d天)", + ctime4(&u->firstlogin), (now-u->firstlogin)/86400); prints(" 前次光臨: %s", ctime4(&u->lastlogin)); prints(" 上站文章: %d 次 / %d 篇\n", u->numlogins, u->numposts); |