From dede963eacb17dcdbe0624bf76ab3f4045147541 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Mon, 10 Jan 2011 14:40:30 +0000 Subject: 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. --- tree.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tree.c') diff --git a/tree.c b/tree.c index 80293948..fb565d23 100644 --- a/tree.c +++ b/tree.c @@ -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(' '); } -- cgit