]> granicus.if.org Git - graphviz/commitdiff
cgraph fixes
authorellson <devnull@localhost>
Tue, 21 Oct 2008 23:09:51 +0000 (23:09 +0000)
committerellson <devnull@localhost>
Tue, 21 Oct 2008 23:09:51 +0000 (23:09 +0000)
lib/patchwork/patchworkinit.c
plugin/dot_layout/Makefile.am
plugin/neato_layout/Makefile.am

index 4a1d79733fb580a07358ad93a178eb3d56922bac..4179591828062c3d1a91fb8f0789dcad2162fe40 100644 (file)
@@ -78,9 +78,9 @@ mkClusters (graph_t * g, clist_t* pclist, graph_t* parent)
         clist = pclist;
     mg = g->meta_node->graph;
     for (me = agfstout(mg, g->meta_node); me; me = agnxtout(mg, me)) {
-        mn = me->head;
+        mn = aghead(me);
         subg = agusergraph(mn);
-        if (!strncmp(subg->name, "cluster", 7)) {
+        if (!strncmp(agnameof(subg), "cluster", 7)) {
 #ifdef FDP_GEN
             GD_alg(subg) = (void *) NEW(gdata); /* freed in cleanup_subgs */
             GD_ndim(subg) = GD_ndim(parent);
@@ -105,8 +105,8 @@ static void patchwork_init_node(node_t * n)
 {
     agset(n,"shape","box");
     /* common_init_node(n); */
-    /* gv_nodesize(n, GD_flip(n->graph)); */
-    /* ND_pos(n) = ALLOC(GD_ndim(n->graph), 0, double); */
+    /* gv_nodesize(n, GD_flip(agraphof(n))); */
+    /* ND_pos(n) = ALLOC(GD_ndim(agraphof(n)), 0, double); */
 }
 
 static void patchwork_init_edge(edge_t * e)
@@ -149,7 +149,12 @@ void patchwork_init_graph(graph_t * g)
 static void patchwork_cleanup_graph(graph_t * g)
 {
     free(GD_neato_nlist(g));
-    if (g != g->root) memset(&(g->u), 0, sizeof(Agraphinfo_t));
+    if (g != agroot(g))
+#ifndef WITH_CGRAPH
+        memset(&(g->u), 0, sizeof(Agraphinfo_t));
+#else /* WITH_CGRAPH */
+        agclean(g, AGRAPH , "Agraphinfo_t");
+#endif /* WITH_CGRAPH */
 }
 
 void patchwork_cleanup(graph_t * g)
index a32b1eb365cb1c3589f0e387d2a18d8a324cf1ce..a598085a2d79e906e4c43649d6cc6ef321fc4c9e 100644 (file)
@@ -3,15 +3,13 @@
 
 if WITH_CGRAPH
 GRAPH = cgraph
-COMMON = common_cgraph
 else
 GRAPH = graph
-COMMON = common
 endif
 
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
-       -I$(top_srcdir)/lib/$(COMMON) \
+       -I$(top_srcdir)/lib/common \
        -I$(top_srcdir)/lib/pathplan \
        -I$(top_srcdir)/lib/gvc \
        -I$(top_srcdir)/lib/$(GRAPH) \
index f93c2f99c3aaca540dee5a0c5aad1404f370eb61..ce292eb947723260c98663f9a79df4f0a8828f85 100644 (file)
@@ -3,15 +3,13 @@
 
 if WITH_CGRAPH
 GRAPH = cgraph
-COMMON = common_cgraph
 else
 GRAPH = graph
-COMMON = common
 endif
 
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
-       -I$(top_srcdir)/lib/$(COMMON) \
+       -I$(top_srcdir)/lib/common \
        -I$(top_srcdir)/lib/pathplan \
        -I$(top_srcdir)/lib/gvc \
        -I$(top_srcdir)/lib/$(GRAPH) \