summaryrefslogtreecommitdiffstats
path: root/roff.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 /roff.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 'roff.c')
-rw-r--r--roff.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/roff.c b/roff.c
index 6c1a2f5a..0edc7e7b 100644
--- a/roff.c
+++ b/roff.c
@@ -2376,9 +2376,12 @@ roff_TE(ROFF_ARGS)
if (NULL == r->tbl)
mandoc_msg(MANDOCERR_BLK_NOTOPEN, r->parse,
ln, ppos, "TE");
- else
- tbl_end(&r->tbl);
-
+ else if ( ! tbl_end(&r->tbl)) {
+ free(buf->buf);
+ buf->buf = mandoc_strdup(".sp");
+ buf->sz = 4;
+ return(ROFF_REPARSE);
+ }
return(ROFF_IGN);
}