version 1.68, 2017/06/14 18:23:37 |
version 1.70, 2017/06/27 18:25:02 |
|
|
#include <sys/types.h> |
#include <sys/types.h> |
|
|
#include <assert.h> |
#include <assert.h> |
|
#include <stdint.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
#include <time.h> |
#include <time.h> |
Line 140 tblcalc(struct rofftbl *tbl, const struct tbl_span *sp |
|
Line 141 tblcalc(struct rofftbl *tbl, const struct tbl_span *sp |
|
if (1 < spans) |
if (1 < spans) |
continue; |
continue; |
icol = dp->layout->col; |
icol = dp->layout->col; |
if (maxcol < icol) |
while (maxcol < icol) |
maxcol = icol; |
tbl->cols[++maxcol].spacing = SIZE_MAX; |
col = tbl->cols + icol; |
col = tbl->cols + icol; |
col->flags |= dp->layout->flags; |
col->flags |= dp->layout->flags; |
if (dp->layout->flags & TBL_CELL_WIGN) |
if (dp->layout->flags & TBL_CELL_WIGN) |
Line 154 tblcalc(struct rofftbl *tbl, const struct tbl_span *sp |
|
Line 155 tblcalc(struct rofftbl *tbl, const struct tbl_span *sp |
|
(*tbl->sulen)(&su, tbl->arg); |
(*tbl->sulen)(&su, tbl->arg); |
if (col->width < dp->layout->width) |
if (col->width < dp->layout->width) |
col->width = dp->layout->width; |
col->width = dp->layout->width; |
|
if (dp->layout->spacing != SIZE_MAX && |
|
(col->spacing == SIZE_MAX || |
|
col->spacing < dp->layout->spacing)) |
|
col->spacing = dp->layout->spacing; |
tblcalc_data(tbl, col, opts, dp, |
tblcalc_data(tbl, col, opts, dp, |
dp->block == 0 ? 0 : |
dp->block == 0 ? 0 : |
dp->layout->width ? dp->layout->width : |
dp->layout->width ? dp->layout->width : |
rmargin ? rmargin / (sp->opts->cols + 1) : 0); |
rmargin ? (rmargin + sp->opts->cols / 2) |
|
/ (sp->opts->cols + 1) : 0); |
} |
} |
} |
} |
|
|
Line 171 tblcalc(struct rofftbl *tbl, const struct tbl_span *sp |
|
Line 177 tblcalc(struct rofftbl *tbl, const struct tbl_span *sp |
|
ewidth = xwidth = 0; |
ewidth = xwidth = 0; |
for (icol = 0; icol <= maxcol; icol++) { |
for (icol = 0; icol <= maxcol; icol++) { |
col = tbl->cols + icol; |
col = tbl->cols + icol; |
|
if (col->spacing == SIZE_MAX || icol == maxcol) |
|
col->spacing = 3; |
if (col->flags & TBL_CELL_EQUAL) { |
if (col->flags & TBL_CELL_EQUAL) { |
necol++; |
necol++; |
if (ewidth < col->width) |
if (ewidth < col->width) |