summaryrefslogtreecommitdiffstats
path: root/roff.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-01-01 15:45:18 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-01-01 15:45:18 +0000
commit11a4a49536978db711f68cc010fec41f76c2f970 (patch)
tree898f1e145588b487ca875c4fd3df9e132eddb1ff /roff.c
parent31916df7856f6ea8b704f200c8a68d72e536fd32 (diff)
downloadmandoc-11a4a49536978db711f68cc010fec41f76c2f970.tar.gz
Add documentation bits for libroff's new roff_span().
Add bits to remember tbl's invocation point. Add ERROR class message if no data's in the table.
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/roff.c b/roff.c
index eecba18c..56202846 100644
--- a/roff.c
+++ b/roff.c
@@ -1123,6 +1123,8 @@ roff_TE(ROFF_ARGS)
if (NULL == r->tbl)
(*r->msg)(MANDOCERR_NOSCOPE, r->data, ln, ppos, NULL);
+ else
+ tbl_end(r->tbl);
r->tbl = NULL;
return(ROFF_IGN);
@@ -1147,10 +1149,12 @@ roff_TS(ROFF_ARGS)
{
struct tbl *t;
- if (r->tbl)
+ if (r->tbl) {
(*r->msg)(MANDOCERR_SCOPEBROKEN, r->data, ln, ppos, NULL);
+ tbl_end(r->tbl);
+ }
- t = tbl_alloc(r->data, r->msg);
+ t = tbl_alloc(ppos, ln, r->data, r->msg);
if (r->last_tbl)
r->last_tbl->next = t;