diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2018-11-25 19:24:20 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2018-11-25 19:24:20 +0000 |
commit | 059731525cc9a54258e9e3b825e28777a212ff15 (patch) | |
tree | 30d57f784c3cfd5db5e6193905cb1ac682176943 /out.c | |
parent | 146de3f75b3f64ddd06ababf395811b3abbb2fb3 (diff) | |
download | mandoc-059731525cc9a54258e9e3b825e28777a212ff15.tar.gz |
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.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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) |