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
This commit is contained in:
Przemyslaw Czerpak
2008-01-16 02:18:23 +00:00
parent b2f93a309a
commit 47c3dbfebc
2 changed files with 14 additions and 1 deletions

View File

@@ -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