]> granicus.if.org Git - graphviz/commitdiff
Fix error message from gvpack when edges have no pos due to concentrate=true
authorEmden Gansner <erg@research.att.com>
Tue, 6 Sep 2011 17:44:25 +0000 (13:44 -0400)
committerEmden Gansner <erg@research.att.com>
Tue, 6 Sep 2011 17:44:25 +0000 (13:44 -0400)
cmd/tools/gvpack.c

index 621233b1858d28909014bab90049810fa96ed402..9d86bc377fa9180f995ca27535a664c4f68664d3 100644 (file)
@@ -305,6 +305,8 @@ static void init_node_edge(Agraph_t * g)
 static void init_graph(Agraph_t * g, boolean fill, GVC_t* gvc)
 {
     int d;
+    node_t *n;
+    edge_t *e;
 
 #ifdef WITH_CGRAPH
     aginit (g, AGRAPH, "Agraphinfo_t", sizeof(Agraphinfo_t), TRUE);
@@ -332,6 +334,13 @@ static void init_graph(Agraph_t * g, boolean fill, GVC_t* gvc)
                    agnameof(g));
            exit(1);
        }
+       if (Concentrate) { /* check for edges without pos info */
+           for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
+               for (e = agfstout(g, n); e; e = agnxtout(g, e)) {
+                   if (ED_spl(e) == NULL) ED_edge_type(e) = IGNORED;
+               }
+           }
+       }
     }
 }
 
@@ -382,6 +391,7 @@ static void cloneEdge(Agedge_t * old, Agedge_t * new)
 {
     cloneAttrs(old, new);
     ED_spl(new) = ED_spl(old);
+    ED_edge_type(new) = ED_edge_type(old);
     ED_label(new) = ED_label(old);
     ED_head_label(new) = ED_head_label(old);
     ED_tail_label(new) = ED_tail_label(old);