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.
#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
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--;
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));
}
}