source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Disentangle the MANDOCERR_CHILD message, which reported three
Date: Wed, 2 Jul 2014 09:10:46 -0400 (EDT)	[thread overview]
Message-ID: <201407021310.s62DAk42031693@krisdoz.my.domain> (raw)

Log Message:
-----------
Disentangle the MANDOCERR_CHILD message, which reported three 
completely different things, into three distinct messages.
Also mention the macro names we are talking about.

Modified Files:
--------------
    mdocml:
        mandoc.h
        mdoc_validate.c
        read.c

Revision Data
-------------
Index: mdoc_validate.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_validate.c,v
retrieving revision 1.220
retrieving revision 1.221
diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.220 -r1.221
--- mdoc_validate.c
+++ mdoc_validate.c
@@ -1117,7 +1117,8 @@ post_vt(POST_ARGS)
 
 	for (n = mdoc->last->child; n; n = n->next)
 		if (MDOC_TEXT != n->type)
-			mdoc_nmsg(mdoc, n, MANDOCERR_CHILD);
+			mandoc_msg(MANDOCERR_VT_CHILD, mdoc->parse,
+			    n->line, n->pos, mdoc_macronames[n->tok]);
 
 	return(1);
 }
@@ -1613,7 +1614,9 @@ post_bl(POST_ARGS)
 			continue;
 		}
 
-		mdoc_nmsg(mdoc, nchild, MANDOCERR_CHILD);
+		mandoc_msg(MANDOCERR_BL_MOVE, mdoc->parse,
+		    nchild->line, nchild->pos,
+		    mdoc_macronames[nchild->tok]);
 
 		/*
 		 * Move the node out of the Bl block.
@@ -1782,7 +1785,8 @@ post_rs(POST_ARGS)
 		}
 
 		next = nn->next;
-		mdoc_nmsg(mdoc, nn, MANDOCERR_CHILD);
+		mandoc_msg(MANDOCERR_RS_SKIP, mdoc->parse,
+		    nn->line, nn->pos, mdoc_macronames[nn->tok]);
 		mdoc_node_delete(mdoc, nn);
 	}
 
Index: mandoc.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc.h,v
retrieving revision 1.128
retrieving revision 1.129
diff -Lmandoc.h -Lmandoc.h -u -p -r1.128 -r1.129
--- mandoc.h
+++ mandoc.h
@@ -76,8 +76,9 @@ enum	mandocerr {
 	MANDOCERR_PAR_MOVE, /* moving paragraph macro out of list: macro */
 	MANDOCERR_NS_SKIP, /* skipping no-space macro */
 	MANDOCERR_BLOCK_NEST, /* blocks badly nested: macro ... */
-	MANDOCERR_CHILD, /* child violates parent syntax */
 	MANDOCERR_BD_NEST, /* nested displays are not portable: macro ... */
+	MANDOCERR_BL_MOVE, /* moving content out of list: macro */
+	MANDOCERR_VT_CHILD, /* .Vt block has child macro: macro */
 	MANDOCERR_FI_SKIP, /* fill mode already enabled, skipping .fi */
 	MANDOCERR_NF_SKIP, /* fill mode already disabled, skipping .nf */
 	MANDOCERR_LINESCOPE, /* line scope broken: macro breaks macro */
@@ -136,6 +137,7 @@ enum	mandocerr {
 	MANDOCERR_MACRO, /* skipping unknown macro */
 	MANDOCERR_REQUEST, /* NOT IMPLEMENTED: skipping request */
 	MANDOCERR_ARGCOUNT, /* argument count wrong */
+	MANDOCERR_RS_SKIP, /* skipping invalid content in .Rs block: macro */
 	MANDOCERR_STRAYTA, /* skipping column outside column list */
 	MANDOCERR_NOSCOPE, /* skipping end of block that is not open */
 	MANDOCERR_SCOPEBROKEN, /* missing end of block */
Index: read.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/read.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -Lread.c -Lread.c -u -p -r1.56 -r1.57
--- read.c
+++ read.c
@@ -120,8 +120,9 @@ static	const char * const	mandocerrs[MAN
 	"moving paragraph macro out of list",
 	"skipping no-space macro",
 	"blocks badly nested",
-	"child violates parent syntax",
 	"nested displays are not portable",
+	"moving content out of list",
+	".Vt block has child macro",
 	"fill mode already enabled, skipping .fi",
 	"fill mode already disabled, skipping .nf",
 	"line scope broken",
@@ -180,6 +181,7 @@ static	const char * const	mandocerrs[MAN
 	"skipping unknown macro",
 	"NOT IMPLEMENTED, please use groff: skipping request",
 	"argument count wrong",
+	"skipping invalid content in .Rs block",
 	"skipping column outside column list",
 	"skipping end of block that is not open",
 	"missing end of block",
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

                 reply	other threads:[~2014-07-02 13:10 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=201407021310.s62DAk42031693@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).