Patch from Robert de Bath to ifdef out the Windows-specific hack for
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 22 Apr 2012 14:22:10 +0000 (14:22 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 22 Apr 2012 14:22:10 +0000 (14:22 +0000)
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

terminal.c
windows/window.c
windows/winstuff.h

index e3f61e9..e30784b 100644 (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
index 80ca795..4425e19 100644 (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]) &&
index 13ec3d8..3ca0427 100644 (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;