2002-01-15 20:40 UTC+0300 Alexander Kresin <alex@belacy.belgorod.su>

This commit is contained in:
Alexander S.Kresin
2002-01-15 17:41:13 +00:00
parent 1f1c222b95
commit ef790a0a55
2 changed files with 64 additions and 25 deletions

View File

@@ -7,6 +7,10 @@
For example:
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
* fixed 3 bugs with index not updating the tree
2002-01-16 11:10 UTC-0500 David G. Holm <dholm@jsd-llc.com>
* contrib/libct/charsort.c
! OS/2 IBM C++ fix.
2002-01-16 05:00 UTC+0700 Andi Jahja <harbour@cbn.net.id>

View File

@@ -880,7 +880,7 @@ static void ConvertPatterns( char * mpatt, int mlen, char * rpatt, int rlen )
int explen, rmlen;
char exppatt[ MAX_NAME ], expreal[ 5 ] = "\1 0";
char lastchar = '@', exptype;
char * ptr;
char * ptr, * ptrtmp;
HB_TRACE(HB_TR_DEBUG, ("ConvertPatterns(%s, %d, %s, %d)", mpatt, mlen, rpatt, rlen));
@@ -958,31 +958,66 @@ static void ConvertPatterns( char * mpatt, int mlen, char * rpatt, int rlen )
while( (ifou = hb_strAt( exppatt, explen, ptr, rlen-(ptr-rpatt) )) > 0 )
{
/* Convert result marker into inner format */
ifou --;
ptr += ifou;
if( *(ptr-2) == '<' && *(ptr+explen-1) == '>' &&
*(ptr-3) != '\\' && *(ptr+explen-2) != '\\' ) /* <...> */
{
if( *(ptr-3) == '#' && *(ptr-4) != '\\' ) /* #<...> */
{ exptype = '1'; ptr -= 3; rmlen = explen+3; }
else
{ exptype = '0'; ptr -= 2; rmlen = explen+2; }
}
else if( *(ptr-3) == '<' && *(ptr+explen) == '>' &&
*(ptr-4) != '\\' && *(ptr+explen-1) != '\\' ) /* < ... > */
{
ptr -= 2;
if( *ptr == '\"' ) exptype = '2';
else if( *ptr == '(' ) exptype = '3';
else if( *ptr == '{' ) exptype = '4';
else if( *ptr == '.' ) exptype = '5';
else if( *ptr == '-' ) exptype = '6';
ptr--;
rmlen = explen+4;
}
else continue;
expreal[2] = exptype;
hb_pp_Stuff( expreal, ptr, 4, rmlen, rlen );
rlen += 4 - rmlen;
ptrtmp = ptr + 1;
rmlen = explen;
exptype = '0';
do
{
ptr--;
rmlen++;
ifou--;
if( *ptr == '<' )
continue;
else if( *ptr == '\"' )
exptype = '2';
else if( *ptr == '(' )
exptype = '3';
else if( *ptr == '{' )
exptype = '4';
else if( *ptr == '.' )
exptype = '5';
else if( *ptr == '-' )
exptype = '6';
else if( *ptr == ' ' || *ptr == '\t' )
continue;
else
ifou = -1;
}
while( ifou >= 0 && *ptr!='<' && *(ptr-1)!= '\\' );
if( ifou >=0 && *ptr=='<' )
{
ptr += rmlen++;
while( *ptr != '\0' && *ptr != '>' && *(ptr-1) != '\\' )
{
if( *ptr != ' ' && *ptr != '\t' && *ptr != '\"' && *ptr != ')' && *ptr != '}' && *ptr != '.' && *ptr != '-' )
{
ifou = -1;
break;
}
rmlen++;
ptr++;
}
if( ifou >=0 && *ptr=='>' )
{
ptr -= rmlen;
ptr++;
if( exptype == '0' && *(ptr-1) == '#' && *(ptr-2) != '\\' )
{
exptype = '1';
ptr--;
rmlen++;
}
expreal[2] = exptype;
hb_pp_Stuff( expreal, ptr, 4, rmlen, rlen );
rlen += 4 - rmlen;
}
else
ptr = ptrtmp;
}
else
ptr = ptrtmp;
}
}
i++;