]> git.cameronkatri.com Git - mandoc.git/blobdiff - tree.c
First, make extra data cells be thrown away. This makes "dp->layout"
[mandoc.git] / tree.c
diff --git a/tree.c b/tree.c
index 52e120f932747edb91c3a6874bd63b79cc43fb46..427a9d4185943468d59c2e38013e7eb39e93c680 100644 (file)
--- a/tree.c
+++ b/tree.c
@@ -1,4 +1,4 @@
-/*     $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>
  *
@@ -249,21 +249,8 @@ static void
 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');
 
@@ -295,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(' ');
        }