]> granicus.if.org Git - graphviz/commitdiff
Removing all existing usage of USE_CGRAPH
authorellson <devnull@localhost>
Thu, 7 Aug 2008 17:17:46 +0000 (17:17 +0000)
committerellson <devnull@localhost>
Thu, 7 Aug 2008 17:17:46 +0000 (17:17 +0000)
    cgraph is now in full production in all these files

configure.ac still contains the --with-cgraph option in case Arif wants to use it.

cmd/tools/dijkstra.c

index fc4e1b7405cb044331864fb912ce4acc1a3f4219..65fd0ff0fd17b307fe1afbf9791d5b8d15f91fb7 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <math.h>
-#ifdef USE_CGRAPH
-#include <cgraph.h>
-#else
-#include <agraph.h>
-#endif
-#include <ingraphs.h>
+#include "cgraph.h"
+#include "ingraphs.h"
 #ifdef HAVE_GETOPT_H
 #include <getopt.h>
 #else
@@ -169,11 +165,7 @@ static void post(Agraph_t * g)
     if (setall)
        sprintf(dflt, "%.3lf", HUGE);
 
-#ifdef USE_CGRAPH
     for (v = agfstnode(g); v; v = agnxtnode(g, v)) {
-#else
-    for (v = agfstnode(g); v; v = agnxtnode(v)) {
-#endif
        dist = getdist(v);
        if (dist) {
            dist--;
@@ -217,11 +209,7 @@ void dijkstra(Dict_t * Q, Agraph_t * G, Agnode_t * n)
     setdist(n, 1);
     dtinsert(Q, n);
     while ((u = extract_min(Q))) {
-#ifdef USE_CGRAPH
        for (e = agfstedge(G, u); e; e = agnxtedge(G, e, u)) {
-#else
-       for (e = agfstedge(u); e; e = agnxtedge(e, u)) {
-#endif
            update(Q, e->node, u, getlength(e));
        }
     }