]> granicus.if.org Git - graphviz/commitdiff
Remove obsolete code within #ifdef OLD or OLD_OBSOLETE in lib/cgraph
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Mon, 31 Aug 2020 19:48:37 +0000 (21:48 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Fri, 4 Sep 2020 15:13:05 +0000 (17:13 +0200)
Was obsolete already in the initial version 13 years ago.

lib/cgraph/edge.c
lib/cgraph/rec.c

index c0c1af4b844c6104b558a085a25ce9507b555c07..a0c99d020ecd245a134a608d04f3acea36d4b7c6 100644 (file)
@@ -386,14 +386,8 @@ Agedge_t *agsubedge(Agraph_t * g, Agedge_t * e, int cflag)
     if (t && h) {
        rv = agfindedge_by_key(g, t, h, AGTAG(e));
        if (cflag && (rv == NILedge)) {
-#ifdef OLD_OBSOLETE
-           rv = agfindedge_by_id(g, t, h, AGID(e));
-           if (!rv)
-               rv = newedge(g, t, h, AGID(e));
-#else
        installedge(g, e);
        rv = e;
-#endif
        }
        if (rv && (AGTYPE(rv) != AGTYPE(e)))
            rv = AGOPP(rv);
index c2567f5c26f041d3bbc081f22e10eac862617864..7e51ecc6c432ecfefc6c768ea19e1bcb842ec163 100644 (file)
@@ -175,26 +175,6 @@ static void simple_delrec(Agraph_t * g, Agobj_t * obj, void *rec_name)
     agdelrec(obj, rec_name);
 }
 
-#ifdef OLD
-void agclean(Agraph_t * g, char *graphdata, char *nodedata, char *edgedata)
-{
-    Agnode_t *n;
-    Agedge_t *e;
-
-    if (nodedata || edgedata) {
-       for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
-           if (edgedata)
-               for (e = agfstout(n); e; e = agnxtout(g, e)) {
-                   agdelrec(e, edgedata);
-               }
-           if (nodedata)
-               agdelrec(n, nodedata);
-       }
-    }
-    agdelrec(g, graphdata);
-}
-#endif
-
 void aginit(Agraph_t * g, int kind, char *rec_name, int arg_rec_size, int mtf)
 {
     Agnode_t *n;