summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-23 16:23:58 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-23 16:23:58 +0800
commitf13cadf70e1c22bad218cd1d8df9910b1dbceeb3 (patch)
treef6f84afccbcc70c24568548d9b336b4ed35841a3 /mbbsd
parent17284f95ab02f53b0da7a5476e5531ca3c34a3df (diff)
downloadpttbbs-f13cadf70e1c22bad218cd1d8df9910b1dbceeb3.tar
pttbbs-f13cadf70e1c22bad218cd1d8df9910b1dbceeb3.tar.gz
pttbbs-f13cadf70e1c22bad218cd1d8df9910b1dbceeb3.tar.bz2
pttbbs-f13cadf70e1c22bad218cd1d8df9910b1dbceeb3.tar.lz
pttbbs-f13cadf70e1c22bad218cd1d8df9910b1dbceeb3.tar.xz
pttbbs-f13cadf70e1c22bad218cd1d8df9910b1dbceeb3.tar.zst
pttbbs-f13cadf70e1c22bad218cd1d8df9910b1dbceeb3.zip
- add Q and improve return value definition in pager
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3729 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/bbs.c8
-rw-r--r--mbbsd/pmore.c13
2 files changed, 17 insertions, 4 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index e24f0e4f..5baeb752 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -13,6 +13,7 @@
static int recommend(int ent, fileheader_t * fhdr, const char *direct);
static int do_add_recommend(const char *direct, fileheader_t *fhdr,
int ent, const char *buf, int type);
+static int view_postinfo(int ent, const fileheader_t * fhdr, const char *direct, int crs_ln);
#ifdef ASSESS
static char * const badpost_reason[] = {
@@ -1865,12 +1866,15 @@ read_post(int ent, fileheader_t * fhdr, const char *direct)
clear();
vmsg("此文章無內容");
return FULLUPDATE;
- case 999:
+ case RET_DOREPLY:
do_reply(fhdr);
return FULLUPDATE;
- case 998:
+ case RET_DORECOMMEND:
recommend(ent, fhdr, direct);
return FULLUPDATE;
+ case RET_DOQUERYINFO:
+ view_postinfo(ent, fhdr, direct, b_lines-3);
+ return FULLUPDATE;
}
if(more_result)
return more_result;
diff --git a/mbbsd/pmore.c b/mbbsd/pmore.c
index fe39a389..87544bf0 100644
--- a/mbbsd/pmore.c
+++ b/mbbsd/pmore.c
@@ -2040,15 +2040,24 @@ pmore(char *fpath, int promptend)
ch = igetch();
switch (ch) {
/* ------------------ EXITING KEYS ------------------ */
+#ifdef RET_DOREPLY
case 'r': case 'R':
case 'Y': case 'y':
- flExit = 1, retval = 999;
+ flExit = 1, retval = RET_DOREPLY;
break;
+#endif
+#ifdef RET_DORECOMMEND
// recommend
case '%':
case 'X':
- flExit = 1, retval = 998;
+ flExit = 1, retval = RET_DORECOMMEND;
+ break;
+#endif
+#ifdef RET_DOQUERYINFO
+ case 'Q': // info query interface
+ flExit = 1, retval = RET_DOQUERYINFO;
break;
+#endif
case 'A':
flExit = 1, retval = AUTHOR_PREV;
break;