From aa6d8ba46cf4b68619e16a7ea8a8cc36f3f3bfc5 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 27 May 2012 17:54:54 +0000 Subject: 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@ --- out.c | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'out.c') 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 -- cgit