summaryrefslogtreecommitdiffstats
path: root/mdoc_man.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-12-25 22:00:45 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-12-25 22:00:45 +0000
commit6e24f940633ec22b1bf9d57b12da30d9ff04618e (patch)
tree4a40e43ad1bff88725bf8a5fc1ea465cf7d09ed9 /mdoc_man.c
parent0b2f31ffd79000c7317bc9473f3d7dc4c3fa64d4 (diff)
downloadmandoc-6e24f940633ec22b1bf9d57b12da30d9ff04618e.tar.gz
Implement .Fo/.Fa/.Fc indentation and break handling for -Tman.
Diffstat (limited to 'mdoc_man.c')
-rw-r--r--mdoc_man.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mdoc_man.c b/mdoc_man.c
index d21cad56..9f7691d9 100644
--- a/mdoc_man.c
+++ b/mdoc_man.c
@@ -1030,13 +1030,16 @@ post_eo(DECL_ARGS)
static int
pre_fa(DECL_ARGS)
{
+ int am_Fa;
- if (MDOC_Fa == n->tok)
+ am_Fa = MDOC_Fa == n->tok;
+
+ if (am_Fa)
n = n->child;
while (NULL != n) {
font_push('I');
- if (MDOC_SYNPRETTY & n->flags)
+ if (am_Fa || MDOC_SYNPRETTY & n->flags)
outflags |= MMAN_nbrword;
print_node(meta, n);
font_pop();
@@ -1137,6 +1140,8 @@ pre_fo(DECL_ARGS)
pre_syn(n);
break;
case (MDOC_HEAD):
+ if (MDOC_SYNPRETTY & n->flags)
+ print_block(".HP 4n", MMAN_nl);
font_push('B');
break;
case (MDOC_BODY):
@@ -1149,7 +1154,7 @@ pre_fo(DECL_ARGS)
}
return(1);
}
-
+
static void
post_fo(DECL_ARGS)
{