summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mdoc_man.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2015-02-06 03:31:12 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2015-02-06 03:31:12 +0000
commit8fafc196c8a9cc24f726d752dbc29056f844100b (patch)
tree0475ae8ca9fea84a885a330eaca2e84d70afa886 /usr.bin/mandoc/mdoc_man.c
parent01d4d73c049c5a5352463f69843a549758f8642f (diff)
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);