summaryrefslogtreecommitdiffstats
path: root/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'tree.c')
-rw-r--r--tree.c56
1 files changed, 31 insertions, 25 deletions
diff --git a/tree.c b/tree.c
index c0949dde..09b53ab3 100644
--- a/tree.c
+++ b/tree.c
@@ -379,35 +379,41 @@ print_span(const struct tbl_span *sp, int indent)
switch (sp->pos) {
case TBL_SPAN_HORIZ:
putchar('-');
- return;
+ putchar(' ');
+ break;
case TBL_SPAN_DHORIZ:
putchar('=');
- return;
- default:
+ putchar(' ');
break;
- }
-
- for (dp = sp->first; dp; dp = dp->next) {
- switch (dp->pos) {
- case TBL_DATA_HORIZ:
- case TBL_DATA_NHORIZ:
- putchar('-');
- continue;
- case TBL_DATA_DHORIZ:
- case TBL_DATA_NDHORIZ:
- putchar('=');
- continue;
- default:
- break;
+ default:
+ for (dp = sp->first; dp; dp = dp->next) {
+ switch (dp->pos) {
+ case TBL_DATA_HORIZ:
+ case TBL_DATA_NHORIZ:
+ putchar('-');
+ putchar(' ');
+ continue;
+ case TBL_DATA_DHORIZ:
+ case TBL_DATA_NDHORIZ:
+ putchar('=');
+ putchar(' ');
+ continue;
+ default:
+ break;
+ }
+ printf("[\"%s\"", dp->string ? dp->string : "");
+ if (dp->hspans)
+ printf(">%d", dp->hspans);
+ if (dp->vspans)
+ printf("v%d", dp->vspans);
+ if (dp->layout == NULL)
+ putchar('*');
+ else if (dp->layout->pos == TBL_CELL_DOWN)
+ putchar('^');
+ putchar(']');
+ putchar(' ');
}
- printf("[\"%s\"", dp->string ? dp->string : "");
- if (dp->spans)
- printf("(%d)", dp->spans);
- if (NULL == dp->layout)
- putchar('*');
- putchar(']');
- putchar(' ');
+ break;
}
-
printf("(tbl) %d:1\n", sp->line);
}