aboutsummaryrefslogtreecommitdiffstatshomepage
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
commitc55312cd12a98b785c3fcb600c21a78c6704d667 (patch)
tree3f7f805be1f9e69f5b33a685c67268c5c0b1eec4 /tbl_data.c
parent5e6fd78525e0976e02b4fe2de55f0064a648cefe (diff)
downloadmandoc-c55312cd12a98b785c3fcb600c21a78c6704d667.tar.gz
mandoc-c55312cd12a98b785c3fcb600c21a78c6704d667.tar.zst
mandoc-c55312cd12a98b785c3fcb600c21a78c6704d667.zip
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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tbl_data.c b/tbl_data.c
index e68cd4a7..980a584c 100644
--- a/tbl_data.c
+++ b/tbl_data.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_data.c,v 1.18 2011/01/10 15:31:00 kristaps Exp $ */
+/* $Id: tbl_data.c,v 1.19 2011/01/11 14:12:01 kristaps Exp $ */
/*
* Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -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);
}