aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tbl_data.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
commitee72941131e356c2314d4c3009737bbc0f101fc0 (patch)
treee261cf307917d75e5446cdefff6a6ecccd31d227 /tbl_data.c
parent5924b5736a3bec0c2ef93ddbd1da733745942d59 (diff)
downloadmandoc-ee72941131e356c2314d4c3009737bbc0f101fc0.tar.gz
mandoc-ee72941131e356c2314d4c3009737bbc0f101fc0.tar.zst
mandoc-ee72941131e356c2314d4c3009737bbc0f101fc0.zip
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 'tbl_data.c')
-rw-r--r--tbl_data.c8
1 files changed, 3 insertions, 5 deletions
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 <kristaps@bsd.lv>
* Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -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;
/*