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

Diff for /src/usr.bin/make/error.c between version 1.19 and 1.20

version 1.19, 2010/07/19 19:46:44 version 1.20, 2012/03/22 13:47:12
Line 37 
Line 37 
 #include "job.h"  #include "job.h"
 #include "targ.h"  #include "targ.h"
 #include "var.h"  #include "var.h"
   #include "location.h"
   
 #include "lowparse.h"  #include "lowparse.h"
   
 int fatal_errors = 0;  int fatal_errors = 0;
 bool supervise_jobs = false;  bool supervise_jobs = false;
   
 static void ParseVErrorInternal(const char *, unsigned long, int, const char *, va_list);  static void ParseVErrorInternal(const Location *, int, const char *, va_list);
 /*-  /*-
  * Error --   * Error --
  *      Print an error message given its format.   *      Print an error message given its format.
Line 146 
Line 147 
  */   */
 /* VARARGS */  /* VARARGS */
 static void  static void
 ParseVErrorInternal(const char *cfname, unsigned long clineno, int type,  ParseVErrorInternal(const Location *origin, int type, const char *fmt,
         const char *fmt, va_list ap)      va_list ap)
 {  {
         if (cfname)          if (origin->fname)
             (void)fprintf(stderr, "\"%s\", line %lu: ", cfname, clineno);              (void)fprintf(stderr, "\"%s\", line %lu: ", origin->fname, origin->lineno);
         if (type == PARSE_WARNING)          if (type == PARSE_WARNING)
                 (void)fprintf(stderr, "warning: ");                  (void)fprintf(stderr, "warning: ");
         (void)vfprintf(stderr, fmt, ap);          (void)vfprintf(stderr, fmt, ap);
Line 170 
Line 171 
 Parse_Error(int type, const char *fmt, ...)  Parse_Error(int type, const char *fmt, ...)
 {  {
         va_list ap;          va_list ap;
           Location l;
   
         va_start(ap, fmt);          va_start(ap, fmt);
         ParseVErrorInternal(Parse_Getfilename(), Parse_Getlineno(), type,          Parse_FillLocation(&l);
             fmt, ap);          ParseVErrorInternal(&l, type, fmt, ap);
         va_end(ap);          va_end(ap);
 }  }
   

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20