]> granicus.if.org Git - graphviz/commitdiff
fix breakages when WITH_CGRAPH not defined
authorellson <devnull@localhost>
Fri, 1 Aug 2008 16:11:35 +0000 (16:11 +0000)
committerellson <devnull@localhost>
Fri, 1 Aug 2008 16:11:35 +0000 (16:11 +0000)
16 files changed:
lib/agutil/dynattr.c
lib/agutil/nodeq.c
lib/cgraph/cghdr.h
lib/common/render.h
lib/common/types.h
lib/gvc/gvc.c
lib/gvc/gvc.h
lib/gvc/gvconfig.c
lib/gvc/gvcontext.c
lib/gvc/gvevent.c
lib/gvc/gvlayout.c
lib/gvc/gvloadimage.c
lib/gvc/gvplugin.c
lib/gvc/gvrender.c
lib/gvc/gvusershape.c
lib/neatogen/circuit.c

index 4a5c1aebe28c250ecb6fc63e1ea30e4eda54742e..759f3e260a36a31f0241c51b89fe38bb101bd011 100644 (file)
 *              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>
index f7a7e00bc3be42727776779a21f3966301cfe523..1959f2ac3db99f2b50f4bbb38e17776dabbf3cd4 100644 (file)
 **********************************************************/
 
 
-#define WITH_CGRAPH 1
 #ifdef WITH_CGRAPH
 #include <cgraph.h>
 #else
 #include <agraph.h>
 #endif
-#undef WITH_CGRAPH
 
 #include <agutil.h>
 
index cd8b75512febd6171650c43d9b0ae375522e83b9..c0394423c41c1280ac4dba83d7c7f500f3dd9bb3 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #endif
 
-#include <agraph.h>
+#include <cgraph.h>
 
 #include               <ctype.h>
 
index 97a4c35f05c08ca5bd93ffa34af3503271412d9e..e719adbdc1261d60fff7b40041e261c0332e832b 100644 (file)
@@ -50,9 +50,9 @@ extern "C" {
 #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) */
index 0e158ade6755e7cb0921864d41fb3f42e494a56e..a8d0df1e1f6c469084904e736b2764506807f23f 100644 (file)
@@ -388,7 +388,6 @@ typedef enum {NATIVEFONTS,PSFONTS,SVGFONTS} fontname_kind;
 
 #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)
@@ -401,7 +400,6 @@ typedef enum {NATIVEFONTS,PSFONTS,SVGFONTS} fontname_kind;
 
 #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
index 9b6a491eb9ec9be9fe25c9de265939d2ab243131..e1d20322f2ac149117dc19508d7ddd45f9448990 100644 (file)
@@ -21,9 +21,9 @@
 #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
 /********************/
 
index e0b77a44a327935174297dc0b7ff62e0abe31716..30a69ddd94c038c951ee2b64ca349cb52235d576 100644 (file)
 #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" {
index 6b019f89d2c2dcd327b5cd90918067d50d76c636..3162c74f8b18841e6956f0e8c34492f164d6a811 100644 (file)
@@ -54,9 +54,9 @@ static int glob (char*, int, int (*errfunc)(const char *, int), glob_t*);
 #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
 /********************/
 
index 9391c05fdae99b9f0eaf06bb194ed2c800ff1f2f..8511842d813a4bd9390745a86c3f4708984e731b 100644 (file)
@@ -29,9 +29,9 @@
 #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"
index b3f101da6c56a783a0f9b05166be5b7fd135db62..7c3613a805adfd983cc5ffdda6710f356240edf3 100644 (file)
@@ -23,9 +23,9 @@
 #include "gvplugin_layout.h"
 
 #ifdef WITH_CGRAPH
-#include <cgraph.h>
+#include "cgraph.h"
 #else
-#include <graph.h>
+#include "graph.h"
 #endif
 
 #include "gvcint.h"
index 276a234fef06c78bcb873d11f2207da8dad247e6..da87c7d08e9f2bd4d0bc4cbb810e5ec3d5b6fee6 100644 (file)
@@ -28,9 +28,9 @@
 #include "gvcint.h"
 
 #ifdef WITH_CGRAPH
-#include <cgraph.h>
+#include "cgraph.h"
 #else
-#include <graph.h>
+#include "graph.h"
 #endif
 
 #include "gvcproc.h"
@@ -68,9 +68,17 @@ int gvLayoutJobs(GVC_t * gvc, graph_t * g)
        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)
@@ -96,7 +104,11 @@ int gvFreeLayout(GVC_t * gvc, graph_t * g)
     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;
 }
index b476168f5573769e271830167abc74d7c2f07307..ba0eee8f3bc512e132787592337d522636ea649c 100644 (file)
 #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)
 {
index c8a55368247c2587714c96d6d4fcdf40c61913f6..fcee829964b5e799afe200718994aa70bfc737f7 100644 (file)
@@ -27,9 +27,9 @@
 #include        "types.h"
 
 #ifdef WITH_CGRAPH
-#include <cgraph.h>
+#include "cgraph.h"
 #else
-#include <graph.h>
+#include "graph.h"
 #endif
 
 #include        "gvplugin.h"
index 222e25d16b790dbb41e915743a32644c67650cf9..8410e7867b1d6751160a29314b3f504481672f15 100644 (file)
 #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"
index 2027f37de00c64d24496ac50cc7d5c9d6916045e..aa49f9e9b70e5f750321741adf2b92b7379227bd 100644 (file)
 #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"
index 3f2cde48203ce6e3899a5bb35154bb0ab177304d..0c36ac4b05327f15a1bfe0a7c1bb8db4914fa327 100644 (file)
@@ -21,7 +21,9 @@
  * 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)
 {