From 2a1b6c0d6438d7681765210cfacaea36db8823e2 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 27 Oct 2008 09:38:26 +0000 Subject: [PATCH] 2008-10-27 10:37 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * source/pp/ppcore.c + Added '#pragma TEXTHIDDEN=' to control the existing -texthidden option to add light encoding to strings embedded in code. Since this goes with a slight performance hit and it's rarely used, it might be useful to turn it on only for code parts that really needs this. * source/rtl/tget.prg * Corrected an assigment to follow official syntax. --- harbour/ChangeLog | 11 +++++++++++ harbour/source/pp/ppcore.c | 8 ++++++++ harbour/source/rtl/tget.prg | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a98f8ede26..bbdeef1abc 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,17 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-10-27 10:37 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * source/pp/ppcore.c + + Added '#pragma TEXTHIDDEN=' to control the + existing -texthidden option to add light encoding to + strings embedded in code. Since this goes with a slight + performance hit and it's rarely used, it might be useful + to turn it on only for code parts that really needs this. + + * source/rtl/tget.prg + * Corrected an assigment to follow official syntax. + 2008-10-27 00:01 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * source/common/hbver.c * Changed to include bitness even for DJGPP. diff --git a/harbour/source/pp/ppcore.c b/harbour/source/pp/ppcore.c index 0d6196560a..fd86f79441 100644 --- a/harbour/source/pp/ppcore.c +++ b/harbour/source/pp/ppcore.c @@ -2383,6 +2383,14 @@ static void hb_pp_pragmaNew( PHB_PP_STATE pState, PHB_PP_TOKEN pToken ) else fError = TRUE; } + else if( hb_pp_tokenValueCmp( pToken, "TEXTHIDDEN", HB_PP_CMP_DBASE ) ) + { + pValue = hb_pp_pragmaGetLogical( pToken->pNext, &fValue ); + if( pValue ) + fError = hb_pp_setCompilerSwitch( pState, "texthidden", ( int ) fValue ); + else + fError = TRUE; + } else if( hb_pp_tokenValueCmp( pToken, "DYNAMICMEMVAR", HB_PP_CMP_DBASE ) ) { pValue = hb_pp_pragmaGetLogical( pToken->pNext, &fValue ); diff --git a/harbour/source/rtl/tget.prg b/harbour/source/rtl/tget.prg index 5e75f15c3f..05645f95db 100644 --- a/harbour/source/rtl/tget.prg +++ b/harbour/source/rtl/tget.prg @@ -367,7 +367,7 @@ METHOD display() CLASS Get METHOD colorDisp( cColorSpec ) CLASS Get - ::colorSpec( cColorSpec ) + ::colorSpec := cColorSpec ::display() RETURN Self