1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 03:22:48 -05:00

xterm apparently supports ESC[90m through ESC[97m to set bright

foreground colours, and ESC[100m through ESC[107m to set bright
background colours. Hence, so do we. Bright-foreground is
distinguishable from bold, and bright-background distinguishable
from blink, when it leaves terminal.c; the front end may then choose
to display them in the same way if it's configured to do so. This
change makes the xterm backend for Turbo Vision (!!!) work properly.
Untested on Mac.

[originally from svn r2734]
This commit is contained in:
Simon Tatham
2003-01-27 23:03:31 +00:00
parent 6aa4211f6e
commit c370336a92
7 changed files with 75 additions and 61 deletions

View File

@ -1,4 +1,4 @@
/* $Id: macterm.c,v 1.57 2003/01/27 00:39:01 ben Exp $ */
/* $Id: macterm.c,v 1.58 2003/01/27 23:03:30 simon Exp $ */
/*
* Copyright (c) 1999 Simon Tatham
* Copyright (c) 1999, 2002 Ben Harris
@ -1090,8 +1090,10 @@ static pascal void do_text_for_device(short depth, short devflags,
if (HAVE_COLOR_QD()) {
if (depth > 2) {
fgcolour = ((a->attr & ATTR_FGMASK) >> ATTR_FGSHIFT) * 2;
fgcolour = ((a->attr & ATTR_FGMASK) >> ATTR_FGSHIFT);
fgcolour = (fgcolour & 0xF) * 2 + (fgcolour & 0x10 ? 1 : 0);
bgcolour = ((a->attr & ATTR_BGMASK) >> ATTR_BGSHIFT) * 2;
bgcolour = (bgcolour & 0xF) * 2 + (bgcolour & 0x10 ? 1 : 0);
} else {
/*
* NB: bold reverse in 2bpp breaks with the usual PuTTY model and
@ -1106,7 +1108,7 @@ static pascal void do_text_for_device(short depth, short devflags,
bgcolour = tmp;
}
if (bright && depth > 2)
fgcolour++;
fgcolour |= 1;
if ((a->attr & TATTR_ACTCURS) && depth > 1) {
fgcolour = CURSOR_FG;
bgcolour = CURSOR_BG;