aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_validate.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-02-06 08:28:35 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-02-06 08:28:35 +0000
commitd8b17016dd40c058e6cbfc2f195d4a2ac296d65e (patch)
tree6cedd7c230bf41c721154acd804b911a04cf13d9 /man_validate.c
parent7fefe85053961b17df364545120a269be409beb4 (diff)
downloadmandoc-d8b17016dd40c058e6cbfc2f195d4a2ac296d65e.tar.gz
mandoc-d8b17016dd40c058e6cbfc2f195d4a2ac296d65e.tar.zst
mandoc-d8b17016dd40c058e6cbfc2f195d4a2ac296d65e.zip
better error reporting for .br .fi .nf with arguments
Diffstat (limited to 'man_validate.c')
-rw-r--r--man_validate.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/man_validate.c b/man_validate.c
index 2e844d19..682213b7 100644
--- a/man_validate.c
+++ b/man_validate.c
@@ -38,7 +38,6 @@
typedef void (*v_check)(CHKARGS);
-static void check_eq0(CHKARGS);
static void check_eq2(CHKARGS);
static void check_le1(CHKARGS);
static void check_le5(CHKARGS);
@@ -182,7 +181,6 @@ check_##name(CHKARGS) \
#ineq, (x), n->nchild); \
}
-INEQ_DEFINE(0, ==, eq0)
INEQ_DEFINE(2, ==, eq2)
INEQ_DEFINE(1, <=, le1)
INEQ_DEFINE(5, <=, le5)
@@ -401,9 +399,7 @@ static void
post_nf(CHKARGS)
{
- check_eq0(man, n);
-
- if (MAN_LITERAL & man->flags)
+ if (man->flags & MAN_LITERAL)
mandoc_msg(MANDOCERR_NF_SKIP, man->parse,
n->line, n->pos, "nf");
@@ -414,8 +410,6 @@ static void
post_fi(CHKARGS)
{
- check_eq0(man, n);
-
if ( ! (MAN_LITERAL & man->flags))
mandoc_msg(MANDOCERR_FI_SKIP, man->parse,
n->line, n->pos, "fi");
@@ -501,9 +495,7 @@ static void
post_vs(CHKARGS)
{
- if (n->tok == MAN_br)
- check_eq0(man, n);
- else
+ if (n->tok == MAN_sp)
check_le1(man, n);
if (NULL != n->prev)