diff options
author | 2010-11-28 01:00:40 +0000 | |
---|---|---|
committer | 2010-11-28 01:00:40 +0000 | |
commit | ff3da50cfd94d4532c141ff90501ea3e474b4b36 (patch) | |
tree | ac0156791e5cd39f6af4cccb463e6fd3c0ae6750 | |
parent | Move our partial roff language manual to the right place, (diff) | |
download | wireguard-openbsd-ff3da50cfd94d4532c141ff90501ea3e474b4b36.tar.xz wireguard-openbsd-ff3da50cfd94d4532c141ff90501ea3e474b4b36.zip |
Parse and ignore the .ad, .hy, .nh, and .ne roff requests.
Ignoring these can neither cause information loss nor serious
formatting issues. As they are frequently used by pod2man(1),
this considerably reduces ERROR noise from mandoc -Tlint
for the Perl manuals.
-rw-r--r-- | share/man/man7/roff.7 | 22 | ||||
-rw-r--r-- | usr.bin/mandoc/roff.c | 10 |
2 files changed, 28 insertions, 4 deletions
diff --git a/share/man/man7/roff.7 b/share/man/man7/roff.7 index b3492b97b16..7bbaefefd4f 100644 --- a/share/man/man7/roff.7 +++ b/share/man/man7/roff.7 @@ -1,4 +1,4 @@ -.\" $Id: roff.7,v 1.1 2010/11/27 21:57:23 schwarze Exp $ +.\" $Id: roff.7,v 1.2 2010/11/28 01:00:41 schwarze Exp $ .\" .\" Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv> .\" Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: November 27 2010 $ +.Dd $Mdocdate: November 28 2010 $ .Dt ROFF 7 .Os .Sh NAME @@ -74,6 +74,12 @@ The .Nm language defines many more requests and macros not implemented in .Xr mandoc 1 . +.Ss \&ad +Set line adjustment mode. +This line-scoped request is intended to have one argument to select +normal, left, right, or center adjustment for subsequent text. +Currently, it is ignored including its arguments, +and the number of arguments is not checked. .Ss \&am Append to a macro definition. The syntax of this request is the same as that of @@ -283,6 +289,9 @@ then false is assumed. The syntax of this macro is similar to .Sx \&if except that the conditional is missing. +.Ss \&hy +Set automatic hyphenation mode. +This line-scoped request is currently ignored. .Ss \&ie The .Qq if @@ -433,9 +442,16 @@ Otherwise, it only terminates the and arguments following it or the .Sq \&.. macro are discarded. +.Ss \&ne +Declare the need for the specified minimum vertical space +before the next trap or the bottom of the page. +This line-scoped request is currently ignored. +.Ss \&nh +Turn off automatic hyphenation mode. +This line-scoped request is currently ignored. .Ss \&rm Remove a request, macro or string. -This macro is intended to have one argument, +This request is intended to have one argument, the name of the request, macro or string to be undefined. Currently, it is ignored including its arguments, and the number of arguments is not checked. diff --git a/usr.bin/mandoc/roff.c b/usr.bin/mandoc/roff.c index a9bc0937dca..eb725b6a33f 100644 --- a/usr.bin/mandoc/roff.c +++ b/usr.bin/mandoc/roff.c @@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.19 2010/11/27 20:52:34 schwarze Exp $ */ +/* $Id: roff.c,v 1.20 2010/11/28 01:00:40 schwarze Exp $ */ /* * Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -37,6 +37,7 @@ ('.' == (c) || '\'' == (c)) enum rofft { + ROFF_ad, ROFF_am, ROFF_ami, ROFF_am1, @@ -45,9 +46,12 @@ enum rofft { ROFF_de1, ROFF_ds, ROFF_el, + ROFF_hy, ROFF_ie, ROFF_if, ROFF_ig, + ROFF_ne, + ROFF_nh, ROFF_nr, ROFF_rm, ROFF_so, @@ -144,6 +148,7 @@ static enum rofferr roff_userdef(ROFF_ARGS); static struct roffmac *hash[HASHWIDTH]; static struct roffmac roffs[ROFF_MAX] = { + { "ad", roff_line, NULL, NULL, 0, NULL }, { "am", roff_block, roff_block_text, roff_block_sub, 0, NULL }, { "ami", roff_block, roff_block_text, roff_block_sub, 0, NULL }, { "am1", roff_block, roff_block_text, roff_block_sub, 0, NULL }, @@ -152,9 +157,12 @@ static struct roffmac roffs[ROFF_MAX] = { { "de1", roff_block, roff_block_text, roff_block_sub, 0, NULL }, { "ds", roff_ds, NULL, NULL, 0, NULL }, { "el", roff_cond, roff_cond_text, roff_cond_sub, ROFFMAC_STRUCT, NULL }, + { "hy", roff_line, NULL, NULL, 0, NULL }, { "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 }, + { "ne", roff_line, NULL, NULL, 0, NULL }, + { "nh", roff_line, NULL, NULL, 0, NULL }, { "nr", roff_nr, NULL, NULL, 0, NULL }, { "rm", roff_line, NULL, NULL, 0, NULL }, { "so", roff_so, NULL, NULL, 0, NULL }, |