aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tbl_data.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-01-04 12:06:21 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-01-04 12:06:21 +0000
commit543980ff972d5b50a51593a306420bb65fbf6b61 (patch)
treea080fdde4da2d2ee8bef446c09ee6825a6215293 /tbl_data.c
parentbe25abe332d021e7a5092c3596a6ffc11e352da9 (diff)
downloadmandoc-543980ff972d5b50a51593a306420bb65fbf6b61.tar.gz
mandoc-543980ff972d5b50a51593a306420bb65fbf6b61.tar.zst
mandoc-543980ff972d5b50a51593a306420bb65fbf6b61.zip
Fix to make horizontal spanners in the layout be properly printed.
mandoc also now warns (so does tbl(1)) if a horizontal spanner is specified along with data. While here, fix up some documentation and uncomment the tbl reference.
Diffstat (limited to 'tbl_data.c')
-rw-r--r--tbl_data.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tbl_data.c b/tbl_data.c
index 65659e24..40264b9c 100644
--- a/tbl_data.c
+++ b/tbl_data.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_data.c,v 1.9 2011/01/02 12:04:23 kristaps Exp $ */
+/* $Id: tbl_data.c,v 1.10 2011/01/04 12:06:21 kristaps Exp $ */
/*
* Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -82,6 +82,11 @@ data(struct tbl_node *tbl, struct tbl_span *dp,
dat->pos = TBL_DATA_NDHORIZ;
else
dat->pos = TBL_DATA_DATA;
+
+ if (TBL_CELL_HORIZ == dat->layout->pos ||
+ TBL_CELL_DHORIZ == dat->layout->pos)
+ if (TBL_DATA_DATA == dat->pos && '\0' != *dat->string)
+ TBL_MSG(tbl, MANDOCERR_TBLIGNDATA, ln, sv);
}
int