summaryrefslogtreecommitdiffstats
path: root/roff.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-01-01 16:18:39 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-01-01 16:18:39 +0000
commit3592c989529bee1adce043bede9fbc1902993301 (patch)
treeb93847ccfce126a1842b46840891140e0b094093 /roff.c
parentd84dbf74b948c2ca03a405c62aaddd91c404e66e (diff)
downloadmandoc-3592c989529bee1adce043bede9fbc1902993301.tar.gz
More checks for proper table exit.
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/roff.c b/roff.c
index b0a373cd..258de792 100644
--- a/roff.c
+++ b/roff.c
@@ -515,15 +515,20 @@ roff_parseln(struct roff *r, int ln, char **bufp,
}
-int
+void
roff_endparse(struct roff *r)
{
- /* FIXME: if r->tbl */
if (r->last)
(*r->msg)(MANDOCERR_SCOPEEXIT, r->data,
r->last->line, r->last->col, NULL);
- return(1);
+
+ if (r->tbl) {
+ (*r->msg)(MANDOCERR_SCOPEEXIT, r->data,
+ r->tbl->line, r->tbl->pos, NULL);
+ tbl_end(r->tbl);
+ r->tbl = NULL;
+ }
}