diff options
author | 2015-01-28 17:30:37 +0000 | |
---|---|---|
committer | 2015-01-28 17:30:37 +0000 | |
commit | 92ff8da656b8b1e12dee549d9dd02aec127bdcb1 (patch) | |
tree | 88a2fa4f92806a2b4122e1394c92e0cd851a9a18 /usr.bin/mandoc/mdoc_man.c | |
parent | Remove ssl_by_mem_ctrl() and x509_mem_lookup to unbreak the build. It (diff) | |
download | wireguard-openbsd-92ff8da656b8b1e12dee549d9dd02aec127bdcb1.tar.xz wireguard-openbsd-92ff8da656b8b1e12dee549d9dd02aec127bdcb1.zip |
* Polish tbl(7) error reporting.
* Do not print out macro names in tbl(7) data blocks.
* Like with GNU tbl, let empty tables cause a blank line.
* Avoid producing empty tables in -Tman.
Diffstat (limited to 'usr.bin/mandoc/mdoc_man.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_man.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/usr.bin/mandoc/mdoc_man.c b/usr.bin/mandoc/mdoc_man.c index 2c6c966efe0..869df056843 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.80 2015/01/23 14:19:52 schwarze Exp $ */ +/* $OpenBSD: mdoc_man.c,v 1.81 2015/01/28 17:30:37 schwarze Exp $ */ /* * Copyright (c) 2011-2015 Ingo Schwarze <schwarze@openbsd.org> * @@ -1004,10 +1004,12 @@ pre_bl(DECL_ARGS) return(1); } - print_line(".TS", MMAN_nl); - for (icol = 0; icol < n->norm->Bl.ncols; icol++) - print_word("l"); - print_word("."); + if (n->nchild) { + print_line(".TS", MMAN_nl); + for (icol = 0; icol < n->norm->Bl.ncols; icol++) + print_word("l"); + print_word("."); + } outflags |= MMAN_nl; return(1); } @@ -1018,7 +1020,8 @@ post_bl(DECL_ARGS) switch (n->norm->Bl.type) { case LIST_column: - print_line(".TE", 0); + if (n->nchild) + print_line(".TE", 0); break; case LIST_enum: n->norm->Bl.count = 0; |