summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mdoc_man.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2015-02-06 03:31:11 +0000
committerschwarze <schwarze@openbsd.org>2015-02-06 03:31:11 +0000
commitafcd1f037b98fe634215da4a1c275e1c6bfb1886 (patch)
treeb67a1fd40a9357c016cbbff0ada6ad1c236b7aa9 /usr.bin/mandoc/mdoc_man.c
parentRemove route/netstat -f encap in favor of ipsecctl -s flow. (diff)
downloadwireguard-openbsd-afcd1f037b98fe634215da4a1c275e1c6bfb1886.tar.xz
wireguard-openbsd-afcd1f037b98fe634215da4a1c275e1c6bfb1886.zip
better handle .Fo and .Fd without argument
better handle .Fo with more than one argument
Diffstat (limited to 'usr.bin/mandoc/mdoc_man.c')
-rw-r--r--usr.bin/mandoc/mdoc_man.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/mandoc/mdoc_man.c b/usr.bin/mandoc/mdoc_man.c
index e399e466ca3..07553485220 100644
--- a/usr.bin/mandoc/mdoc_man.c
+++ b/usr.bin/mandoc/mdoc_man.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdoc_man.c,v 1.82 2015/02/01 23:10:15 schwarze Exp $ */
+/* $OpenBSD: mdoc_man.c,v 1.83 2015/02/06 03:31:11 schwarze Exp $ */
/*
* Copyright (c) 2011-2015 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -1282,12 +1282,14 @@ pre_fo(DECL_ARGS)
pre_syn(n);
break;
case MDOC_HEAD:
+ if (n->child == NULL)
+ return(0);
if (MDOC_SYNPRETTY & n->flags)
print_block(".HP 4n", MMAN_nl);
font_push('B');
break;
case MDOC_BODY:
- outflags &= ~MMAN_spc;
+ outflags &= ~(MMAN_spc | MMAN_nl);
print_word("(");
outflags &= ~MMAN_spc;
break;
@@ -1303,7 +1305,8 @@ post_fo(DECL_ARGS)
switch (n->type) {
case MDOC_HEAD:
- font_pop();
+ if (n->child != NULL)
+ font_pop();
break;
case MDOC_BODY:
post_fn(meta, n);