]> granicus.if.org Git - graphviz/commitdiff
Fix bug in use of cgraph record bindings.
authorerg <devnull@localhost>
Fri, 3 Oct 2008 19:51:26 +0000 (19:51 +0000)
committererg <devnull@localhost>
Fri, 3 Oct 2008 19:51:26 +0000 (19:51 +0000)
cmd/tools/ccomps.c

index a81c1af712cfdedbc18a97ad5d8bc7ccc2ffbcfc..39f80b7d35b0645dc4343185af79bd1c97d9c6c6 100644 (file)
@@ -511,6 +511,17 @@ static int processClusters(Agraph_t * g)
     return (c_cnt ? 1 : 0);
 }
 
+static void
+bindGraphinfo (Agraph_t * g)
+{
+    Agraph_t *subg;
+
+    aginit(g, AGRAPH, "graphinfo", sizeof(Agraphinfo_t), TRUE);
+    for (subg = agfstsubg(g); subg; subg = agnxtsubg(subg)) {
+       bindGraphinfo (subg);
+    }
+}
+
 /* process:
  * Return 0 if graph is connected.
  */
@@ -522,7 +533,7 @@ static int process(Agraph_t * g)
     Agnode_t *n;
 
     aginit(g, AGNODE, "nodeinfo", sizeof(Agnodeinfo_t), TRUE);
-    aginit(g, AGRAPH, "graphinfo", sizeof(Agraphinfo_t), TRUE);
+    bindGraphinfo (g);
 
     if (useClusters)
        return processClusters(g);