aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_macro.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_macro.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_macro.c')
-rw-r--r--man_macro.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/man_macro.c b/man_macro.c
index ed79321f..06a1d05d 100644
--- a/man_macro.c
+++ b/man_macro.c
@@ -1,4 +1,4 @@
-/* $Id: man_macro.c,v 1.95 2015/01/24 10:08:53 schwarze Exp $ */
+/* $Id: man_macro.c,v 1.96 2015/02/06 08:28:35 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2012, 2013, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -420,6 +420,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;