Updating hbpp.c

This commit is contained in:
Alexander S.Kresin
1999-09-21 11:48:42 +00:00
parent e81b5e1f18
commit d370205a01
2 changed files with 27 additions and 4 deletions

View File

@@ -1,3 +1,8 @@
19990921-15:33 GMT+3 Alexander Kresin
* source/hbpp/hbpp.c
* Yet another bug fixed with restrivted match markers consisting of more
than one word ( 'FROM USER', for example )
19990921-00:07 EDT Paul Tucker <ptucker@sympatico.ca>
* source/vm/hvm.c
source/rtl/fm.c

View File

@@ -86,7 +86,8 @@ void pp_Stuff (char*, char*, int, int, int);
int strocpy (char*, char* );
int stroncpy (char*, char*, int);
int strincpy (char*, char*);
int strincmp (char*, char**, int);
int truncmp (char*, char**, int);
int strincmp (char*, char** );
int strolen ( char* );
void stroupper ( char* );
int strotrim ( char* );
@@ -889,7 +890,7 @@ int CommandStuff ( char *ptrmp, char *inputLine, char * ptro, int *lenres, int c
break;
default: /* Key word */
ptr = ptrmp;
if ( *ptri == ',' || strincmp(ptri, &ptrmp, !com_or_xcom ) )
if ( *ptri == ',' || truncmp(ptri, &ptrmp, !com_or_xcom ) )
{
if ( numBrackets )
{
@@ -1083,7 +1084,7 @@ int WorkMarkers( char **ptrmp, char **ptri, char *ptro, int *lenres )
SKIPTABSPACES( ptr );
/* Comparing real parameter and restriction value */
ptrtemp = ptr;
if ( !strincmp ( *ptri, &ptr, FALSE ) )
if ( !strincmp ( *ptri, &ptr ) )
{
lenreal = stroncpy( expreal, *ptri, (ptr-ptrtemp) );
*ptri += lenreal;
@@ -1778,7 +1779,7 @@ int stroncpy (char* ptro, char* ptri, int lens )
return i;
}
int strincmp (char* ptro, char** ptri, int lTrunc )
int truncmp (char* ptro, char** ptri, int lTrunc )
{
char *ptrb = ptro, co, ci;
@@ -1800,6 +1801,23 @@ int strincmp (char* ptro, char** ptri, int lTrunc )
return 1;
}
int strincmp (char* ptro, char** ptri )
{
char *ptrb = ptro, co, ci;
for ( ; **ptri != ',' && **ptri != '[' && **ptri != ']' &&
**ptri != '\1' && **ptri != '\0' && toupper(**ptri)==toupper(*ptro);
ptro++, (*ptri)++ );
co = *(ptro-1);
ci = **ptri;
if ( ( ( ci == ' ' || ci == ',' || ci == '[' ||
ci == ']' || ci == '\1' || ci == '\0' ) &&
( ( !ISNAME(*ptro) && ISNAME(co) ) ||
( !ISNAME(co) ) ) ) )
return 0;
return 1;
}
int strincpy (char* ptro, char* ptri )
{
int lens = 0;