summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2011-01-20 21:33:11 +0000
committerschwarze <schwarze@openbsd.org>2011-01-20 21:33:11 +0000
commite97069bbb477ce79fb5521b4eac1e3dcb6a872e4 (patch)
tree8169ad2da8bcf190a8fcdc6e7d266ebe7b131313
parentadd IT8721 support (diff)
downloadwireguard-openbsd-e97069bbb477ce79fb5521b4eac1e3dcb6a872e4.tar.xz
wireguard-openbsd-e97069bbb477ce79fb5521b4eac1e3dcb6a872e4.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@.
-rw-r--r--usr.bin/mandoc/main.c4
-rw-r--r--usr.bin/mandoc/roff.c7
2 files changed, 8 insertions, 3 deletions
diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c
index 1d5d405501f..c3bf1ba2cb1 100644
--- a/usr.bin/mandoc/main.c
+++ b/usr.bin/mandoc/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.68 2011/01/16 19:27:25 schwarze Exp $ */
+/* $Id: main.c,v 1.69 2011/01/20 21:33:11 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -181,7 +181,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/usr.bin/mandoc/roff.c b/usr.bin/mandoc/roff.c
index 57fa976e212..551bbd9f93b 100644
--- a/usr.bin/mandoc/roff.c
+++ b/usr.bin/mandoc/roff.c
@@ -1,4 +1,4 @@
-/* $Id: roff.c,v 1.29 2011/01/12 20:56:40 schwarze Exp $ */
+/* $Id: roff.c,v 1.30 2011/01/20 21:33:11 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -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 },
@@ -931,6 +933,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);
}