summaryrefslogtreecommitdiffstats
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
commitaa6d8ba46cf4b68619e16a7ea8a8cc36f3f3bfc5 (patch)
tree5cdde1b58ea03076e8fb7d09e8baca289fe978ac /tbl_data.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 'tbl_data.c')
-rw-r--r--tbl_data.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tbl_data.c b/tbl_data.c
index 00ab56a3..79e1baca 100644
--- a/tbl_data.c
+++ b/tbl_data.c
@@ -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;
/*