From 4baed99617de2e5dacb16862a0cecb8885b435f0 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Mon, 6 Jul 2009 09:21:24 +0000 Subject: Initial removal of enum mdoc_warn from mdoc warnings (unnecessary complication). --- main.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 7dafb720..77bf36fa 100644 --- a/main.c +++ b/main.c @@ -99,8 +99,7 @@ static int moptions(enum intt *, char *); static int woptions(int *, char *); static int merr(void *, int, int, const char *); static int manwarn(void *, int, int, const char *); -static int mdocwarn(void *, int, int, - enum mdoc_warn, const char *); +static int mdocwarn(void *, int, int, const char *); static int ffile(struct buf *, struct buf *, const char *, struct curparse *); static int fdesc(struct buf *, struct buf *, @@ -645,31 +644,14 @@ merr(void *arg, int line, int col, const char *msg) static int -mdocwarn(void *arg, int line, int col, - enum mdoc_warn type, const char *msg) +mdocwarn(void *arg, int line, int col, const char *msg) { struct curparse *curp; - char *wtype; curp = (struct curparse *)arg; - wtype = NULL; - switch (type) { - case (WARN_COMPAT): - wtype = "compat"; - if (curp->wflags & WARN_WCOMPAT) - break; - return(1); - case (WARN_SYNTAX): - wtype = "syntax"; - if (curp->wflags & WARN_WSYNTAX) - break; - return(1); - } - - assert(wtype); - warnx("%s:%d: %s warning: %s (column %d)", - curp->file, line, wtype, msg, col); + warnx("%s:%d: warning: %s (column %d)", + curp->file, line, msg, col); if ( ! (curp->wflags & WARN_WERR)) return(1); -- cgit