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

Diff for /src/usr.bin/lex/misc.c between version 1.7 and 1.8

version 1.7, 2002/05/30 10:53:44 version 1.8, 2002/05/31 00:56:21
Line 46 
Line 46 
                 return;                  return;
                 }                  }
   
         snprintf( buf, sizeof buf, "#define %s %d\n", defname, value );          sprintf( buf, "#define %s %d\n", defname, value );
         add_action( buf );          add_action( buf );
         }          }
   
Line 364 
Line 364 
 int arg;  int arg;
         {          {
         char errmsg[MAXLINE];          char errmsg[MAXLINE];
         (void) snprintf( errmsg, sizeof errmsg, msg, arg );          (void) sprintf( errmsg, msg, arg );
         flexerror( errmsg );          flexerror( errmsg );
         }          }
   
Line 376 
Line 376 
         {          {
         char errmsg[MAXLINE];          char errmsg[MAXLINE];
   
         (void) snprintf( errmsg, sizeof errmsg, msg, arg );          (void) sprintf( errmsg, msg, arg );
         flexerror( errmsg );          flexerror( errmsg );
         }          }
   
Line 414 
Line 414 
         *s2 = '\0';          *s2 = '\0';
   
         if ( do_infile )          if ( do_infile )
                 snprintf( directive, sizeof directive, line_fmt,                  sprintf( directive, line_fmt, linenum, filename );
                         linenum, filename );  
         else          else
                 {                  {
                 if ( output_file == stdout )                  if ( output_file == stdout )
                         /* Account for the line directive itself. */                          /* Account for the line directive itself. */
                         ++out_linenum;                          ++out_linenum;
   
                 snprintf( directive, sizeof directive, line_fmt,                  sprintf( directive, line_fmt, out_linenum, filename );
                         out_linenum, filename );  
                 }                  }
   
         /* If output_file is nil then we should put the directive in          /* If output_file is nil then we should put the directive in
Line 735 
Line 733 
 #endif  #endif
   
                         default:                          default:
                                 (void) snprintf( rform, sizeof rform,                                  (void) sprintf( rform, "\\%.3o",
                                         "\\%.3o", (unsigned int) c );                                                  (unsigned int) c );
                                 return rform;                                  return rform;
                         }                          }
                 }                  }

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