From e8ddd4fcb67fd544b9c264cd8194bbd8eb628036 Mon Sep 17 00:00:00 2001 From: Ron Pinkas Date: Fri, 2 Mar 2001 17:16:23 +0000 Subject: [PATCH] 2001-03-02 09:10 UTC-0800 Ron Pinkas * source/pp/ppcore.c ! Fixed handling of [Smart] Stringify of a period terminated macro. --- harbour/ChangeLog | 4 ++++ harbour/source/pp/ppcore.c | 28 ++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 27394414d6..9534ea3d43 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,7 @@ +2001-03-02 09:10 UTC-0800 Ron Pinkas + * source/pp/ppcore.c + ! Fixed handling of [Smart] Stringify of a period terminated macro. + 2001-03-01 GMT+1 Antonio Linares * harbour/include/hbapi.h + New function ISOBJECT() added. diff --git a/harbour/source/pp/ppcore.c b/harbour/source/pp/ppcore.c index 756d5e245b..a618b47c9e 100644 --- a/harbour/source/pp/ppcore.c +++ b/harbour/source/pp/ppcore.c @@ -2585,6 +2585,10 @@ static int ReplacePattern( char patttype, char * expreal, int lenreal, char * pt if( ! ifou ) { lenitem--; + if( expreal[lenitem - 1] == '.' ) + { + lenitem--; + } } hb_pp_Stuff( expreal + 1, ptro, lenitem, 0, lenres ); } @@ -2609,6 +2613,11 @@ static int ReplacePattern( char patttype, char * expreal, int lenreal, char * pt if( *expreal == '&' ) { rmlen--; + if( expreal[lenreal - 1] == '.' ) + { + rmlen--; + lenreal--; + } hb_pp_Stuff( expreal + 1, ptro, lenreal - 1, 4, lenres ); } else /* END Ron Pinkas 2000-01-21 */ @@ -2637,7 +2646,14 @@ static int ReplacePattern( char patttype, char * expreal, int lenreal, char * pt ( *expreal == '\'' && *(expreal+lenitem-1)=='\'' ) ) { if( ifou ) lenitem++; - if( *expreal == '&' ) lenitem--; + if( *expreal == '&' ) + { + lenitem--; + if( expreal[lenitem - 1] == '.' ) + { + lenitem--; + } + } hb_pp_Stuff( ( *expreal=='&' ) ? expreal + 1 : expreal, ptro, lenitem, 0, lenres ); } @@ -2662,7 +2678,15 @@ static int ReplacePattern( char patttype, char * expreal, int lenreal, char * pt ( *expreal == '\"' && *( expreal + lenreal - 1 ) == '\"' ) || ( *expreal == '\'' && *( expreal + lenreal - 1 ) == '\'' ) ) { - if( *expreal == '&' ) rmlen--; + if( *expreal == '&' ) + { + rmlen--; + if( expreal[lenreal - 1] == '.' ) + { + rmlen--; + lenreal--; + } + } hb_pp_Stuff( ( *expreal == '&' ) ? expreal + 1 : expreal, ptro, ( *expreal == '&' ) ? lenreal - 1 : lenreal, 4, lenres ); }