aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/out.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-11-25 19:24:20 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-11-25 19:24:20 +0000
commite30a05d61589276c015f65e4ac75df70040c3808 (patch)
treecd0e6ceb3acaf39d7cd2796c21ac8750850a8e15 /out.c
parent06e66f94d3ea6bc0665d39bb5f02c2acb54c0cc1 (diff)
downloadmandoc-e30a05d61589276c015f65e4ac75df70040c3808.tar.gz
mandoc-e30a05d61589276c015f65e4ac75df70040c3808.tar.zst
mandoc-e30a05d61589276c015f65e4ac75df70040c3808.zip
In tbl(7) -T html output,
span cells horizontally and vertically as requested by the layout. Does not handle spans requested in the data section yet. To be able to do this, record the number of rows spanned in the first data cell (struct tbl_dat) of a vertical span. Missing feature reported by Pali dot Rohar at gmail dot com.
Diffstat (limited to 'out.c')
-rw-r--r--out.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/out.c b/out.c
index 9b22fe54..ca593578 100644
--- a/out.c
+++ b/out.c
@@ -1,4 +1,4 @@
-/* $Id: out.c,v 1.73 2018/08/19 23:10:28 schwarze Exp $ */
+/* $Id: out.c,v 1.74 2018/11/25 19:24:20 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011,2014,2015,2017,2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -112,7 +112,7 @@ tblcalc(struct rofftbl *tbl, const struct tbl_span *sp,
const struct tbl_dat *dp;
struct roffcol *col;
size_t ewidth, xwidth;
- int spans;
+ int hspans;
int icol, maxcol, necol, nxcol, quirkcol;
/*
@@ -129,17 +129,17 @@ tblcalc(struct rofftbl *tbl, const struct tbl_span *sp,
for (maxcol = -1; sp; sp = sp->next) {
if (TBL_SPAN_DATA != sp->pos)
continue;
- spans = 1;
+ hspans = 1;
/*
* Account for the data cells in the layout, matching it
* to data cells in the data section.
*/
for (dp = sp->first; dp; dp = dp->next) {
/* Do not used spanned cells in the calculation. */
- if (0 < --spans)
+ if (0 < --hspans)
continue;
- spans = dp->spans;
- if (1 < spans)
+ hspans = dp->hspans;
+ if (1 < hspans)
continue;
icol = dp->layout->col;
while (maxcol < icol)