version 1.23, 2012/10/02 10:29:30 |
version 1.24, 2012/10/18 17:54:43 |
|
|
ParseVErrorInternal(const Location *origin, int type, const char *fmt, |
ParseVErrorInternal(const Location *origin, int type, const char *fmt, |
va_list ap) |
va_list ap) |
{ |
{ |
if (origin->fname) |
static bool first = true; |
(void)fprintf(stderr, "\"%s\", line %lu: ", origin->fname, origin->lineno); |
fprintf(stderr, "*** %s", |
if (type == PARSE_WARNING) |
type == PARSE_WARNING ? "Warning" : "Parse error"); |
(void)fprintf(stderr, "warning: "); |
if (first) { |
(void)vfprintf(stderr, fmt, ap); |
fprintf(stderr, " in %s: ", Var_Value(".CURDIR")); |
|
first = false; |
|
} else |
|
fprintf(stderr, ": "); |
|
vfprintf(stderr, fmt, ap); |
va_end(ap); |
va_end(ap); |
(void)fprintf(stderr, "\n"); |
if (origin->fname) |
|
fprintf(stderr, " (%s:%lu)", origin->fname, origin->lineno); |
|
fprintf(stderr, "\n"); |
if (type == PARSE_FATAL) |
if (type == PARSE_FATAL) |
fatal_errors ++; |
fatal_errors ++; |
} |
} |
|
|
ParseVErrorInternal(&l, type, fmt, ap); |
ParseVErrorInternal(&l, type, fmt, ap); |
va_end(ap); |
va_end(ap); |
} |
} |
|
|