From: erg Date: Fri, 3 Oct 2008 19:51:26 +0000 (+0000) Subject: Fix bug in use of cgraph record bindings. X-Git-Tag: LAST_LIBGRAPH~32^2~3238 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9f6b90bb9c2523a0a25adfef52610f73b0cfb30b;p=graphviz Fix bug in use of cgraph record bindings. --- diff --git a/cmd/tools/ccomps.c b/cmd/tools/ccomps.c index a81c1af71..39f80b7d3 100644 --- a/cmd/tools/ccomps.c +++ b/cmd/tools/ccomps.c @@ -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);