aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_macro.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-02-06 03:38:45 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-02-06 03:38:45 +0000
commit7dfe6b3fdffd0ff76af3e3d347b0f300fddb15e8 (patch)
treec8da2ede0eced598b1c3160a92a64f654f8225ca /mdoc_macro.c
parent21214100bde85df055d67a3ab4b9c51b8a2dd7fb (diff)
downloadmandoc-7dfe6b3fdffd0ff76af3e3d347b0f300fddb15e8.tar.gz
mandoc-7dfe6b3fdffd0ff76af3e3d347b0f300fddb15e8.tar.zst
mandoc-7dfe6b3fdffd0ff76af3e3d347b0f300fddb15e8.zip
better handle .Fo and .Fd without argument
better handle .Fo with more than one argument
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r--mdoc_macro.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index 8bc79919..18f1df58 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_macro.c,v 1.177 2015/02/06 01:07:22 schwarze Exp $ */
+/* $Id: mdoc_macro.c,v 1.178 2015/02/06 03:38:45 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -1403,6 +1403,12 @@ in_line_eoln(MACRO_PROT_ARGS)
rew_last(mdoc, mdoc->last->parent);
}
+ if (buf[*pos] == '\0' && tok == MDOC_Fd) {
+ mandoc_msg(MANDOCERR_MACRO_EMPTY, mdoc->parse,
+ line, ppos, "Fd");
+ return;
+ }
+
mdoc_argv(mdoc, line, tok, &arg, pos, buf);
mdoc_elem_alloc(mdoc, line, ppos, tok, arg);
if (parse_rest(mdoc, tok, line, pos, buf))