-
-static int
-manwarn(void *arg, int line, int col, const char *msg)
-{
- struct curparse *curp;
-
- curp = (struct curparse *)arg;
-
- if ( ! (curp->wflags & WARN_WSYNTAX))
- return(1);
-
- warnx("%s:%d: syntax warning: %s (column %d)",
- curp->file, line, msg, col);
-
- if ( ! (curp->wflags & WARN_WERR))
- return(1);
-
- /*
- * If the -Werror flag is passed in, as in gcc, then all
- * warnings are considered as errors.
- */
-
- warnx("%s: considering warnings as errors",
- __progname);
- return(0);
-}