summaryrefslogtreecommitdiffstats
path: root/out.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2012-05-27 17:54:54 +0000
committerIngo Schwarze <schwarze@openbsd.org>2012-05-27 17:54:54 +0000
commitaa6d8ba46cf4b68619e16a7ea8a8cc36f3f3bfc5 (patch)
tree5cdde1b58ea03076e8fb7d09e8baca289fe978ac /out.c
parentcc286dde362eb32238e74c6bd62962a7ffe6e872 (diff)
downloadmandoc-aa6d8ba46cf4b68619e16a7ea8a8cc36f3f3bfc5.tar.gz
Do not handle vertical lines as additional tbl(7) columns,
instead save their properties with the following column. This simplifies layout parsing and saves a lot of code related to column handling. At output time, print all white space and vertical lines separating columns before printing the following column, and none after printing the preceding column, considerably simplifying white space handling and width calculations. No functional change, but it saves 150 lines of code, and it allows the next patch to tbl_term.c, tbl_literal(). "Please check them in and I'll look into them later!" kristaps@
Diffstat (limited to 'out.c')
-rw-r--r--out.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/out.c b/out.c
index ea0c5903..3ec817e7 100644
--- a/out.c
+++ b/out.c
@@ -178,25 +178,6 @@ tblcalc(struct rofftbl *tbl, const struct tbl_span *sp)
tblcalc_data(tbl, col, sp->tbl, dp);
}
}
-
- /*
- * Calculate width of the spanners. These get one space for a
- * vertical line, two for a double-vertical line.
- */
-
- for ( ; hp; hp = hp->next) {
- col = &tbl->cols[hp->ident];
- switch (hp->pos) {
- case (TBL_HEAD_VERT):
- col->width = (*tbl->len)(1, tbl->arg);
- break;
- case (TBL_HEAD_DVERT):
- col->width = (*tbl->len)(2, tbl->arg);
- break;
- default:
- break;
- }
- }
}
static void