From f43f85e0ebea475ff7e3fa4717ba66eb1e62849a Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Wed, 22 Oct 2008 17:52:06 +0000 Subject: [PATCH] 2008-10-22 19:52 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rtl/gttrm/gttrm.c * use CP437 for BOX characters when terminal is in UTF-8 mode --- harbour/ChangeLog | 4 ++++ harbour/source/rtl/gttrm/gttrm.c | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 95d0012680..4fb018fee3 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,10 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-10-22 19:52 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/rtl/gttrm/gttrm.c + * use CP437 for BOX characters when terminal is in UTF-8 mode + 2008-10-22 19:13 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/vm/thread.c ! fixed memory allocation in HB_THREADWAIT() when more then 16 diff --git a/harbour/source/rtl/gttrm/gttrm.c b/harbour/source/rtl/gttrm/gttrm.c index cafe4f6a5e..bfc1354768 100644 --- a/harbour/source/rtl/gttrm/gttrm.c +++ b/harbour/source/rtl/gttrm/gttrm.c @@ -115,6 +115,7 @@ static HB_GT_FUNCS SuperTable; #define HB_GTTRM_ATTR_PROT 0x0100 #define HB_GTTRM_ATTR_ACSC 0x0100 #endif +#define HB_GTTRM_ATTR_BOX 0x0800 #define TERM_ANSI 1 #define TERM_LINUX 2 @@ -722,7 +723,8 @@ static void hb_gt_trm_termOutTrans( PHB_GTTRM pTerm, BYTE * pStr, int iLen, int if( pTerm->fUTF8 ) { - if( ( iAttr & HB_GTTRM_ATTR_ACSC ) && pTerm->cdpEN ) + if( ( iAttr & ( HB_GTTRM_ATTR_ACSC | HB_GTTRM_ATTR_BOX ) ) && + pTerm->cdpEN ) cdp = pTerm->cdpEN; else if( pTerm->cdpHost ) cdp = pTerm->cdpHost; @@ -2751,7 +2753,7 @@ static void hb_gt_trm_SetTerm( PHB_GTTRM pTerm ) } pTerm->mouse_type = MOUSE_NONE; pTerm->esc_delay = ESC_DELAY; - pTerm->iAttrMask = ~0; + pTerm->iAttrMask = ~HB_GTTRM_ATTR_BOX; szTerm = getenv("HB_TERM"); if( szTerm == NULL || *szTerm == '\0' ) @@ -3349,6 +3351,8 @@ static void hb_gt_trm_Redraw( PHB_GT pGT, int iRow, int iCol, int iSize ) iColor = bColor | ( pTerm->boxattr[ usChar ] & ~HB_GTTRM_ATTR_CHAR ); if( !pTerm->fUTF8 ) usChar = pTerm->boxattr[ usChar ] & HB_GTTRM_ATTR_CHAR; + else + iColor |= HB_GTTRM_ATTR_BOX; } else {