source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: demacrify: get rid of man_nmsg(), man_pmsg(), mdoc_nmsg(),
Date: Fri, 1 Aug 2014 13:40:34 -0400 (EDT)	[thread overview]
Message-ID: <201408011740.s71HeYcW023049@krisdoz.my.domain> (raw)

Log Message:
-----------
demacrify: get rid of man_nmsg(), man_pmsg(), mdoc_nmsg(), mdoc_pmsg()

Modified Files:
--------------
    mdocml:
        libman.h
        libmdoc.h
        man_validate.c
        mdoc_validate.c

Revision Data
-------------
Index: mdoc_validate.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_validate.c,v
retrieving revision 1.239
retrieving revision 1.240
diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.239 -r1.240
--- mdoc_validate.c
+++ mdoc_validate.c
@@ -1665,7 +1665,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,
@@ -1844,7 +1845,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);
 }
 
Index: libmdoc.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/libmdoc.h,v
retrieving revision 1.87
retrieving revision 1.88
diff -Llibmdoc.h -Llibmdoc.h -u -p -r1.87 -r1.88
--- libmdoc.h
+++ libmdoc.h
@@ -104,10 +104,6 @@ extern	const struct mdoc_macro *const md
 
 __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 *);
Index: libman.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/libman.h,v
retrieving revision 1.61
retrieving revision 1.62
diff -Llibman.h -Llibman.h -u -p -r1.61 -r1.62
--- libman.h
+++ libman.h
@@ -59,10 +59,6 @@ extern	const struct man_macro *const man
 
 __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);
Index: man_validate.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_validate.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -Lman_validate.c -Lman_validate.c -u -p -r1.102 -r1.103
--- man_validate.c
+++ man_validate.c
@@ -191,12 +191,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
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

                 reply	other threads:[~2014-08-01 17:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201408011740.s71HeYcW023049@krisdoz.my.domain \
    --to=schwarze@mdocml.bsd.lv \
    --cc=source@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).