From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp1.rz.uni-karlsruhe.de (Debian-exim@smtp1.rz.uni-karlsruhe.de [129.13.185.217]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id p0H1a5UA027593 for ; Sun, 16 Jan 2011 20:36:07 -0500 (EST) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by smtp1.rz.uni-karlsruhe.de with esmtp (Exim 4.63 #1) id 1Pee0p-0004VB-Hp; Mon, 17 Jan 2011 02:36:03 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1Pee0p-0005ZC-GB; Mon, 17 Jan 2011 02:36:03 +0100 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.69) (envelope-from ) id 1Pee0p-0001Ut-EZ; Mon, 17 Jan 2011 02:36:03 +0100 Received: from schwarze by usta.de with local (Exim 4.72) (envelope-from ) id 1Pee0p-0006wZ-Dm; Mon, 17 Jan 2011 02:36:03 +0100 Date: Mon, 17 Jan 2011 02:36:03 +0100 From: Ingo Schwarze To: tech@mdocml.bsd.lv Cc: brad@comstyle.com Subject: error reporting for line traps Message-ID: <20110117013603.GI11566@iris.usta.de> References: <201101092145.59321.brad@comstyle.com> <201101092333.13197.brad@comstyle.com> <4D2DDDA2.5040803@bsd.lv> <201101151514.15245.brad@comstyle.com> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201101151514.15245.brad@comstyle.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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