From 67cfc20e20f4c603c852ddf5c88024ce0d8d628c 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. --- roff.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'roff.c') diff --git a/roff.c b/roff.c index 7e1360e2..d64807d6 100644 --- a/roff.c +++ b/roff.c @@ -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 * Copyright (c) 2010-2015 Ingo Schwarze @@ -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); } -- cgit v1.2.3-56-ge451