summaryrefslogtreecommitdiffstats
path: root/mdoc_man.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-01-28 17:32:07 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-01-28 17:32:07 +0000
commitd04af2267985bcac279f3ffad1ce6ee9fec2d44f (patch)
tree416a18e84777806b55f50c7fb1147e9c88c4ef4b /mdoc_man.c
parentb8a3bef0831e00e2921ed5feb59338efcca0984d (diff)
downloadmandoc-d04af2267985bcac279f3ffad1ce6ee9fec2d44f.tar.gz
* 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 'mdoc_man.c')
-rw-r--r--mdoc_man.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/mdoc_man.c b/mdoc_man.c
index e4d3126e..db9405b0 100644
--- a/mdoc_man.c
+++ b/mdoc_man.c
@@ -1006,10 +1006,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);
}
@@ -1020,7 +1022,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;