diff --git a/harbour/ChangeLog b/harbour/ChangeLog index e9a2d8a5b8..6ac603967c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,11 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2008-01-16 03:18 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/vm/macro.c + ! strip trailing and leading SPACEs and TABs from macro compiled + symbols + 2008-01-16 01:20 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) + harbout/contrib/hbzlib + added support for zlib library and zip files (based on diff --git a/harbour/source/vm/macro.c b/harbour/source/vm/macro.c index 26580490fd..47fa03ef4f 100644 --- a/harbour/source/vm/macro.c +++ b/harbour/source/vm/macro.c @@ -659,7 +659,15 @@ char * hb_macroTextSymbol( char *szString, ULONG ulLength, BOOL *pfNewString ) szResult = hb_macroTextSubst( szString, &ulLength ); - while( ulLength && szResult[ ulLength - 1 ] == ' ' ) + while( ulLength && ( szResult[ 0 ] == ' ' || szResult[ 0 ] == '\t' ) ) + { + ++szResult; + ++szString; + --ulLength; + } + + while( ulLength && ( szResult[ ulLength - 1 ] == ' ' || + szResult[ ulLength - 1 ] == '\t' ) ) --ulLength; /* NOTE: This uses _a-zA-Z0-9 pattern to check for a valid name