diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-04-13 15:50:49 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-04-13 15:50:49 +0800 |
commit | a818c59949d5add1622895fa9e2062f4aa573f71 (patch) | |
tree | d78720e5f8244ee5fad7554322cc10624c7b7bbe | |
parent | 5d2582c82fac8c71375df1b7a356de53dd76bcdc (diff) | |
download | pttbbs-a818c59949d5add1622895fa9e2062f4aa573f71.tar pttbbs-a818c59949d5add1622895fa9e2062f4aa573f71.tar.gz pttbbs-a818c59949d5add1622895fa9e2062f4aa573f71.tar.bz2 pttbbs-a818c59949d5add1622895fa9e2062f4aa573f71.tar.lz pttbbs-a818c59949d5add1622895fa9e2062f4aa573f71.tar.xz pttbbs-a818c59949d5add1622895fa9e2062f4aa573f71.tar.zst pttbbs-a818c59949d5add1622895fa9e2062f4aa573f71.zip |
push bottom bug fix
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1747 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/bbs.c | 1 | ||||
-rw-r--r-- | mbbsd/read.c | 18 |
2 files changed, 12 insertions, 7 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index f36b8036..2aec70fc 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -2325,7 +2325,6 @@ push_bottom(int ent, fileheader_t * fhdr, char *direct) { int num, i; char buf[256]; - return vmsg("this feature is marked as broken"); if ((currmode & MODE_DIGEST) || !(currmode & MODE_BOARD)) return DONOTHING; if(strstr(direct, ".bottom")) diff --git a/mbbsd/read.c b/mbbsd/read.c index eb6c69db..38f3cd83 100644 --- a/mbbsd/read.c +++ b/mbbsd/read.c @@ -584,7 +584,7 @@ select_read(keeploc_t * locmem, int sr_mode) } static int -i_read_key(onekey_t * rcmdlist, keeploc_t * locmem, int ch, int bid, char* direct) +i_read_key(onekey_t * rcmdlist, keeploc_t * locmem, int ch, int bid, char* direct, int bottom_line) { int mode = DONOTHING; @@ -782,7 +782,9 @@ i_read_key(onekey_t * rcmdlist, keeploc_t * locmem, int ch, int bid, char* direc if (ch > 0 && ch <= onekey_size) { int (*func)() = rcmdlist[ch - 1]; if (func != NULL) - mode = (*func)(locmem->crs_ln, &headers[locmem->crs_ln - locmem->top_ln], direct); + mode = (*func)(locmem->crs_ln>bottom_line? + locmem->crs_ln - bottom_line : locmem->crs_ln, + &headers[locmem->crs_ln - locmem->top_ln], direct); break; } } @@ -969,9 +971,11 @@ i_read(int cmdmode, char *direct, void (*dotitle) (), void (*doentry) (), onekey if (!jump) { if(locmem->crs_ln>bottom_line) - mode = i_read_key(rcmdlist, locmem, ch, currbid, directbottom); + mode = i_read_key(rcmdlist, locmem, ch, currbid, + directbottom, bottom_line); else - mode = i_read_key(rcmdlist, locmem, ch, currbid, currdirect); + mode = i_read_key(rcmdlist, locmem, ch, currbid, + currdirect, bottom_line); } while (mode == READ_NEXT || mode == READ_PREV || mode == RELATE_FIRST || mode == RELATE_NEXT || @@ -1016,9 +1020,11 @@ i_read(int cmdmode, char *direct, void (*dotitle) (), void (*doentry) (), onekey if (headers[num].owner[0] != '-') { if(locmem->crs_ln>bottom_line) - mode = i_read_key(rcmdlist, locmem, ch, currbid, directbottom); + mode = i_read_key(rcmdlist, locmem, ch, currbid, + directbottom, bottom_line); else - mode = i_read_key(rcmdlist, locmem, ch, bidcache, currdirect); + mode = i_read_key(rcmdlist, locmem, ch, bidcache, + currdirect, bottom_line); } } } |