diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-12-30 09:34:06 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-12-30 09:34:06 +0000 |
commit | e875ab2ae5330f3a0ed3e650ab2ea07460c2266a (patch) | |
tree | 594522ffb2684eb12a4f887266ea5a8eb5b9d576 /tbl_layout.c | |
parent | f3fd4f5f1744aff75c7c584aa1f72da4dfbfb016 (diff) | |
download | mandoc-e875ab2ae5330f3a0ed3e650ab2ea07460c2266a.tar.gz |
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.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tbl_layout.c b/tbl_layout.c index 6262fafe..c03a39df 100644 --- a/tbl_layout.c +++ b/tbl_layout.c @@ -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; |