diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-01-20 21:33:12 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-01-20 21:33:12 +0000 |
commit | 4f80dc88237a5059b145ea34822dcc53b27c0193 (patch) | |
tree | 7fe40852516c08dc6fecfa451ba223f60cf89a6b /usr.bin | |
parent | dcc151d9aaa57a51d1cb15c6119f015e3a215729 (diff) |
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@.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mandoc/main.c | 4 | ||||
-rw-r--r-- | usr.bin/mandoc/roff.c | 7 |
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); } |