structure for all subgraphs, and fix cleanup to remove these from all subgraphs.
{
graph_t* subg;
- if ((g != agroot(g)) && is_cluster(g))
+ if ((g != agroot(g)))
agbindrec(g, "Agraphinfo_t", sizeof(Agraphinfo_t), TRUE);
for (subg = agfstsubg(g); subg; subg = agnxtsubg(subg)) {
dot_init_subg(subg);
static void
dot_cleanup_graph(graph_t * g)
{
- int i, c;
+ int i;
+#ifndef WITH_CGRAPH
graph_t *clust;
-
+ int c;
for (c = 1; c <= GD_n_cluster(g); c++) {
clust = GD_clust(g)[c];
GD_cluster_was_collapsed(clust) = FALSE;
dot_cleanup(clust);
}
+#else
+ graph_t *subg;
+ for (subg = agfstsubg(g); subg; subg = agnxtsubg(subg)) {
+ dot_cleanup_graph(subg);
+ }
+#endif
if (GD_clust(g)) free (GD_clust(g));
if (GD_rankleader(g)) free (GD_rankleader(g));