Updating preprocessor files

This commit is contained in:
Alexander S.Kresin
1999-07-31 19:08:47 +00:00
parent 9642b6bc4b
commit 0ad31b61df
2 changed files with 18 additions and 4 deletions

View File

@@ -1,3 +1,7 @@
19990731-22:55 Alexander Kresin
* source\hbpp\hbpp.c
* Fixed bugs mentioned by Victor Szel
19990731-20:16 GMT+1 Antonio Linares <alinares@fivetech.com>
* tests\working\debugger.prg
* improved sample.

View File

@@ -636,6 +636,7 @@ int ParseExpression( char* sLine, char* sOutLine )
if ( kolpass < 3 )
{
ptri = sLine + isdvig;
SKIPTABSPACES( ptri );
if ( ISNAME(*ptri) )
NextName( &ptri, sToken, NULL);
else
@@ -1748,18 +1749,27 @@ int NextName ( char** sSource, char* sDest, char **sOut )
int NextParm ( char** sSource, char* sDest )
{
int lenName = 0, State = STATE_NORMAL;
int lenName = 0, State = STATE_NORMAL, StBr = 0;
SKIPTABSPACES( (*sSource) );
while ( **sSource != '\0' )
{
if ( State == STATE_QUOTE1 )
{ if ( **sSource == '\'' ) State = STATE_NORMAL; }
{
if ( **sSource == '\'' ) State = STATE_NORMAL;
}
else if ( State == STATE_QUOTE2 )
{ if ( **sSource == '\"' ) State = STATE_NORMAL; }
{
if ( **sSource == '\"' ) State = STATE_NORMAL;
}
else if ( **sSource == '\"' ) State = STATE_QUOTE2;
else if ( **sSource == '\'' ) State = STATE_QUOTE1;
else if ( **sSource == ',' || **sSource == ')' ) break;
else if ( **sSource == '(' ) StBr++;
else if ( **sSource == ')' || **sSource == ',' )
{
if( !StBr ) break;
if( **sSource == ')' ) StBr--;
}
if ( sDest != NULL ) *sDest++ = **sSource;
(*sSource)++;