[hackers] [scc] Change printerr() to errorp() || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Fri, 21 Aug 2015 00:17:08 +0200 (CEST)

X-DEBUG-UPD: b31a69f53b112c12d875af188abe3699f48f9620
commit b31a69f53b112c12d875af188abe3699f48f9620
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Thu Aug 20 22:38:49 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Thu Aug 20 22:38:49 2015 +0200

    Change printerr() to errorp()
    
    This new name is shorter and it is easy to see the relation
    with error().

diff --git a/cc1/cc1.h b/cc1/cc1.h
index 2ef79b8..fff8517 100644
--- a/cc1/cc1.h
+++ b/cc1/cc1.h
_AT_@ -300,7 +300,7 @@ enum op {
 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 */
diff --git a/cc1/cpp.c b/cc1/cpp.c
index bbfbb27..f623efb 100644
--- a/cc1/cpp.c
+++ b/cc1/cpp.c
_AT_@ -628,7 +628,7 @@ cpp(void)
         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;
 
diff --git a/cc1/error.c b/cc1/error.c
index 6bbb4e5..b6335c1 100644
--- a/cc1/error.c
+++ b/cc1/error.c
_AT_@ -56,7 +56,7 @@ error(char *fmt, ...)
 }
 
 void
-printerr(char *fmt, ...)
+errorp(char *fmt, ...)
 {
         va_list va;
         va_start(va, fmt);
diff --git a/cc1/lex.c b/cc1/lex.c
index 34bccb1..7b0ee70 100644
--- a/cc1/lex.c
+++ b/cc1/lex.c
_AT_@ -550,9 +550,9 @@ expect(unsigned tok)
 {
         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();
         }
diff --git a/cc1/symbol.c b/cc1/symbol.c
index 5738d2e..03a1dd7 100644
--- a/cc1/symbol.c
+++ b/cc1/symbol.c
_AT_@ -113,7 +113,7 @@ popctx(void)
                         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);
                 }
Received on Fri Aug 21 2015 - 00:17:08 CEST

This archive was generated by hypermail 2.3.0 : Fri Aug 21 2015 - 00:24:16 CEST