[BACK]Return to scan.l CVS log [TXT][DIR] Up to [local] / src / usr.bin / lex

Diff for /src/usr.bin/lex/scan.l between version 1.5 and 1.6

version 1.5, 2002/05/30 10:53:45 version 1.6, 2002/05/31 00:56:21
Line 51 
Line 51 
         return CHAR;          return CHAR;
   
 #define RETURNNAME \  #define RETURNNAME \
         strlcpy( nmstr, yytext, sizeof nmstr); \          strcpy( nmstr, yytext ); \
         return NAME;          return NAME;
   
 #define PUT_BACK_STRING(str, start) \  #define PUT_BACK_STRING(str, start) \
Line 138 
Line 138 
         ^"%"[^sxaceknopr{}].*   synerr( _( "unrecognized '%' directive" ) );          ^"%"[^sxaceknopr{}].*   synerr( _( "unrecognized '%' directive" ) );
   
         ^{NAME}         {          ^{NAME}         {
                         strlcpy( nmstr, yytext, sizeof nmstr );                          strcpy( nmstr, yytext );
                         didadef = false;                          didadef = false;
                         BEGIN(PICKUPDEF);                          BEGIN(PICKUPDEF);
                         }                          }
Line 186 
Line 186 
         {WS}            /* separates name and definition */          {WS}            /* separates name and definition */
   
         {NOT_WS}.*      {          {NOT_WS}.*      {
                         strlcpy( (char *) nmdef, yytext, sizeof nmdef);                          strcpy( (char *) nmdef, yytext );
   
                         /* Skip trailing whitespace. */                          /* Skip trailing whitespace. */
                         for ( i = strlen( (char *) nmdef ) - 1;                          for ( i = strlen( (char *) nmdef ) - 1;
Line 279 
Line 279 
         yyclass         return OPT_YYCLASS;          yyclass         return OPT_YYCLASS;
   
         \"[^"\n]*\"     {          \"[^"\n]*\"     {
                         strlcpy( nmstr, yytext + 1, sizeof nmstr);                          strcpy( nmstr, yytext + 1 );
                           nmstr[strlen( nmstr ) - 1] = '\0';
                         return NAME;                          return NAME;
                         }                          }
   
Line 402 
Line 403 
         "["({FIRST_CCL_CHAR}|{CCL_EXPR})({CCL_CHAR}|{CCL_EXPR})*        {          "["({FIRST_CCL_CHAR}|{CCL_EXPR})({CCL_CHAR}|{CCL_EXPR})*        {
                         int cclval;                          int cclval;
   
                         strlcpy( nmstr, yytext, sizeof nmstr);                          strcpy( nmstr, yytext );
   
                         /* Check to see if we've already encountered this                          /* Check to see if we've already encountered this
                          * ccl.                           * ccl.
Line 437 
Line 438 
                         register Char *nmdefptr;                          register Char *nmdefptr;
                         Char *ndlookup();                          Char *ndlookup();
   
                         strlcpy( nmstr, yytext + 1, sizeof nmstr );                          strcpy( nmstr, yytext + 1 );
                         nmstr[yyleng - 2] = '\0';  /* chop trailing brace */                          nmstr[yyleng - 2] = '\0';  /* chop trailing brace */
   
                         if ( (nmdefptr = ndlookup( nmstr )) == 0 )                          if ( (nmdefptr = ndlookup( nmstr )) == 0 )

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6