ref: b31a69f53b112c12d875af188abe3699f48f9620
parent: 43779fdf7e84acdbf5a7db98272b5b51403fe93a
author: Roberto E. Vargas Caballero <[email protected]>
date: Thu Aug 20 18:38:49 EDT 2015
Change printerr() to errorp() This new name is shorter and it is easy to see the relation with error().
--- a/cc1/cc1.h
+++ b/cc1/cc1.h
@@ -300,7 +300,7 @@
extern void error(char *fmt, ...);
extern void warn(char *fmt, ...);
extern void unexpected(void);
-extern void printerr(char *fmt, ...);
+extern void errorp(char *fmt, ...);
extern void cpperror(char *fmt, ...);
/* types.c */
--- a/cc1/cpp.c
+++ b/cc1/cpp.c
@@ -628,7 +628,7 @@
popctx(); /* the symbols freed at the end */
if (yytoken != EOFTOK && !cppoff)
- printerr("trailing characters after preprocessor directive");
+ errorp("trailing characters after preprocessor directive");
disexpand = 0;
lexmode = CCMODE;
--- a/cc1/error.c
+++ b/cc1/error.c
@@ -56,7 +56,7 @@
}
void
-printerr(char *fmt, ...)
+errorp(char *fmt, ...)
{
va_list va;
va_start(va, fmt);
--- a/cc1/lex.c
+++ b/cc1/lex.c
@@ -550,9 +550,9 @@
{
if (yytoken != tok) {
if (isgraph(tok))
- printerr("expected '%c' before '%s'", tok, yytext);
+ errorp("expected '%c' before '%s'", tok, yytext);
else
- printerr("unexpected '%s'", yytext);
+ errorp("unexpected '%s'", yytext);
} else {
next();
}
--- a/cc1/symbol.c
+++ b/cc1/symbol.c
@@ -113,7 +113,7 @@
if ((f & (ISUSED|ISDECLARED)) == ISDECLARED)
warn("'%s' defined but not used", sym->name);
if ((f & ISDECLARED) == 0)
- printerr("label '%s' is not defined", sym->name);
+ errorp("label '%s' is not defined", sym->name);
free(sym->name);
free(sym);
}