* AT&T Research, Florham Park NJ *
**********************************************************/
-#define WITH_CGRAPH 1
#ifdef WITH_CGRAPH
#include <cgraph.h>
#else
#include <agraph.h>
#endif
-#undef WITH_CGRAPH
#include <agutil.h>
#include <stdlib.h>
**********************************************************/
-#define WITH_CGRAPH 1
#ifdef WITH_CGRAPH
#include <cgraph.h>
#else
#include <agraph.h>
#endif
-#undef WITH_CGRAPH
#include <agutil.h>
#include "config.h"
#endif
-#include <agraph.h>
+#include <cgraph.h>
#include <ctype.h>
#include "geomprocs.h" /* must follow geom.h (in types.h) */
#include "agxbuf.h"
#ifdef WITH_CGRAPH
-#include <cgraph.h>
+#include "cgraph.h"
#else
-#include <graph.h>
+#include "graph.h"
#endif
#include "utils.h" /* must follow types.h and agxbuf.h */
#include "gvplugin.h" /* must follow gvcext.h (in types.h) */
#ifdef WITH_CGRAPH
-#include <cgraph.h>
#define GD_drawing(g) (((Agraphinfo_t*)AGDATA(g))->drawing)
#define GD_bb(g) (((Agraphinfo_t*)AGDATA(g))->bb)
#define GD_gvc(g) (((Agraphinfo_t*)AGDATA(g))->gvc)
#else
-#include <graph.h>
#define GD_bb(g) (g)->u.bb
#define GD_cleanup(g) (g)->u.cleanup
#define GD_dist(g) (g)->u.dist
#include "types.h"
/*This code block should be replaced with only one onclude to cgraph*/
#ifdef WITH_CGRAPH
-#include <cgraph.h>
+#include "cgraph.h"
#else
-#include <graph.h>
+#include "graph.h"
#endif
/********************/
#define GVC_H
#include "types.h"
-#define WITH_CGRAPH 1
#ifdef WITH_CGRAPH
-#include <cgraph.h>
+#include "cgraph.h"
#else
-#include <graph.h>
+#include "graph.h"
#endif
-#undef WITH_CGRAPH
#ifdef __cplusplus
extern "C" {
#include "types.h"
/*This code block should be replaced with only one onclude to cgraph*/
#ifdef WITH_CGRAPH
-#include <cgraph.h>
+#include "cgraph.h"
#else
-#include <graph.h>
+#include "graph.h"
#endif
/********************/
#include "types.h"
/*This code block should be replaced with only one onclude to cgraph*/
#ifdef WITH_CGRAPH
-#include <cgraph.h>
+#include "cgraph.h"
#else
-#include <graph.h>
+#include "graph.h"
#endif
/********************/
#include "gvplugin.h"
#include "gvplugin_layout.h"
#ifdef WITH_CGRAPH
-#include <cgraph.h>
+#include "cgraph.h"
#else
-#include <graph.h>
+#include "graph.h"
#endif
#include "gvcint.h"
#include "gvcint.h"
#ifdef WITH_CGRAPH
-#include <cgraph.h>
+#include "cgraph.h"
#else
-#include <graph.h>
+#include "graph.h"
#endif
#include "gvcproc.h"
return -1;
GD_gvc(g) = gvc;
+#ifdef WITH_CGRAPH
if (g != agroot(g)) GD_gvc(agroot(g)) = gvc;
+#else
+ if (g != g->root) GD_gvc(g->root) = gvc;
+#endif
graph_init(g, gvc->layout.features->flags & LAYOUT_USES_RANKDIR);
+#ifdef WITH_CGRAPH
GD_drawing(agroot(g)) = GD_drawing(g);
+#else
+ GD_drawing(g->root) = GD_drawing(g);
+#endif
if (gvle && gvle->layout) {
gvle->layout(g);
if (gvle->cleanup)
if (GD_drawing(g)) {
graph_cleanup(g);
GD_drawing(g) = NULL;
+#ifdef WITH_CGRAPH
GD_drawing(agroot(g)) = NULL;
+#else
+ GD_drawing(g->root) = NULL;
+#endif
}
return 0;
}
#include "gvcproc.h"
/* for agerr() */
-#define WITH_CGRAPH 1
#ifdef WITH_CGRAPH
-#include <cgraph.h>
+#include "cgraph.h"
#else
-#include <graph.h>
+#include "graph.h"
#endif
-#undef WITH_CGRAPH
static int gvloadimage_select(GVJ_t * job, char *str)
{
#include "types.h"
#ifdef WITH_CGRAPH
-#include <cgraph.h>
+#include "cgraph.h"
#else
-#include <graph.h>
+#include "graph.h"
#endif
#include "gvplugin.h"
#include "colorprocs.h"
#include "gvplugin_render.h"
-#define WITH_CGRAPH 1
#ifdef WITH_CGRAPH
-#include <cgraph.h>
+#include "cgraph.h"
#else
-#include <graph.h>
+#include "graph.h"
#endif
-#undef WITH_CGRAPH
#include "gvcint.h"
#include "logic.h"
#include "memory.h"
-#define WITH_CGRAPH 1
#ifdef WITH_CGRAPH
-#include <cgraph.h>
+#include "cgraph.h"
#else
-#include <graph.h>
+#include "graph.h"
#endif
-#undef WITH_CGRAPH
#include "agxbuf.h"
#include "utils.h"
* Return 1 if successful; 0 otherwise (e.g., graph is disconnected).
*/
#include "neato.h"
+#ifdef WITH_CGRAPH
#include "cgraph.h"
+#endif
int solveCircuit(int nG, double **Gm, double **Gm_inv)
{