diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-10 14:40:30 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-10 14:40:30 +0000 |
commit | b3ea03504ba905470ba5c486ba69062c89034488 (patch) | |
tree | df4cbcc9f5102817e214499b8ce04b165972afbf /tree.c | |
parent | 8b2891b502ff415c363420b6f4238ec3561efd97 (diff) | |
download | mandoc-b3ea03504ba905470ba5c486ba69062c89034488.tar.gz mandoc-b3ea03504ba905470ba5c486ba69062c89034488.tar.zst mandoc-b3ea03504ba905470ba5c486ba69062c89034488.zip |
First, make extra data cells be thrown away. This makes "dp->layout"
always hold, which cleans up the table stuff a bit.
Second, set a "spans" value per data cell consisting of the number of
skipped TBL_CELL_SPAN layout cells.
Third, make tbl_term.c understand how to skip over spanned sections when
iterating over the header queue.
What remains is to calculate the widths of spanned cells.
Diffstat (limited to 'tree.c')
-rw-r--r-- | tree.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: tree.c,v 1.31 2011/01/03 13:59:21 kristaps Exp $ */ +/* $Id: tree.c,v 1.32 2011/01/10 14:40:30 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -282,7 +282,12 @@ print_span(const struct tbl_span *sp, int indent) default: break; } - printf("[%s%s]", dp->string, dp->layout ? "" : "*"); + printf("[\"%s\"", dp->string ? dp->string : ""); + if (dp->spans) + printf("(%d)", dp->spans); + if (NULL == dp->layout) + putchar('*'); + putchar(']'); if (dp->next) putchar(' '); } |