summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2010-11-28 01:00:42 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2010-11-28 01:00:42 +0000
commitcf784aa886bd1da404c8ae5889182a9595a91e4c (patch)
treed22032aa1e3e5d8e980577571c6874408680a1af /usr.bin/mandoc
parent9d6a3f20bf88381c4a9d7374b178714434563fe1 (diff)
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.
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r--usr.bin/mandoc/roff.c10
1 files changed, 9 insertions, 1 deletions
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 },