aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit9ccd8b3e4376fa371cffa2cc59bb4e395f16bf6b (patch)
tree65215cd4085e58f81ce536690469b9d17f08a453 /roff.c
parent6fe32c3b53980dd4c549b459bbf7efae0b6352b9 (diff)
downloadmandoc-9ccd8b3e4376fa371cffa2cc59bb4e395f16bf6b.tar.gz
mandoc-9ccd8b3e4376fa371cffa2cc59bb4e395f16bf6b.tar.zst
mandoc-9ccd8b3e4376fa371cffa2cc59bb4e395f16bf6b.zip
More checks for proper table exit.
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/roff.c b/roff.c
index be1dbb47..8ea194e7 100644
--- a/roff.c
+++ b/roff.c
@@ -1,4 +1,4 @@
-/* $Id: roff.c,v 1.116 2011/01/01 16:10:40 kristaps Exp $ */
+/* $Id: roff.c,v 1.117 2011/01/01 16:18:39 kristaps Exp $ */
/*
* Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -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;
+ }
}