From: schwarze@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: MANDOCERR_NOARGS reported three completely unrelated classes of
Date: Thu, 3 Jul 2014 17:23:54 -0400 (EDT) [thread overview]
Message-ID: <201407032123.s63LNs0C003574@krisdoz.my.domain> (raw)
Log Message:
-----------
MANDOCERR_NOARGS reported three completely unrelated classes of problems.
Split the roff(7) parts out of it and report the request names for these cases.
Modified Files:
--------------
mdocml:
mandoc.h
read.c
roff.c
Revision Data
-------------
Index: mandoc.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc.h,v
retrieving revision 1.130
retrieving revision 1.131
diff -Lmandoc.h -Lmandoc.h -u -p -r1.130 -r1.131
--- mandoc.h
+++ mandoc.h
@@ -83,7 +83,9 @@ enum mandocerr {
MANDOCERR_NF_SKIP, /* fill mode already disabled, skipping .nf */
MANDOCERR_LINESCOPE, /* line scope broken: macro breaks macro */
- /* related to missing macro arguments */
+ /* related to missing arguments */
+ MANDOCERR_REQ_EMPTY, /* skipping empty request: request */
+ MANDOCERR_COND_EMPTY, /* conditional request controls empty scope */
MANDOCERR_MACRO_EMPTY, /* skipping empty macro: macro */
MANDOCERR_ARGCWARN, /* argument count wrong */
MANDOCERR_DISPTYPE, /* missing display type */
Index: roff.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/roff.c,v
retrieving revision 1.215
retrieving revision 1.216
diff -Lroff.c -Lroff.c -u -p -r1.215 -r1.216
--- roff.c
+++ roff.c
@@ -917,7 +917,8 @@ roff_block(ROFF_ARGS)
if (ROFF_ig != tok) {
if ('\0' == *cp) {
- mandoc_msg(MANDOCERR_NOARGS, r->parse, ln, ppos, NULL);
+ mandoc_msg(MANDOCERR_REQ_EMPTY, r->parse,
+ ln, ppos, roffs[tok].name);
return(ROFF_IGN);
}
@@ -1285,7 +1286,8 @@ roff_cond(ROFF_ARGS)
*/
if ('\0' == (*bufp)[pos])
- mandoc_msg(MANDOCERR_NOARGS, r->parse, ln, ppos, NULL);
+ mandoc_msg(MANDOCERR_COND_EMPTY, r->parse,
+ ln, ppos, roffs[tok].name);
r->last->endspan = 1;
Index: read.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/read.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -Lread.c -Lread.c -u -p -r1.57 -r1.58
--- read.c
+++ read.c
@@ -128,6 +128,8 @@ static const char * const mandocerrs[MAN
"line scope broken",
/* related to missing macro arguments */
+ "skipping empty request",
+ "conditional request controls empty scope",
"skipping empty macro",
"argument count wrong",
"missing display type",
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
reply other threads:[~2014-07-03 21:23 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=201407032123.s63LNs0C003574@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).