diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-01 16:10:40 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-01 16:10:40 +0000 |
commit | d84dbf74b948c2ca03a405c62aaddd91c404e66e (patch) | |
tree | cf61eba08e8d1e40418b9a0e2391cd6c0fad6d12 /tbl.c | |
parent | 11a4a49536978db711f68cc010fec41f76c2f970 (diff) | |
download | mandoc-d84dbf74b948c2ca03a405c62aaddd91c404e66e.tar.gz |
Raise an error if a table is closed without data.
Diffstat (limited to 'tbl.c')
-rw-r--r-- | tbl.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -116,10 +116,15 @@ tbl_free(struct tbl *p) } void -tbl_restart(struct tbl *tbl) +tbl_restart(int line, int pos, struct tbl *tbl) { tbl->part = TBL_PART_LAYOUT; + tbl->line = line; + tbl->pos = pos; + + if (NULL == tbl->first_span || NULL == tbl->first_span->first) + TBL_MSG(tbl, MANDOCERR_TBLNODATA, tbl->line, tbl->pos); } const struct tbl_span * @@ -137,3 +142,4 @@ tbl_end(struct tbl *tbl) if (NULL == tbl->first_span || NULL == tbl->first_span->first) TBL_MSG(tbl, MANDOCERR_TBLNODATA, tbl->line, tbl->pos); } + |