From d04af2267985bcac279f3ffad1ce6ee9fec2d44f Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 28 Jan 2015 17:32:07 +0000 Subject: * 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. --- mdoc_man.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'mdoc_man.c') 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; -- cgit