From 48ef4044a299e0b5996e03ddd8f3b1c6df26796e 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 | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index be4b3b54..18bcf656 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.34 2009/07/04 11:10:36 kristaps Exp $ */ +/* $Id: main.c,v 1.35 2009/07/06 09:21:24 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -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 v1.2.3-56-ge451