From: schwarze Date: Fri, 8 Aug 2014 15:57:05 +0000 (+0000) Subject: demacrify: get rid of man_nmsg(), man_pmsg(), mdoc_nmsg(), mdoc_pmsg() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=281539130537839fe8b890218535457d4bc42d94;p=openbsd demacrify: get rid of man_nmsg(), man_pmsg(), mdoc_nmsg(), mdoc_pmsg() --- diff --git a/usr.bin/mandoc/libman.h b/usr.bin/mandoc/libman.h index a14d2adc988..30082898647 100644 --- a/usr.bin/mandoc/libman.h +++ b/usr.bin/mandoc/libman.h @@ -1,4 +1,4 @@ -/* $Id: libman.h,v 1.36 2014/08/08 15:32:17 schwarze Exp $ */ +/* $Id: libman.h,v 1.37 2014/08/08 15:57:05 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons * @@ -59,10 +59,6 @@ extern const struct man_macro *const man_macros; __BEGIN_DECLS -#define man_pmsg(man, l, p, t) \ - mandoc_msg((t), (man)->parse, (l), (p), NULL) -#define man_nmsg(man, n, t) \ - mandoc_msg((t), (man)->parse, (n)->line, (n)->pos, NULL) int man_word_alloc(struct man *, int, int, const char *); int man_block_alloc(struct man *, int, int, enum mant); int man_head_alloc(struct man *, int, int, enum mant); diff --git a/usr.bin/mandoc/libmdoc.h b/usr.bin/mandoc/libmdoc.h index 545b96e3ad0..95030a2116b 100644 --- a/usr.bin/mandoc/libmdoc.h +++ b/usr.bin/mandoc/libmdoc.h @@ -1,4 +1,4 @@ -/* $Id: libmdoc.h,v 1.57 2014/08/08 15:32:17 schwarze Exp $ */ +/* $Id: libmdoc.h,v 1.58 2014/08/08 15:57:05 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2013 Ingo Schwarze @@ -104,10 +104,6 @@ extern const struct mdoc_macro *const mdoc_macros; __BEGIN_DECLS -#define mdoc_pmsg(mdoc, l, p, t) \ - mandoc_msg((t), (mdoc)->parse, (l), (p), NULL) -#define mdoc_nmsg(mdoc, n, t) \ - mandoc_msg((t), (mdoc)->parse, (n)->line, (n)->pos, NULL) int mdoc_macro(MACRO_PROT_ARGS); int mdoc_word_alloc(struct mdoc *, int, int, const char *); diff --git a/usr.bin/mandoc/man_validate.c b/usr.bin/mandoc/man_validate.c index e4a418e9677..9e6389c02b6 100644 --- a/usr.bin/mandoc/man_validate.c +++ b/usr.bin/mandoc/man_validate.c @@ -1,4 +1,4 @@ -/* $Id: man_validate.c,v 1.74 2014/08/08 15:54:10 schwarze Exp $ */ +/* $Id: man_validate.c,v 1.75 2014/08/08 15:57:05 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze @@ -187,12 +187,14 @@ check_root(CHKARGS) assert((man->flags & (MAN_BLINE | MAN_ELINE)) == 0); if (NULL == man->first->child) - man_nmsg(man, n, MANDOCERR_DOC_EMPTY); + mandoc_msg(MANDOCERR_DOC_EMPTY, man->parse, + n->line, n->pos, NULL); else man->meta.hasbody = 1; if (NULL == man->meta.title) { - man_nmsg(man, n, MANDOCERR_TH_MISSING); + mandoc_msg(MANDOCERR_TH_MISSING, man->parse, + n->line, n->pos, NULL); /* * If a title hasn't been set, do so now (by diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c index 85492ed8d22..b5c4d7d38f8 100644 --- a/usr.bin/mandoc/mdoc_validate.c +++ b/usr.bin/mandoc/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.157 2014/08/08 15:54:10 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.158 2014/08/08 15:57:05 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -1661,7 +1661,8 @@ post_root(POST_ARGS) /* Check that we begin with a proper `Sh'. */ if (NULL == n->child) - mdoc_nmsg(mdoc, n, MANDOCERR_DOC_EMPTY); + mandoc_msg(MANDOCERR_DOC_EMPTY, mdoc->parse, + n->line, n->pos, NULL); else if (MDOC_Sh != n->child->tok) mandoc_msg(MANDOCERR_SEC_BEFORE, mdoc->parse, n->child->line, n->child->pos, @@ -1840,7 +1841,8 @@ post_ns(POST_ARGS) { if (MDOC_LINE & mdoc->last->flags) - mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_NS_SKIP); + mandoc_msg(MANDOCERR_NS_SKIP, mdoc->parse, + mdoc->last->line, mdoc->last->pos, NULL); return(1); }