return CHAR;
#define RETURNNAME \
- if(strlen(yytext) < MAXLINE) \
+ if(yyleng < MAXLINE) \
{ \
strcpy( nmstr, yytext ); \
} \
^"%"[^sxaceknopr{}].* synerr( _( "unrecognized '%' directive" ) );
^{NAME} {
- if(strlen(yytext) < MAXLINE)
+ if(yyleng < MAXLINE)
{
strcpy( nmstr, yytext );
}
{WS} /* separates name and definition */
{NOT_WS}[^\r\n]* {
- if(strlen(yytext) < MAXLINE)
+ if(yyleng < MAXLINE)
{
strcpy( (char *) nmdef, yytext );
}
\"[^"\n]*\" {
- if(strlen(yytext + 1 ) < MAXLINE)
+ if(yyleng-1 < MAXLINE)
{
strcpy( nmstr, yytext + 1 );
}
"["({FIRST_CCL_CHAR}|{CCL_EXPR})({CCL_CHAR}|{CCL_EXPR})* {
int cclval;
- if(strlen(yytext ) < MAXLINE)
+ if(yyleng < MAXLINE)
{
strcpy( nmstr, yytext );
}
end_ch = yytext[yyleng-1];
end_is_ws = end_ch != '}' ? 1 : 0;
- if(strlen(yytext + 1 ) < MAXLINE)
+ if(yyleng-1 < MAXLINE)
{
strcpy( nmstr, yytext + 1 );
}