aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit52a50fec0924869c52803daed1f1d5dbf5f108af (patch)
tree845a8f588eaf4ee640c5ce2ed5474035011c0af2 /roff.c
parentb647509c369ba76cf84060f8889fe7e2b2031775 (diff)
downloadmandoc-52a50fec0924869c52803daed1f1d5dbf5f108af.tar.gz
mandoc-52a50fec0924869c52803daed1f1d5dbf5f108af.tar.zst
mandoc-52a50fec0924869c52803daed1f1d5dbf5f108af.zip
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.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/roff.c b/roff.c
index 5531dc86..a1c21ed2 100644
--- a/roff.c
+++ b/roff.c
@@ -1,4 +1,4 @@
-/* $Id: roff.c,v 1.114 2010/12/31 18:19:43 kristaps Exp $ */
+/* $Id: roff.c,v 1.115 2011/01/01 15:45:18 kristaps Exp $ */
/*
* Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -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;