summaryrefslogtreecommitdiffstats
path: root/mbbsd/more.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-27 05:44:22 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-27 05:44:22 +0800
commitfc2bed655050d32fc6f4c98c26f4d89361be88b8 (patch)
tree5da872403e86742f90308f0fbc3e0f7ac678c01f /mbbsd/more.c
parenta08baf738de7959e912f5b12314da85eaea5a3c9 (diff)
downloadpttbbs-fc2bed655050d32fc6f4c98c26f4d89361be88b8.tar
pttbbs-fc2bed655050d32fc6f4c98c26f4d89361be88b8.tar.gz
pttbbs-fc2bed655050d32fc6f4c98c26f4d89361be88b8.tar.bz2
pttbbs-fc2bed655050d32fc6f4c98c26f4d89361be88b8.tar.lz
pttbbs-fc2bed655050d32fc6f4c98c26f4d89361be88b8.tar.xz
pttbbs-fc2bed655050d32fc6f4c98c26f4d89361be88b8.tar.zst
pttbbs-fc2bed655050d32fc6f4c98c26f4d89361be88b8.zip
rewrite
i_read() i_read_key() thread() select_mode() git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1863 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/more.c')
-rw-r--r--mbbsd/more.c40
1 files changed, 16 insertions, 24 deletions
diff --git a/mbbsd/more.c b/mbbsd/more.c
index d8fb9306..33b36222 100644
--- a/mbbsd/more.c
+++ b/mbbsd/more.c
@@ -385,44 +385,36 @@ more(char *fpath, int promptend)
case 'r':
case 'R':
case 'Y':
- close(fd);
- return 7;
case 'y':
close(fd);
- return 8;
+ return 999;
case 'A':
close(fd);
- return 9;
+ return AUTHOR_PREV;
case 'a':
close(fd);
- return 10;
+ return AUTHOR_NEXT;
case 'F':
+ case 'f':
close(fd);
- return 11;
+ return READ_NEXT;
case 'B':
+ case 'b':
close(fd);
- return 12;
+ return READ_PREV;
case KEY_LEFT:
- close(fd);
- return 6;
case 'q':
close(fd);
- return 0;
- case 'b':
- close(fd);
- return 1;
- case 'f':
- close(fd);
- return 3;
+ return FULLUPDATE;
case ']': /* Kaede 為了主題閱讀方便 */
close(fd);
- return 4;
+ return RELATE_NEXT;
case '[': /* Kaede 為了主題閱讀方便 */
close(fd);
- return 2;
+ return RELATE_PREV;
case '=': /* Kaede 為了主題閱讀方便 */
close(fd);
- return 5;
+ return RELATE_FIRST;
case Ctrl('F'):
case KEY_PGDN:
line = 1;
@@ -430,14 +422,14 @@ more(char *fpath, int promptend)
case 't':
if (viewed == fsize) {
close(fd);
- return 4;
+ return RELATE_NEXT;
}
line = 1;
break;
case ' ':
if (viewed == fsize) {
close(fd);
- return 3;
+ return READ_NEXT;
}
line = 1;
break;
@@ -454,7 +446,7 @@ more(char *fpath, int promptend)
if (viewed == fsize ||
(promptend == 2 && (ch == '\r' || ch == '\n'))) {
close(fd);
- return 3;
+ return READ_NEXT;
}
line = t_lines - 2;
break;
@@ -525,7 +517,7 @@ more(char *fpath, int promptend)
pageno = line = 0;
else {
close(fd);
- return 1;
+ return READ_PREV;
}
}
}
@@ -538,7 +530,7 @@ more(char *fpath, int promptend)
if (pageno <= 1) {
if (lino == 1 || !pageno) {
close(fd);
- return 1;
+ return READ_PREV;
}
if (header && lino <= 5) {
more_goto(fd, viewed = pagebreak[scrollup = lino =