From 9f6b90bb9c2523a0a25adfef52610f73b0cfb30b Mon Sep 17 00:00:00 2001 From: erg Date: Fri, 3 Oct 2008 19:51:26 +0000 Subject: [PATCH] Fix bug in use of cgraph record bindings. --- cmd/tools/ccomps.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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); -- 2.40.0