From ee72941131e356c2314d4c3009737bbc0f101fc0 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@ --- tbl_data.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'tbl_data.c') diff --git a/tbl_data.c b/tbl_data.c index 129695d8..3b409648 100644 --- a/tbl_data.c +++ b/tbl_data.c @@ -1,4 +1,4 @@ -/* $Id: tbl_data.c,v 1.24 2011/03/20 16:02:05 kristaps Exp $ */ +/* $Id: tbl_data.c,v 1.25 2012/05/27 17:54:54 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2011 Ingo Schwarze @@ -49,13 +49,11 @@ data(struct tbl_node *tbl, struct tbl_span *dp, cp = dp->layout->first; /* - * Skip over spanners and vertical lines to data formats, since + * Skip over spanners, since * we want to match data with data layout cells in the header. */ - while (cp && (TBL_CELL_VERT == cp->pos || - TBL_CELL_DVERT == cp->pos || - TBL_CELL_SPAN == cp->pos)) + while (cp && TBL_CELL_SPAN == cp->pos) cp = cp->next; /* -- cgit v1.2.3-56-ge451