From f69f4bab0b601652be0766c00aea4e9a8b96aac1 Mon Sep 17 00:00:00 2001 From: schwarze Date: Fri, 16 Jan 2015 16:52:39 +0000 Subject: [PATCH] Parse and ignore .IX (generate index entry) macros because pod2man(1) emits them, by default without defining them, relying on the roff(7) quirk that undefined macros have no effect. This cures 1996 mandoc ERRORs in src/gnu. --- usr.bin/mandoc/roff.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.bin/mandoc/roff.c b/usr.bin/mandoc/roff.c index bb9db497599..16e03adc28f 100644 --- a/usr.bin/mandoc/roff.c +++ b/usr.bin/mandoc/roff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: roff.c,v 1.121 2015/01/14 22:57:57 schwarze Exp $ */ +/* $OpenBSD: roff.c,v 1.122 2015/01/16 16:52:39 schwarze Exp $ */ /* * Copyright (c) 2010, 2011, 2012, 2014 Kristaps Dzonsons * Copyright (c) 2010-2015 Ingo Schwarze @@ -73,6 +73,7 @@ enum rofft { ROFF_T_, ROFF_EQ, ROFF_EN, + ROFF_IX, ROFF_cblock, ROFF_USERDEF, ROFF_MAX @@ -272,6 +273,7 @@ static struct roffmac roffs[ROFF_MAX] = { { "T&", roff_T_, NULL, NULL, 0, NULL }, { "EQ", roff_EQ, NULL, NULL, 0, NULL }, { "EN", roff_EN, NULL, NULL, 0, NULL }, + { "IX", roff_line_ignore, NULL, NULL, 0, NULL }, { ".", roff_cblock, NULL, NULL, 0, NULL }, { NULL, roff_userdef, NULL, NULL, 0, NULL }, }; -- 2.20.1