aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2011-01-22 13:16:02 +0000
committerIngo Schwarze <schwarze@openbsd.org>2011-01-22 13:16:02 +0000
commit4b0c2fc3c119aee943d8da19d33c1a5070f7d9d4 (patch)
treea7900cd259d826cca5545daf6e831ad2fe5b6aa7
parentf9f298afcb49b561ce6eac34f72734c0a4eec477 (diff)
downloadmandoc-4b0c2fc3c119aee943d8da19d33c1a5070f7d9d4.tar.gz
mandoc-4b0c2fc3c119aee943d8da19d33c1a5070f7d9d4.tar.zst
mandoc-4b0c2fc3c119aee943d8da19d33c1a5070f7d9d4.zip
When finding the roff .it request (line trap),
make it clear that you cannot use mandoc to format that page (yet). Triggered by a report from brad@, ok kristaps@.
-rw-r--r--main.c4
-rw-r--r--roff.c7
2 files changed, 8 insertions, 3 deletions
diff --git a/main.c b/main.c
index a83f8aeb..a29c71b2 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.138 2011/01/12 15:50:42 kristaps Exp $ */
+/* $Id: main.c,v 1.139 2011/01/22 13:16:02 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -196,7 +196,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = {
"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",
diff --git a/roff.c b/roff.c
index 996db231..ad7a08ae 100644
--- a/roff.c
+++ b/roff.c
@@ -1,4 +1,4 @@
-/* $Id: roff.c,v 1.122 2011/01/16 04:00:34 schwarze Exp $ */
+/* $Id: roff.c,v 1.123 2011/01/22 13:16:02 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -51,6 +51,7 @@ enum rofft {
ROFF_ie,
ROFF_if,
ROFF_ig,
+ ROFF_it,
ROFF_ne,
ROFF_nh,
ROFF_nr,
@@ -172,6 +173,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 },
@@ -935,6 +937,9 @@ static enum rofferr
roff_line_ignore(ROFF_ARGS)
{
+ if (ROFF_it == tok)
+ (*r->msg)(MANDOCERR_REQUEST, r->data, ln, ppos, "it");
+
return(ROFF_IGN);
}