aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tbl_data.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-01-01 22:27:08 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-01-01 22:27:08 +0000
commit50d29bf6574505b50aa9e8520471ac37a8de0bad (patch)
treec9ce4086e578d25027f8722c883949a2c0319868 /tbl_data.c
parent1e982599c7f339de5711a30d937e9f4ab18a529f (diff)
downloadmandoc-50d29bf6574505b50aa9e8520471ac37a8de0bad.tar.gz
mandoc-50d29bf6574505b50aa9e8520471ac37a8de0bad.tar.zst
mandoc-50d29bf6574505b50aa9e8520471ac37a8de0bad.zip
Add a warning if a data cell has no layout. Also make -Ttree show this
with a little star next to the entry (yeah, this is mostly for testing).
Diffstat (limited to 'tbl_data.c')
-rw-r--r--tbl_data.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tbl_data.c b/tbl_data.c
index 2e2ec564..cc264eb4 100644
--- a/tbl_data.c
+++ b/tbl_data.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_data.c,v 1.6 2011/01/01 21:23:01 kristaps Exp $ */
+/* $Id: tbl_data.c,v 1.7 2011/01/01 22:27:08 kristaps Exp $ */
/*
* Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -52,6 +52,9 @@ data(struct tbl *tbl, struct tbl_span *dp,
dat = mandoc_calloc(1, sizeof(struct tbl_dat));
dat->layout = cp;
+ if (NULL == dat->layout)
+ TBL_MSG(tbl, MANDOCERR_TBLEXTRADAT, ln, *pos);
+
if (dp->last) {
dp->last->next = dat;
dp->last = dat;