summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-02-11 23:30:15 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-02-11 23:30:15 +0800
commit4ac03d52441eeaa1406725f836b3bd62db781ad8 (patch)
treee19a10ef2577ab4f328e8e2c78025874c11e0a2e
parent28d10efd394b9169fd99dbbfda097254cc596f56 (diff)
downloadpttbbs-4ac03d52441eeaa1406725f836b3bd62db781ad8.tar
pttbbs-4ac03d52441eeaa1406725f836b3bd62db781ad8.tar.gz
pttbbs-4ac03d52441eeaa1406725f836b3bd62db781ad8.tar.bz2
pttbbs-4ac03d52441eeaa1406725f836b3bd62db781ad8.tar.lz
pttbbs-4ac03d52441eeaa1406725f836b3bd62db781ad8.tar.xz
pttbbs-4ac03d52441eeaa1406725f836b3bd62db781ad8.tar.zst
pttbbs-4ac03d52441eeaa1406725f836b3bd62db781ad8.zip
'G' for searching marked article
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@657 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/read.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/mbbsd/read.c b/mbbsd/read.c
index ea2e4a73..e527cac7 100644
--- a/mbbsd/read.c
+++ b/mbbsd/read.c
@@ -1,4 +1,4 @@
-/* $Id: read.c,v 1.18 2003/01/23 18:39:24 in2 Exp $ */
+/* $Id: read.c,v 1.19 2003/02/11 15:30:15 victor Exp $ */
#include "bbs.h"
static fileheader_t *headers = NULL;
@@ -464,7 +464,10 @@ select_read(keeploc_t * locmem, int sr_mode)
else if (sr_mode == RS_NEWPOST) {
strlcpy(buf3, "Re: ", sizeof(buf3));
query = buf3;
- } else {
+ }
+ else if (sr_mode == RS_THREAD) {
+
+ } else {
char buff[80];
char newdata[35];
@@ -526,6 +529,15 @@ select_read(keeploc_t * locmem, int sr_mode)
}
}
break;
+ case RS_THREAD:
+ while (read(fd, &fh, size) == size) {
+ ++reference;
+ if (fh.filemode & FILE_MARKED) {
+ write(fr, &fh, size);
+ fh.money = reference | FHR_REFERENCE;
+ }
+ }
+ break;
}
fstat(fr, &st);
close(fr);
@@ -574,6 +586,13 @@ i_read_key(onekey_t * rcmdlist, keeploc_t * locmem, int ch, int bid)
return NEWDIRECT;
else
return READ_REDRAW;
+
+ case 'G':
+ if (select_read(locmem,RS_THREAD)) /* marked articles */
+ return NEWDIRECT;
+ else
+ return READ_REDRAW;
+
case '/':
case '?':
if (select_read(locmem, RS_RELATED))