From: ellson Date: Tue, 14 Oct 2008 23:23:07 +0000 (+0000) Subject: fix breakage to the non-cgraph version X-Git-Tag: LAST_LIBGRAPH~32^2~3122 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a80661ff50a3efecd17a802b287d01a2b32d8e5a;p=graphviz fix breakage to the non-cgraph version --- diff --git a/lib/common/input.c b/lib/common/input.c index c56e99e97..7418ae9e6 100644 --- a/lib/common/input.c +++ b/lib/common/input.c @@ -18,12 +18,6 @@ #include "render.h" #include "htmltable.h" -#ifdef WITH_CGRAPH -#define SET_RANKDIR(g,rd) (GD_rankdir2(g) = rd) -#else -#define SET_RANKDIR(g,rd) ((g)->u.rankdir = (rd)) -#endif - static char *usageFmt = "Usage: %s [-Vv?] [-(GNE)name=val] [-(KTlso)] \n"; @@ -974,7 +968,7 @@ void do_graph_label(graph_t * sg) #ifdef WITH_CGRAPH if (sg == agroot(sg)) #else - if (sg == sg->root) { + if (sg == sg->root) #endif return; diff --git a/lib/common/macros.h b/lib/common/macros.h index 3cbd6aa5b..3ce634576 100644 --- a/lib/common/macros.h +++ b/lib/common/macros.h @@ -31,6 +31,12 @@ #define SET_CLUST_EDGE(g) (GD_flags(g) |= 1) #define EDGE_TYPE(g) (GD_flags(g) & (7 << 1)) +#ifdef WITH_CGRAPH +#define SET_RANKDIR(g,rd) (GD_rankdir2(g) = rd) +#else +#define SET_RANKDIR(g,rd) ((g)->u.rankdir = (rd)) +#endif + #ifndef streq #define streq(a,b) (*(a)==*(b)&&!strcmp(a,b)) #endif diff --git a/lib/common/types.h b/lib/common/types.h index 24ecae0a4..b3e3a0a2a 100644 --- a/lib/common/types.h +++ b/lib/common/types.h @@ -36,11 +36,6 @@ typedef unsigned char boolean; #include "gvcext.h" #include "pathgeom.h" #include "textpara.h" -#ifdef WITH_CGRAPH -#include "cgraph.h" -#else -#include "graph.h" -#endif #ifdef __cplusplus extern "C" { @@ -742,6 +737,12 @@ typedef enum {NATIVEFONTS,PSFONTS,SVGFONTS} fontname_kind; #define ED_tree_index(e) (e)->u.tree_index #define ED_weight(e) (e)->u.weight #define ED_xpenalty(e) (e)->u.xpenalty +#endif + +#ifdef WITH_CGRAPH +#include "cgraph.h" +#else +#include "graph.h" #endif typedef struct {