summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/man_macro.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2015-02-06 08:28:05 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2015-02-06 08:28:05 +0000
commit78c8cd1b4c93c31904483de44b50c4eee2cf0069 (patch)
treeb5a596a4ad1b3d05bf4b22434a408db9d851f776 /usr.bin/mandoc/man_macro.c
parentbe4ca90160180f092bf4c3ba13b390c55602f9b6 (diff)
better error reporting for .br .fi .nf with arguments
Diffstat (limited to 'usr.bin/mandoc/man_macro.c')
-rw-r--r--usr.bin/mandoc/man_macro.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/mandoc/man_macro.c b/usr.bin/mandoc/man_macro.c
index 56cd937d050..413f56f63fe 100644
--- a/usr.bin/mandoc/man_macro.c
+++ b/usr.bin/mandoc/man_macro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man_macro.c,v 1.57 2015/01/24 10:07:58 schwarze Exp $ */
+/* $OpenBSD: man_macro.c,v 1.58 2015/02/06 08:28:03 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2012, 2013, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -418,6 +418,13 @@ in_line_eoln(MACRO_PROT_ARGS)
n = man->last;
for (;;) {
+ if (buf[*pos] != '\0' && (tok == MAN_br ||
+ tok == MAN_fi || tok == MAN_nf)) {
+ mandoc_vmsg(MANDOCERR_ARG_SKIP,
+ man->parse, line, *pos, "%s %s",
+ man_macronames[tok], buf + *pos);
+ break;
+ }
la = *pos;
if ( ! man_args(man, line, pos, buf, &p))
break;