From: simon Date: Sun, 22 Apr 2012 14:22:10 +0000 (+0000) Subject: Patch from Robert de Bath to ifdef out the Windows-specific hack for X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/9517adb37f66572b257ed85fbd4af7a91c3750a6 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. git-svn-id: svn://svn.tartarus.org/sgt/putty@9467 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/terminal.c b/terminal.c index e3f61e93..e30784b9 100644 --- a/terminal.c +++ b/terminal.c @@ -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 diff --git a/windows/window.c b/windows/window.c index 80ca7955..4425e191 100644 --- a/windows/window.c +++ b/windows/window.c @@ -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]) && diff --git a/windows/winstuff.h b/windows/winstuff.h index 13ec3d85..3ca0427e 100644 --- a/windows/winstuff.h +++ b/windows/winstuff.h @@ -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;