Updating preprocessor files

This commit is contained in:
Alexander S.Kresin
1999-09-26 19:01:48 +00:00
parent 1afd8ae8f1
commit 14b3ecc8fa
2 changed files with 24 additions and 18 deletions

View File

@@ -1,3 +1,7 @@
19990926-22:45 GMT+3 Alexander Kresin
* source/hbpp/hbpp.c
* Fixed a bug, noted by Antonio Linares
19990926-19:22 GMT+1 Victor Szel <info@szelvesz.hu>
* funclist.txt
+ __ACCEPTSTR marked ready.
@@ -6,7 +10,7 @@
19990926-17:22 GMT+1 Victor Szel <info@szelvesz.hu>
* source/rtl/asort.prg
! The block return type detection code now calls the block with
! The block return type detection code now calls the block with
the nStart item, and not always the first one. This way it has less
side effect, since the block is not called with elements which would not
be accessed at all normally.
@@ -16,8 +20,8 @@
*source/compiler/harbour.y
* fixed generation of invalid pcodes when nested IIF were used
* added an error message when any statements are used after
DO CASE and before the first CASE or the OTHERWISE
* added an error message when any statements are used after
DO CASE and before the first CASE or the OTHERWISE
*include/hberrors.h
* added ERR_MAYHEM_IN_CASE error code

View File

@@ -443,20 +443,24 @@ void ConvertPatterns ( char *mpatt, int mlen, char *rpatt, int rlen )
if ( *(mpatt+i) == '<' )
{ /* Drag match marker, determine it type */
explen = 0; ipos = i; i++; exptype = '0';
if ( *(mpatt+i) == '*' )
if ( *(mpatt+i) == '*' ) /* Wild match marker */
{ exptype = '3'; i++; }
else if ( *(mpatt+i) == '(' )
else if ( *(mpatt+i) == '(' ) /* Extended expression match marker */
{ exptype = '4'; i++; }
while ( *(mpatt+i) != '>' )
{
if ( *(mpatt+i) == ',' )
if ( *(mpatt+i) == ',' ) /* List match marker */
{
exptype = '1';
while ( *(mpatt+i) != '>' ) i++;
break;
}
else if ( *(mpatt+i) == ':' )
{ exptype = '2'; break; }
else if ( *(mpatt+i) == ':' ) /* Restricted match marker */
{
exptype = '2';
*(mpatt+i--) = ' ';
break;
}
*(exppatt+explen++) = *(mpatt+i++);
}
if ( exptype == '3' )
@@ -988,10 +992,11 @@ int RemoveSlash( char *stroka )
{
if( *ptr == '\\' && ( *(ptr+1) == '[' || *(ptr+1) == ']' ||
*(ptr+1) == '{' || *(ptr+1) == '}' || *(ptr+1) == '<' ||
*(ptr+1) == '>' ) )
*(ptr+1) == '>' || *(ptr+1) == '\'' || *(ptr+1) == '\"' ) )
{
pp_Stuff ( "", ptr, 0, 1, lenres - (ptr - stroka) );
lenres--;
ptr++;
}
}
break;
@@ -1022,7 +1027,6 @@ int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres )
{
if ( numBrackets )
{
/* SearnRep( exppatt,"",0,ptro,lenres); */
return 0;
}
}
@@ -1044,7 +1048,6 @@ int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres )
{
if ( numBrackets )
{
/* SearnRep( exppatt,"",0,ptro,lenres); */
return 0;
}
}
@@ -1063,7 +1066,6 @@ int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres )
{
if ( numBrackets )
{
/* SearnRep( exppatt,"",0,ptro,lenres); */
return 0;
}
}
@@ -1073,7 +1075,6 @@ int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres )
{
if ( numBrackets )
{
/* SearnRep( exppatt,"",0,ptro,lenres); */
return 0;
}
else lenreal = 0;
@@ -1137,7 +1138,6 @@ int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres )
{ /* If restricted match marker doesn't correspond to real parameter */
if ( numBrackets )
{
/* SearnRep( exppatt,"",0,ptro,lenres); */
return 0;
}
else return 0;
@@ -1716,23 +1716,25 @@ int md_strAt(char *szSub, int lSubLen, char *szText, int checkword, int checkPrt
{
if( State == STATE_QUOTE1 )
{
if ( *(szText+lPos) == '\'' ) State = STATE_NORMAL;
if ( *(szText+lPos) == '\'' && ( lPos == 0 || *(szText+lPos-1) != '\\' ) )
State = STATE_NORMAL;
lPos++;
}
else if( State == STATE_QUOTE2 )
{
if ( *(szText+lPos) == '\"' ) State = STATE_NORMAL;
if ( *(szText+lPos) == '\"' && ( lPos == 0 || *(szText+lPos-1) != '\\' ) )
State = STATE_NORMAL;
lPos++;
}
else
{
if ( *(szText+lPos) == '\"' )
if ( *(szText+lPos) == '\"' && ( lPos == 0 || *(szText+lPos-1) != '\\' ) )
{
State = STATE_QUOTE2;
lPos++;
continue;
}
else if ( *(szText+lPos) == '\'' )
else if ( *(szText+lPos) == '\'' && ( lPos == 0 || *(szText+lPos-1) != '\\' ) )
{
State = STATE_QUOTE1;
lPos++;