]> granicus.if.org Git - graphviz/commitdiff
remove commented out cleanup1 function
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 4 Oct 2020 19:20:22 +0000 (12:20 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 10 Oct 2020 22:21:09 +0000 (15:21 -0700)
lib/dotgen/rank.c

index f51677c171522ea27ed51c33c0b2d3553c6aa3d7..7bb15667c798cfe4bda3a6da4972c7c42ad41154 100644 (file)
@@ -82,53 +82,6 @@ cleanup1(graph_t * g)
     GD_comp(g).size = 0;
 }
 
-/*static void
-cleanup1(graph_t * g)
-{
-    node_t *n;
-    edge_t *e, *f;
-    int c;
-
-    for (c = 0; c < GD_comp(g).size; c++) {
-        GD_nlist(g) = GD_comp(g).list[c];
-        for (n = GD_nlist(g); n; n = ND_next(n)) {
-            renewlist(&ND_in(n));
-            renewlist(&ND_out(n));
-            ND_mark(n) = FALSE;
-        }
-    }
-    for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
-        for (e = agfstout(g, n); e; e = agnxtout(g, e)) {
-            f = ED_to_virt(e);
-            * Null out any other references to f to make sure we don't
-             * handle it a second time. For example, parallel multiedges
-             * share a virtual edge.
-             *
-            if (f && (e == ED_to_orig(f))) {
-                edge_t *e1, *f1;
-                node_t *n1;
-                for (n1 = agfstnode(g); n1; n1 = agnxtnode(g, n1)) {
-                    for (e1 = agfstout(g, n1); e1; e1 = agnxtout(g, e1)) {
-                        if (e != e1) {
-                            f1 = ED_to_virt(e1);
-                            if (f1 && (f == f1)) {
-                                ED_to_virt(e1) = NULL;
-                            }
-                        }
-                    }
-                }
-                free(f->base.data);
-                free(f);
-            }
-            ED_to_virt(e) = NULL;
-        }
-    }
-    free(GD_comp(g).list);
-    GD_comp(g).list = NULL;
-    GD_comp(g).size = 0;
-}
-*/
-
 /* When there are edge labels, extra ranks are reserved here for the virtual
  * nodes of the labels.  This is done by doubling the input edge lengths.
  * The input rank separation is adjusted to compensate.