diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c0ba27c2c8..becabae3e4 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,8 @@ +2001-07-16 09:45 UTC-0800 Ron Pinkas + * source/vm/hvm.c + * source/vm/macro.c + + Wrapped macro statement support within #ifdef HB_MACRO_STATEMENTS (which is NOT defined). + 2001-07-16 15:19 GMT+1 Patrick Mast * source/rtl/profiler.prg * Renamed function from Profiler() to HB_Profiler() diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index 6e2fd253c5..be6028b2a7 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -87,7 +87,10 @@ #include "hbvm.h" #include "hbpcode.h" #include "hbset.h" -#include "hbpp.h" + +#ifdef HB_MACRO_STATEMENTS + #include "hbpp.h" +#endif typedef struct _SYMBOLS { @@ -388,11 +391,14 @@ void hb_vmQuit( void ) { HB_TRACE(HB_TR_DEBUG, ("hb_vmQuit()")); + #ifdef HB_MACRO_STATEMENTS + hb_pp_Free(); + #endif + if( hb_vm_aiMacroListParameters ) { hb_xfree( (void*) hb_vm_aiMacroListParameters ); } - hb_pp_Free(); s_uiActionRequest = 0; /* EXIT procedures should be processed */ hb_vmDoExitFunctions(); /* process defined EXIT functions */ diff --git a/harbour/source/vm/macro.c b/harbour/source/vm/macro.c index c9a3b7ec9d..7741cabb55 100644 --- a/harbour/source/vm/macro.c +++ b/harbour/source/vm/macro.c @@ -58,7 +58,10 @@ #include "hbcomp.h" #include "hbstack.h" #include "hbmemvar.ch" /* for values returned by hb_memvarScope() */ -#include "hbpp.h" + +#ifdef HB_MACRO_STATEMENTS + #include "hbpp.h" +#endif /* TODO: * include this variable in SET subsystem ? @@ -434,10 +437,12 @@ void hb_macroGetValue( HB_ITEM_PTR pItem ) int iStatus; char * szString = pItem->item.asString.value; - char * pText = ( char * ) hb_xgrab( HB_PP_STR_SIZE ); - char * pOut = ( char * ) hb_xgrab( HB_PP_STR_SIZE ); - char * ptr = pText; - int slen; + #ifdef HB_MACRO_STATEMENTS + char * pText = ( char * ) hb_xgrab( HB_PP_STR_SIZE ); + char * pOut = ( char * ) hb_xgrab( HB_PP_STR_SIZE ); + char * ptr = pText; + int slen; + #endif struMacro.Flags = HB_MACRO_GEN_PUSH; struMacro.bShortCuts = hb_comp_bShortCuts; @@ -445,25 +450,29 @@ void hb_macroGetValue( HB_ITEM_PTR pItem ) struMacro.status = HB_MACRO_CONT; struMacro.iListElements = 0; - slen = HB_MIN( strlen( szString ), HB_PP_STR_SIZE - 1 ); - memcpy( pText, szString, slen ); - pText[ slen ] = 0; - memset( pOut, 0, HB_PP_STR_SIZE ); + #ifdef HB_MACRO_STATEMENTS + slen = HB_MIN( strlen( szString ), HB_PP_STR_SIZE - 1 ); + memcpy( pText, szString, slen ); + pText[ slen ] = 0; + memset( pOut, 0, HB_PP_STR_SIZE ); - HB_SKIPTABSPACES( ptr ); + HB_SKIPTABSPACES( ptr ); - if( !hb_pp_topDefine ) - { - hb_pp_Table(); - } + if( !hb_pp_topDefine ) + { + hb_pp_Table(); + } - hb_pp_ParseExpression( ptr, pOut ); - szString = pText; + hb_pp_ParseExpression( ptr, pOut ); + szString = pText; + #endif iStatus = hb_macroParse( &struMacro, szString ); - hb_xfree( pText ); - hb_xfree( pOut ); + #ifdef HB_MACRO_STATEMENTS + hb_xfree( pText ); + hb_xfree( pOut ); + #endif if( hb_vm_iFunCalls ) {