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

Diff for /src/usr.bin/lex/nfa.c between version 1.5 and 1.6

version 1.5, 2001/11/19 19:02:14 version 1.6, 2002/05/30 10:53:44
Line 215 
Line 215 
         if ( continued_action )          if ( continued_action )
                 --rule_linenum[num_rules];                  --rule_linenum[num_rules];
   
         sprintf( action_text, "case %d:\n", num_rules );          snprintf( action_text, sizeof action_text, "case %d:\n", num_rules );
         add_action( action_text );          add_action( action_text );
   
         if ( variable_trail_rule )          if ( variable_trail_rule )
Line 247 
Line 247 
   
                         if ( headcnt > 0 )                          if ( headcnt > 0 )
                                 {                                  {
                                 sprintf( action_text, "%s = %s + %d;\n",                                  snprintf( action_text, sizeof action_text,
                                 scanner_cp, scanner_bp, headcnt );                                          "%s = %s + %d;\n",
                                           scanner_cp, scanner_bp, headcnt );
                                 add_action( action_text );                                  add_action( action_text );
                                 }                                  }
   
                         else                          else
                                 {                                  {
                                 sprintf( action_text, "%s -= %d;\n",                                  snprintf( action_text, sizeof action_text,
                                           "%s -= %d;\n",
                                         scanner_cp, trailcnt );                                          scanner_cp, trailcnt );
                                 add_action( action_text );                                  add_action( action_text );
                                 }                                  }

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