From c66b8046543352459a11a51501b628d1c98a8c44 Mon Sep 17 00:00:00 2001 From: Yuri Pankov Date: Sat, 29 Jul 2017 16:02:29 +0300 Subject: 8547 update mandoc to 1.14.3 Reviewed by: Robert Mustacchi Approved by: Richard Lowe --- usr/src/cmd/mandoc/tbl.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'usr/src/cmd/mandoc/tbl.c') diff --git a/usr/src/cmd/mandoc/tbl.c b/usr/src/cmd/mandoc/tbl.c index ed6fbd876a..3fb8e52a4c 100644 --- a/usr/src/cmd/mandoc/tbl.c +++ b/usr/src/cmd/mandoc/tbl.c @@ -1,4 +1,4 @@ -/* $Id: tbl.c,v 1.40 2015/10/06 18:32:20 schwarze Exp $ */ +/* $Id: tbl.c,v 1.42 2017/07/08 17:52:50 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2011, 2015 Ingo Schwarze @@ -31,7 +31,7 @@ #include "libroff.h" -enum rofferr +void tbl_read(struct tbl_node *tbl, int ln, const char *p, int pos) { const char *cp; @@ -66,7 +66,7 @@ tbl_read(struct tbl_node *tbl, int ln, const char *p, int pos) if (*cp == ';') { tbl_option(tbl, ln, p, &pos); if (p[pos] == '\0') - return ROFF_IGN; + return; } } @@ -75,15 +75,14 @@ tbl_read(struct tbl_node *tbl, int ln, const char *p, int pos) switch (tbl->part) { case TBL_PART_LAYOUT: tbl_layout(tbl, ln, p, pos); - return ROFF_IGN; + break; case TBL_PART_CDATA: - return tbl_cdata(tbl, ln, p, pos) ? ROFF_TBL : ROFF_IGN; + tbl_cdata(tbl, ln, p, pos); + break; default: + tbl_data(tbl, ln, p, pos); break; } - - tbl_data(tbl, ln, p, pos); - return ROFF_TBL; } struct tbl_node * @@ -114,6 +113,7 @@ tbl_free(struct tbl_node *tbl) while (rp->first != NULL) { cp = rp->first; rp->first = cp->next; + free(cp->wstr); free(cp); } free(rp); @@ -159,14 +159,10 @@ tbl_span(struct tbl_node *tbl) } int -tbl_end(struct tbl_node **tblp) +tbl_end(struct tbl_node *tbl) { - struct tbl_node *tbl; struct tbl_span *sp; - tbl = *tblp; - *tblp = NULL; - if (tbl->part == TBL_PART_CDATA) mandoc_msg(MANDOCERR_TBLDATA_BLK, tbl->parse, tbl->line, tbl->pos, "TE"); -- cgit v1.2.3