From 2a8910976342ae4145a18a97a325a6807d4f07da Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Sat, 31 May 2008 12:45:01 +0000 Subject: [PATCH] 2008-05-31 14:44 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbmacro.ch * harbour/source/vm/macro.c * harbour/source/vm/hvm.c - removed HB_MACRO_STATEMENTS and HB_SM_PREPROC --- harbour/ChangeLog | 6 +++++ harbour/include/hbmacro.ch | 1 - harbour/source/vm/hvm.c | 10 -------- harbour/source/vm/macro.c | 52 +------------------------------------- 4 files changed, 7 insertions(+), 62 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index bfacb26b38..c71fc95442 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,12 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-05-31 14:44 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/include/hbmacro.ch + * harbour/source/vm/macro.c + * harbour/source/vm/hvm.c + - removed HB_MACRO_STATEMENTS and HB_SM_PREPROC + 2008-05-31 13:15 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * contrib/hbcurl/hbcurl.c * contrib/hbcurl/tests/ftp_uldl.prg diff --git a/harbour/include/hbmacro.ch b/harbour/include/hbmacro.ch index 80ce5f7414..db686d785c 100644 --- a/harbour/include/hbmacro.ch +++ b/harbour/include/hbmacro.ch @@ -58,7 +58,6 @@ /* runtime settings for macro compiler */ #define HB_SM_HARBOUR 1 /* extended Harbour features */ #define HB_SM_XBASE 2 /* extended xbase compatibility */ -#define HB_SM_PREPROC 4 /* enable/disable commands preprocessing */ #define HB_SM_SHORTCUTS 8 /* enable/disable sortcuts for logical operators */ #define HB_SM_ARRSTR 16 /* enable/disable strings as array of bytes */ #define HB_SM_RT_MACRO 64 /* disable automatic setup of macro flag */ diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index 8579daed97..33dac507dd 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -90,12 +90,6 @@ #include "hbmemory.ch" -#ifdef HB_MACRO_STATEMENTS - #include "hbpp.h" -#endif - -/* DEBUG only*/ -/* #include */ HB_FUNC_EXTERN( SYSINIT ); @@ -508,10 +502,6 @@ HB_EXPORT int hb_vmQuit( void ) hb_vmDoExitFunctions(); /* process defined EXIT functions */ - #ifdef HB_MACRO_STATEMENTS - hb_pp_Free(); - #endif - hb_idleShutDown(); /* process AtExit registered functions */ diff --git a/harbour/source/vm/macro.c b/harbour/source/vm/macro.c index 6a25e9855d..4c1c3bb387 100644 --- a/harbour/source/vm/macro.c +++ b/harbour/source/vm/macro.c @@ -59,10 +59,6 @@ #include "hbcomp.h" #include "hbstack.h" -#ifdef HB_MACRO_STATEMENTS - #include "hbpp.h" -#endif - /* various flags for macro compiler */ #ifdef HB_C52_STRICT static ULONG s_macroFlags = HB_SM_SHORTCUTS; @@ -390,10 +386,7 @@ void hb_macroGetValue( HB_ITEM_PTR pItem, BYTE iContext, BYTE flags ) HB_MACRO struMacro; int iStatus; BOOL fFree; -#ifdef HB_MACRO_STATEMENTS - char * pText; - char * pOut; -#endif + struMacro.mode = HB_MODE_MACRO; struMacro.supported = (flags & HB_SM_RT_MACRO) ? s_macroFlags : flags; struMacro.Flags = HB_MACRO_GEN_PUSH; @@ -436,42 +429,7 @@ void hb_macroGetValue( HB_ITEM_PTR pItem, BYTE iContext, BYTE flags ) struMacro.Flags |= HB_MACRO_GEN_PARE; } } - -#ifdef HB_MACRO_STATEMENTS - if( struMacro.supported & HB_SM_PREPROC ) - { - char * ptr; - int slen; - - pText = ( char * ) hb_xgrab( HB_PP_STR_SIZE ); - pOut = ( char * ) hb_xgrab( HB_PP_STR_SIZE ); - ptr = pText; - slen = HB_MIN( strlen( struMacro.string ), HB_PP_STR_SIZE - 1 ); - memcpy( pText, struMacro.string, slen ); - pText[ slen ] = 0; - memset( pOut, 0, HB_PP_STR_SIZE ); - - HB_SKIPTABSPACES( ptr ); - - if( !hb_pp_topDefine ) - { - hb_pp_Table(); - } - - hb_pp_ParseExpression( ptr, pOut ); - struMacro.string = pText; - struMacro.length = strlen( pText ); - } -#endif - iStatus = hb_macroParse( &struMacro ); -#ifdef HB_MACRO_STATEMENTS - if( struMacro.supported & HB_SM_PREPROC ) - { - hb_xfree( pText ); - hb_xfree( pOut ); - } -#endif hb_stackPop(); /* remove compiled string */ if( iStatus == HB_MACRO_OK && ( struMacro.status & HB_MACRO_CONT ) ) { @@ -968,14 +926,6 @@ HB_FUNC( HB_SETMACRO ) hb_macroSetMacro( hb_itemGetL( pValue ), ulFlags ); break; - case HB_SM_PREPROC : - /* enable/disable preprocessing before compilation */ - hb_retl( s_macroFlags & ulFlags ); - pValue = hb_param( 2, HB_IT_LOGICAL ); - if( pValue ) - hb_macroSetMacro( hb_itemGetL( pValue ), ulFlags ); - break; - case HB_SM_ARRSTR : /* enable/disable processing of strings as an array of bytes */ hb_retl( s_macroFlags & ulFlags );