diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-01-28 17:32:07 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-01-28 17:32:07 +0000 |
commit | 67cfc20e20f4c603c852ddf5c88024ce0d8d628c (patch) | |
tree | 5e3c7114721eba342929a649511dbf5a94439d6c /roff.c | |
parent | 7793230177d864fb80c0c572a2b896f3ecb7df10 (diff) | |
download | mandoc-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 'roff.c')
-rw-r--r-- | roff.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.257 2015/01/28 15:03:45 schwarze Exp $ */ +/* $Id: roff.c,v 1.258 2015/01/28 17:32:07 schwarze Exp $ */ /* * Copyright (c) 2010, 2011, 2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org> @@ -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); } |