From 7fcd9edf80bbab84c5cf1a8f7c854c9f8491d730 Mon Sep 17 00:00:00 2001 From: "Alexander S.Kresin" Date: Wed, 5 Apr 2000 10:31:29 +0000 Subject: [PATCH] 20000405-14:28 GMT+3 --- harbour/ChangeLog | 4 ++++ harbour/source/pp/ppcore.c | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 02f13d6c1a..6e212a364d 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,7 @@ +20000405-14:28 GMT+3 Alexander Kresin + * source/pp/ppcore.c + * bugs fixed, reported by Guy Roussin and Chen Kedem + 20000405-10:00 GMT+3 Alexander Kresin * contrib/rdd_ads/ads1.c * added adsFlush() function diff --git a/harbour/source/pp/ppcore.c b/harbour/source/pp/ppcore.c index 062b18bb5a..73e589789a 100644 --- a/harbour/source/pp/ppcore.c +++ b/harbour/source/pp/ppcore.c @@ -584,7 +584,7 @@ static void ParseCommand( char * sLine, BOOL com_or_xcom, BOOL com_or_tra ) HB_SKIPTABSPACES( sLine ); ipos = 0; - while( *sLine != '\0' && *sLine != ' ' && *sLine != '\t' && *sLine != '<') + while( *sLine != '\0' && *sLine != ' ' && *sLine != '\t' && *sLine != '<' && (*sLine !='(' || ipos==0) ) { *(cmdname+ipos++) = *sLine++; } @@ -1844,7 +1844,7 @@ static int ReplacePattern( char patttype, char * expreal, int lenreal, char * pt lenitem = (ifou)? ifou-1:lenreal; if( *expreal != '\0' ) { - if( !lenitem || *expreal == '(' || *expreal == '&' || + if( !lenitem || *expreal == '(' || (*expreal=='&' && lenreal>1) || ( *expreal=='\"' && *(expreal+lenitem-1)=='\"' ) || ( *expreal == '\'' && *(expreal+lenitem-1)=='\'' ) ) { @@ -1870,7 +1870,7 @@ static int ReplacePattern( char patttype, char * expreal, int lenreal, char * pt } while( ifou > 0 ); } - else if( !lenreal || *expreal == '(' || *expreal == '&' || + else if( !lenreal || *expreal == '(' || (*expreal=='&' && lenreal>1) || ( *expreal == '\"' && *( expreal + lenreal - 1 ) == '\"' ) || ( *expreal == '\'' && *( expreal + lenreal - 1 ) == '\'' ) ) { @@ -2582,7 +2582,7 @@ static void ParsePragma( char * sLine ) else if( memcmp( sLine, "EXITSEVERITY", PRAGMAS_LEN ) == 0 ) { hb_comp_iExitLevel = StringToInt( sLine, hb_comp_iExitLevel ); - if( hb_comp_iExitLevel != HB_EXITLEVEL_DEFAULT && + if( hb_comp_iExitLevel != HB_EXITLEVEL_DEFAULT && hb_comp_iExitLevel != HB_EXITLEVEL_SETEXIT && hb_comp_iExitLevel != HB_EXITLEVEL_DELTARGET ) hb_compGenError( hb_pp_szErrors, 'F', HB_PP_ERR_PRAGMA_BAD_VALUE, NULL, NULL );