summaryrefslogtreecommitdiffstats
path: root/tbl_data.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-01-11 14:12:01 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-01-11 14:12:01 +0000
commitfa73a21290e351913eadd2b70b4471fd30829483 (patch)
treecb524df5813e538c91ca612c4110c9e4291a7eb9 /tbl_data.c
parentc68f7a36a22b06ab0bb6afcd32d531d893abbc57 (diff)
downloadmandoc-fa73a21290e351913eadd2b70b4471fd30829483.tar.gz
Add support for "^" vertical spanners. Unlike GNU tbl, raise
error-class messages when data is being ignored by specifying it in "^" cells (either as-is or in blocks). Also note again that horizontal spanners aren't really supported...
Diffstat (limited to 'tbl_data.c')
-rw-r--r--tbl_data.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tbl_data.c b/tbl_data.c
index b4da8fcd..1a0d06ff 100644
--- a/tbl_data.c
+++ b/tbl_data.c
@@ -122,7 +122,8 @@ data(struct tbl_node *tbl, struct tbl_span *dp,
dat->pos = TBL_DATA_DATA;
if (TBL_CELL_HORIZ == dat->layout->pos ||
- TBL_CELL_DHORIZ == dat->layout->pos)
+ TBL_CELL_DHORIZ == dat->layout->pos ||
+ TBL_CELL_DOWN == dat->layout->pos)
if (TBL_DATA_DATA == dat->pos && '\0' != *dat->string)
TBL_MSG(tbl, MANDOCERR_TBLIGNDATA, ln, sv);
@@ -165,6 +166,9 @@ tbl_cdata(struct tbl_node *tbl, int ln, const char *p)
} else
dat->string = mandoc_strdup(p);
+ if (TBL_CELL_DOWN == dat->layout->pos)
+ TBL_MSG(tbl, MANDOCERR_TBLIGNDATA, ln, pos);
+
return(0);
}