aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit67cfc20e20f4c603c852ddf5c88024ce0d8d628c (patch)
tree5e3c7114721eba342929a649511dbf5a94439d6c /mdoc_man.c
parent7793230177d864fb80c0c572a2b896f3ecb7df10 (diff)
downloadmandoc-67cfc20e20f4c603c852ddf5c88024ce0d8d628c.tar.gz
mandoc-67cfc20e20f4c603c852ddf5c88024ce0d8d628c.tar.zst
mandoc-67cfc20e20f4c603c852ddf5c88024ce0d8d628c.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 'mdoc_man.c')
-rw-r--r--mdoc_man.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/mdoc_man.c b/mdoc_man.c
index 3181b4a3..f329cd98 100644
--- a/mdoc_man.c
+++ b/mdoc_man.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_man.c,v 1.82 2015/01/23 14:21:01 schwarze Exp $ */
+/* $Id: mdoc_man.c,v 1.83 2015/01/28 17:32:07 schwarze Exp $ */
/*
* Copyright (c) 2011-2015 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -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;