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

Diff for /src/usr.bin/lex/gen.c between version 1.8 and 1.9

version 1.8, 2002/05/31 00:56:21 version 1.9, 2002/05/31 22:49:29
Line 605 
Line 605 
         if ( worry_about_NULs && ! nultrans )          if ( worry_about_NULs && ! nultrans )
                 {                  {
                 if ( useecs )                  if ( useecs )
                         (void) sprintf( char_map,                          (void) snprintf( char_map, sizeof char_map,
                                 "(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : %d)",                                  "(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : %d)",
                                         NUL_ec );                                          NUL_ec );
                 else                  else
                         (void) sprintf( char_map,                          (void) snprintf( char_map, sizeof char_map,
                                 "(*yy_cp ? YY_SC_TO_UI(*yy_cp) : %d)", NUL_ec );                                  "(*yy_cp ? YY_SC_TO_UI(*yy_cp) : %d)", NUL_ec );
                 }                  }
   
         else          else
                 strcpy( char_map, useecs ?                  strlcpy( char_map, useecs ?
                         "yy_ec[YY_SC_TO_UI(*yy_cp)]" : "YY_SC_TO_UI(*yy_cp)" );                          "yy_ec[YY_SC_TO_UI(*yy_cp)]" : "YY_SC_TO_UI(*yy_cp)",
                           sizeof char_map );
   
         if ( worry_about_NULs && nultrans )          if ( worry_about_NULs && nultrans )
                 {                  {
Line 712 
Line 713 
                 {                  {
                 char NUL_ec_str[20];                  char NUL_ec_str[20];
   
                 (void) sprintf( NUL_ec_str, "%d", NUL_ec );                  (void) snprintf( NUL_ec_str, sizeof NUL_ec_str, "%d", NUL_ec );
                 gen_next_compressed_state( NUL_ec_str );                  gen_next_compressed_state( NUL_ec_str );
   
                 do_indent();                  do_indent();

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9