diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-12-29 01:00:33 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-12-29 01:00:33 +0800 |
commit | 27eb361dbcc23cca40df8e2c5d7bcf371a5a6f62 (patch) | |
tree | a37e9f614b4ab868a253286407e139ef379e7a59 | |
parent | c4f8dacc618e0a66b68a0ca080bce22ad9498a90 (diff) | |
download | pttbbs-27eb361dbcc23cca40df8e2c5d7bcf371a5a6f62.tar pttbbs-27eb361dbcc23cca40df8e2c5d7bcf371a5a6f62.tar.gz pttbbs-27eb361dbcc23cca40df8e2c5d7bcf371a5a6f62.tar.bz2 pttbbs-27eb361dbcc23cca40df8e2c5d7bcf371a5a6f62.tar.lz pttbbs-27eb361dbcc23cca40df8e2c5d7bcf371a5a6f62.tar.xz pttbbs-27eb361dbcc23cca40df8e2c5d7bcf371a5a6f62.tar.zst pttbbs-27eb361dbcc23cca40df8e2c5d7bcf371a5a6f62.zip |
- pmore: warning for ANSI move commands in content
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3751 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/pmore.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mbbsd/pmore.c b/mbbsd/pmore.c index 6bbf0973..4126f9ea 100644 --- a/mbbsd/pmore.c +++ b/mbbsd/pmore.c @@ -83,6 +83,8 @@ " pmore 2007 快速設定選項 - 色彩(ANSI碼)顯示模式 " #define PMORE_MSG_WARN_FAKEUSERINFO \ " ▲此頁內容會依閱\讀者不同,原文未必有您的資料 " +#define PMORE_MSG_WARN_MOVECMD \ + " ▲此頁內容含移位碼,可能會顯示假系統訊息 " #define PMORE_MSG_SEARCH_KEYWORD \ "[搜尋]關鍵字:" @@ -1026,6 +1028,7 @@ mf_display() { int lines = 0, col = 0, currline = 0, wrapping = 0; int startline, endline; + int needMove2bot = 0; int optimized = MFDISP_OPT_CLEAR; @@ -1325,13 +1328,18 @@ mf_display() default: if(ANSI_IN_MOVECMD(c)) + { #ifdef PMORE_RESTRICT_ANSI_MOVEMENT c = 's'; // "save cursor pos" #else // some user cannot live without this. // make them happy. newline_default = newline = MFDISP_NEWLINE_MOVE; + override_attr = ANSI_COLOR(1;37;41); + override_msg = PMORE_MSG_WARN_MOVECMD; #endif + needMove2bot = 1; + } outc(c); break; } @@ -1622,6 +1630,9 @@ mf_display() } } mf.oldlineno = mf.lineno; + + if (needMove2bot) + move(b_lines, 0); } /* --------------------- MAIN PROCEDURE ------------------------- */ |