aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tbl_layout.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-12-30 09:34:06 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-12-30 09:34:06 +0000
commit106912a8afaf5d13433f9c31bf444d8c6c1361de (patch)
treedf6c158982dfb1808e5a75dc616fb38d5e0537ef /tbl_layout.c
parent2af1c510e72c986dadae0d6e4235fc0ec111608d (diff)
downloadmandoc-106912a8afaf5d13433f9c31bf444d8c6c1361de.tar.gz
mandoc-106912a8afaf5d13433f9c31bf444d8c6c1361de.tar.zst
mandoc-106912a8afaf5d13433f9c31bf444d8c6c1361de.zip
Move clean-up of parsed tbl nodes into the tbl_clear() function, called
once per invocation.
Diffstat (limited to 'tbl_layout.c')
-rw-r--r--tbl_layout.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tbl_layout.c b/tbl_layout.c
index a2be7e4b..a93f5c9a 100644
--- a/tbl_layout.c
+++ b/tbl_layout.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_layout.c,v 1.2 2010/12/29 15:21:34 kristaps Exp $ */
+/* $Id: tbl_layout.c,v 1.3 2010/12/30 09:34:07 kristaps Exp $ */
/*
* Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -217,11 +217,11 @@ row: /*
*/
rp = mandoc_calloc(1, sizeof(struct tbl_row));
- if (tbl->last) {
- tbl->last->next = rp;
- tbl->last = rp;
+ if (tbl->last_row) {
+ tbl->last_row->next = rp;
+ tbl->last_row = rp;
} else
- tbl->last = tbl->first = rp;
+ tbl->last_row = tbl->first_row = rp;
cell:
while (isspace((unsigned char)p[*pos]))
@@ -231,7 +231,7 @@ cell:
if ('.' == p[*pos]) {
tbl->part = TBL_PART_DATA;
- if (NULL == tbl->first)
+ if (NULL == tbl->first_row)
TBL_MSG(tbl, MANDOCERR_TBLNOLAYOUT, ln, *pos);
(*pos)++;
return;