diff options
author | 2013-12-25 22:00:34 +0000 | |
---|---|---|
committer | 2013-12-25 22:00:34 +0000 | |
commit | 1074fc8ae8f7135b11d4e867949a2e86a109b6b3 (patch) | |
tree | e7c3b2485ff4e6136aad74d64daab2630a5c3ae6 /usr.bin/mandoc/mdoc_man.c | |
parent | Oops, .Fa never breaks the output line in the middle of any of its (diff) | |
download | wireguard-openbsd-1074fc8ae8f7135b11d4e867949a2e86a109b6b3.tar.xz wireguard-openbsd-1074fc8ae8f7135b11d4e867949a2e86a109b6b3.zip |
Implement .Fo/.Fa/.Fc indentation and break handling for -Tman.
Diffstat (limited to 'usr.bin/mandoc/mdoc_man.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_man.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/usr.bin/mandoc/mdoc_man.c b/usr.bin/mandoc/mdoc_man.c index 5b713b3a596..5fe505283be 100644 --- a/usr.bin/mandoc/mdoc_man.c +++ b/usr.bin/mandoc/mdoc_man.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_man.c,v 1.55 2013/12/25 00:39:13 schwarze Exp $ */ +/* $Id: mdoc_man.c,v 1.56 2013/12/25 22:00:34 schwarze Exp $ */ /* * Copyright (c) 2011, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org> * @@ -1026,13 +1026,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(); @@ -1133,6 +1136,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): @@ -1145,7 +1150,7 @@ pre_fo(DECL_ARGS) } return(1); } - + static void post_fo(DECL_ARGS) { |