summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-29 22:26:17 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-29 22:26:17 +0800
commit2d6a3bc48a2c64429f1220d37060e8849ccd5b02 (patch)
tree7b5f638e95c0df0b9d1a7529e30843197713a6fa
parent3209f81bd9d94fd7b17dfae1f575dd01d5ea59c5 (diff)
downloadpttbbs-2d6a3bc48a2c64429f1220d37060e8849ccd5b02.tar
pttbbs-2d6a3bc48a2c64429f1220d37060e8849ccd5b02.tar.gz
pttbbs-2d6a3bc48a2c64429f1220d37060e8849ccd5b02.tar.bz2
pttbbs-2d6a3bc48a2c64429f1220d37060e8849ccd5b02.tar.lz
pttbbs-2d6a3bc48a2c64429f1220d37060e8849ccd5b02.tar.xz
pttbbs-2d6a3bc48a2c64429f1220d37060e8849ccd5b02.tar.zst
pttbbs-2d6a3bc48a2c64429f1220d37060e8849ccd5b02.zip
- pfterm: maximize reset() to be friendly to non-default fg terminals
- stuff: remove unknown ANSI git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3761 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--docs/pfterm_compat.txt6
-rw-r--r--mbbsd/pfterm.c4
-rw-r--r--mbbsd/stuff.c6
3 files changed, 11 insertions, 5 deletions
diff --git a/docs/pfterm_compat.txt b/docs/pfterm_compat.txt
index 57830e93..8529cf7c 100644
--- a/docs/pfterm_compat.txt
+++ b/docs/pfterm_compat.txt
@@ -27,7 +27,6 @@ FireBBS 正常
PCMan/Fx (neopro 版) 正常
SNP telnet 0.99 正常
BBSTerm 2.2 正常
-NetTerm 4.2x 正常
MultiTerm 3 正常
MultiTerm Pro 2.10b 正常
SimpTerm(sptnet32) 0.9.4 正常
@@ -35,6 +34,11 @@ PtSiTE v4-23i 正常
fterm 2.6 正常
CRT 5.0.0 正常
Nally 1.3.3 正常
+NetTerm 4.2x 正常(*)
+
+*: NetTerm 在新舊系統皆應開啟 Color 的
+"Use bold color, else use ANSI" 與
+"Allow Graphics rendition 0 to reset"
=====================================
Tier 4: (Incompatible)
diff --git a/mbbsd/pfterm.c b/mbbsd/pfterm.c
index 914aaa9b..92539bbb 100644
--- a/mbbsd/pfterm.c
+++ b/mbbsd/pfterm.c
@@ -1505,11 +1505,13 @@ fterm_chattr(char *s, ftattr oattr, ftattr nattr)
// so if these settings are changed then we must reset.
// another case is changing background to default background -
// better use "RESET" to override it.
+ // Same for foreground.
// Possible optimization: when blink/bold on, don't RESET
// for background change?
if ((oblink != blink && !blink) ||
(obold != bold && !bold) ||
- (bg == FTATTR_DEFAULT_BG && obg != bg) )
+ (bg == FTATTR_DEFAULT_BG && obg != bg) ||
+ (fg == FTATTR_DEFAULT_FG && ofg != fg) )
{
if (lead) lead = 0; else *s++ = ';';
*s++ = '0';
diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c
index 958e34f7..bc7a5ef0 100644
--- a/mbbsd/stuff.c
+++ b/mbbsd/stuff.c
@@ -322,9 +322,9 @@ static const char *msg_pressanykey_full =
ANSI_COLOR(37;44) " 請按" ANSI_COLOR(36) " 任意鍵 " ANSI_COLOR(37) "繼續 " ANSI_COLOR(34);
#define msg_pressanykey_full_len (18)
+ // what is 200/1431/506/201?
static const char* msg_pressanykey_trail =
- ANSI_COLOR(33;46) " " ANSI_COLOR(200) ANSI_COLOR(1431) ANSI_COLOR(506)
- "[按任意鍵繼續]" ANSI_COLOR(201) " " ANSI_RESET;
+ ANSI_COLOR(33;46) " [按任意鍵繼續] " ANSI_RESET;
#define msg_pressanykey_trail_len (16+1+4) /* 4 for head */
int
@@ -357,7 +357,7 @@ vmsg(const char *msg)
for (i = 0; i <= pad-2; i += 2)
outs("▄");
if (i == pad-1)
- outc(' ');
+ outs(" ");
}
outs(ANSI_RESET);
} else {