tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: tech@mdocml.bsd.lv
Cc: brad@comstyle.com
Subject: error reporting for line traps
Date: Mon, 17 Jan 2011 02:36:03 +0100	[thread overview]
Message-ID: <20110117013603.GI11566@iris.usta.de> (raw)
In-Reply-To: <201101151514.15245.brad@comstyle.com>

Hi Kristaps,

Brad wrote on Sat, Jan 15, 2011 at 03:14:13PM -0500:

> yasm_arch.7:75:2: ERROR: skipping unknown macro: .it 1 an-trap

In oder to help people who are being helpful by reporting mandoc issues,
i'd like mandoc messages to be as specific as possible, in particular
when something is really hopeless for now, and is known to be hopeless.
One of the cases where mandoc itself can provide clear recommendations
even without human review is when a page uses roff requests that are
clearly important, but are blatantly mishandled by mandoc.  We already
report a couple of these: .am, .ami, .am1, and .dei.

Now .it turns out to be another one of the kind, it is not easy
to implement, and it is apparently used in real manuals, so add it
to the list.

While here, also make the respective message more explicit.

OK?

Yours,
  Ingo


Index: main.c
===================================================================
RCS file: /cvs/src/usr.bin/mandoc/main.c,v
retrieving revision 1.68
diff -u -p -r1.68 main.c
--- main.c	16 Jan 2011 19:27:25 -0000	1.68
+++ main.c	17 Jan 2011 01:19:32 -0000
@@ -181,7 +181,7 @@ static	const char * const	mandocerrs[MAN
 	"escaped character not allowed in a name",
 	"skipping text before the first section header",
 	"skipping unknown macro",
-	"NOT IMPLEMENTED: skipping request",
+	"NOT IMPLEMENTED, please use groff: skipping request",
 	"line scope broken",
 	"argument count wrong",
 	"skipping end of block that is not open",
Index: roff.c
===================================================================
RCS file: /cvs/src/usr.bin/mandoc/roff.c,v
retrieving revision 1.29
diff -u -p -r1.29 roff.c
--- roff.c	12 Jan 2011 20:56:40 -0000	1.29
+++ roff.c	17 Jan 2011 01:19:33 -0000
@@ -47,6 +47,7 @@ enum	rofft {
 	ROFF_ie,
 	ROFF_if,
 	ROFF_ig,
+	ROFF_it,
 	ROFF_ne,
 	ROFF_nh,
 	ROFF_nr,
@@ -168,6 +169,7 @@ static	struct roffmac	 roffs[ROFF_MAX] =
 	{ "ie", roff_cond, roff_cond_text, roff_cond_sub, ROFFMAC_STRUCT, NULL },
 	{ "if", roff_cond, roff_cond_text, roff_cond_sub, ROFFMAC_STRUCT, NULL },
 	{ "ig", roff_block, roff_block_text, roff_block_sub, 0, NULL },
+	{ "it", roff_line_ignore, NULL, NULL, 0, NULL },
 	{ "ne", roff_line_ignore, NULL, NULL, 0, NULL },
 	{ "nh", roff_line_ignore, NULL, NULL, 0, NULL },
 	{ "nr", roff_nr, NULL, NULL, 0, NULL },
@@ -930,6 +932,9 @@ roff_evalcond(const char *v, int *pos)
 static enum rofferr
 roff_line_ignore(ROFF_ARGS)
 {
+
+	if (ROFF_it == tok)
+		(*r->msg)(MANDOCERR_REQUEST, r->data, ln, ppos, "it");
 
 	return(ROFF_IGN);
 }


--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

           reply	other threads:[~2011-01-17  1:36 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <201101151514.15245.brad@comstyle.com>]

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=20110117013603.GI11566@iris.usta.de \
    --to=schwarze@usta.de \
    --cc=brad@comstyle.com \
    --cc=tech@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).