2000-06-17 13:38 UTC-0800 Ron Pinkas <Ron@Profit-Master.com>

* source/pp/ppcore.c
     ! Fixed isExpress() to check last charcter of the expression and return false if it is one of these:
       ":/*+-%^=(<>". This fixed another problem reported by Brian Hays to do with the VO comaptibility #translates.

     /* We still have to find, why was isExpress() called with only partial expression, this should be fixed. */
This commit is contained in:
Ron Pinkas
2000-06-17 20:46:01 +00:00
parent b271952322
commit ca4f54eba8
2 changed files with 29 additions and 1 deletions

View File

@@ -1,3 +1,10 @@
2000-06-17 13:38 UTC-0800 Ron Pinkas <Ron@Profit-Master.com>
* source/pp/ppcore.c
! Fixed isExpress() to check last charcter of the expression and return false if it is one of these:
":/*+-%^=(<>". This fixed another problem reported by Brian Hays to do with the VO comaptibility #translates.
/* We still have to find, why was isExpress() called with only partial expression, this should be fixed. */
2000-06-17 17:10 UTC+0500 April White <awhite@user.rose.com>
* hbapi.h

View File

@@ -1473,7 +1473,12 @@ static int WorkMarkers( char ** ptrmp, char ** ptri, char * ptro, int * lenres,
{
lenreal = stroncpy( expreal, *ptri, ipos-1 );
if( ipos > 1 && isExpres( expreal ) )
*ptri += lenreal;
{
/*
printf( "Accepted: >%s<\n", expreal );
*/
*ptri += lenreal;
}
else
{
if( s_numBrackets )
@@ -1705,7 +1710,9 @@ static int getExpReal( char * expreal, char ** ptri, BOOL prlist, int maxrez )
if( expreal != NULL )
{
if( *(expreal-1) == ' ' ) { expreal--; lens--; };
*expreal = '\0';
/*
printf( "\nLen=%i \'%s\'\n", lens, expreal-lens);
*/
@@ -1716,10 +1723,24 @@ static int getExpReal( char * expreal, char ** ptri, BOOL prlist, int maxrez )
static BOOL isExpres( char * stroka )
{
int l1,l2;
HB_TRACE(HB_TR_DEBUG, ("isExpres(%s)", stroka));
/*
printf( "Exp: >%s<\n", stroka );
*/
l1 = strlen( stroka );
l2 = getExpReal( NULL, &stroka, FALSE, HB_PP_STR_SIZE );
/*
printf( "Len1: %i Len2: %i RealExp: >%s< Last: %c\n", l1, l2, stroka - l2, ( stroka - l2 )[l1-1] );
*/
/* Ron Pinkas modified 2000-06-17 Expression can't be valid if last charcter is one of these: ":/*+-%^=(<>"
return ( l1 <= l2 );
*/
return ( l1 <= l2 && ! IsInStr( ( stroka - l2 )[l1-1], ":/*+-%^=(<>" ) );
}
static BOOL TestOptional( char *ptr1, char *ptr2 )