-/* $Id: tree.c,v 1.30 2011/01/02 20:34:05 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>
*
print_span(const struct tbl_span *sp, int indent)
{
const struct tbl_dat *dp;
- const struct tbl_head *hp;
int i;
- if (TBL_SPAN_FIRST & sp->flags) {
- for (i = 0; i < indent; i++)
- putchar('\t');
- printf("tbl-head: ");
- for (hp = sp->head; hp; hp = hp->next) {
- printf("[%d]", hp->width);
- if (hp->next)
- putchar(' ');
- }
- putchar('\n');
- }
-
for (i = 0; i < indent; i++)
putchar('\t');
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(' ');
}