diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-01-28 17:30:38 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-01-28 17:30:38 +0000 |
commit | 08ea58d70d3ecfac3019ba438a9feb8ed51a2fda (patch) | |
tree | 21b9d24eafa6de1091ebe06887e2274d9adb1d8b /usr.bin/mandoc/roff.c | |
parent | ea0b68b3e7b142842ab6697c59f4c5fcd69a8ded (diff) |
* 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 'usr.bin/mandoc/roff.c')
-rw-r--r-- | usr.bin/mandoc/roff.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/mandoc/roff.c b/usr.bin/mandoc/roff.c index 53cb633b4e0..e23b73a6a1b 100644 --- a/usr.bin/mandoc/roff.c +++ b/usr.bin/mandoc/roff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: roff.c,v 1.129 2015/01/28 15:02:25 schwarze Exp $ */ +/* $OpenBSD: roff.c,v 1.130 2015/01/28 17:30:37 schwarze Exp $ */ /* * Copyright (c) 2010, 2011, 2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org> @@ -2374,9 +2374,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); } |