1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Patch from Robert de Bath to ifdef out the Windows-specific hack for

the offset horizontal line characters in the VT100 line-drawing set
(o,p,r,s), so that no trace of it - and hence no pointless performance
hit - is compiled into the cross-platform modules on non-Windows
platforms.

[originally from svn r9467]
This commit is contained in:
Simon Tatham 2012-04-22 14:22:10 +00:00
parent bb1d656dd4
commit 3225f3743e
3 changed files with 5 additions and 0 deletions

View File

@ -5019,11 +5019,13 @@ static void do_paint(Terminal *term, Context ctx, int may_optimise)
break_run = ((tattr ^ attr) & term->attr_mask) != 0;
#ifdef USES_VTLINE_HACK
/* Special hack for VT100 Linedraw glyphs */
if ((tchar >= 0x23BA && tchar <= 0x23BD) ||
(j > 0 && (newline[j-1].chr >= 0x23BA &&
newline[j-1].chr <= 0x23BD)))
break_run = TRUE;
#endif
/*
* Separate out sequences of characters that have the

View File

@ -3371,6 +3371,7 @@ void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len,
if (attr & ATTR_NARROW)
nfont |= FONT_NARROW;
#ifdef USES_VTLINE_HACK
/* Special hack for the VT100 linedraw glyphs. */
if (text[0] >= 0x23BA && text[0] <= 0x23BD) {
switch ((unsigned char) (text[0])) {
@ -3395,6 +3396,7 @@ void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len,
force_manual_underline = 1;
}
}
#endif
/* Anything left as an original character set is unprintable. */
if (DIRECT_CHAR(text[0]) &&

View File

@ -145,6 +145,7 @@ typedef struct terminal_tag Terminal;
#define TICKSPERSEC 1000 /* GetTickCount returns milliseconds */
#define DEFAULT_CODEPAGE CP_ACP
#define USES_VTLINE_HACK
typedef HDC Context;