/* * nonfatal error message * the routine where is different for pass 1 and pass 2; * it tells where the error took place */ void uerror(char *s, ...) { va_list ap; va_start(ap, s); WHERE('u'); vfprintf(stderr, s, ap); fprintf(stderr, "\n"); va_end(ap); incerr(); }
/* * warning */ void werror(char *s, ...) { va_list ap; va_start(ap, s); WHERE('w'); fprintf(stderr, "warning: "); vfprintf(stderr, s, ap); fprintf(stderr, "\n"); va_end(ap); if (warniserr) incerr(); }
/* * Deal with gcc warnings. */ void warner(int type, ...) { va_list ap; char *w; if (TESTBIT(warnary, type) == 0) return; /* no warning */ if (TESTBIT(werrary, type)) { w = "error"; incerr(); } else w = "warning"; va_start(ap, type); fprintf(stderr, "%s:%d: %s: ", ftitle, lineno, w); vfprintf(stderr, warntxt[type], ap); fprintf(stderr, "\n"); va_end(ap); }