]> granicus.if.org Git - graphviz/commitdiff
cleanup DISABLE_CODEGENS, DISABLE_GVRENDER
authorellson <devnull@localhost>
Thu, 23 Dec 2004 16:27:27 +0000 (16:27 +0000)
committerellson <devnull@localhost>
Thu, 23 Dec 2004 16:27:27 +0000 (16:27 +0000)
- default in graphviz2 is currently to enable both
- no #defines needed now in client apps
remove .swp file that doesn't belong in CVS

17 files changed:
cmd/dot/.Makefile.am.swp [deleted file]
cmd/dot/Makefile.am
cmd/dot/dotneato.h
configure.ac
lib/common/Makefile.am
lib/common/emit.c
lib/common/fontmetrics.c
lib/common/gdgen.c
lib/common/globals.h
lib/common/input.c
lib/common/labels.c
lib/common/output.c
lib/common/renderprocs.h
lib/common/shapes.c
lib/common/types.h
lib/gvc/gvrender.c
lib/gvc/gvrenderint.h

diff --git a/cmd/dot/.Makefile.am.swp b/cmd/dot/.Makefile.am.swp
deleted file mode 100644 (file)
index ce26976..0000000
Binary files a/cmd/dot/.Makefile.am.swp and /dev/null differ
index 7779f29a780f6d51561f6581fe371bb4380cd331..836ca7e13ea978a7d57ddc608095544d3d1d7b1a 100644 (file)
@@ -36,7 +36,11 @@ libdotneato_la_LIBADD = \
 
 dot_SOURCES = dot.c args.c plugins.c
 
-if ENABLE_GVRENDER
+if DISABLE_GVRENDER
+dot_LDADD = \
+        $(top_builddir)/lib/common/libcommon.la \
+        $(top_builddir)/lib/gvc/libgvc.la
+else
 dot_LDADD = \
        $(top_builddir)/lib/common/libcommon.la \
         $(top_builddir)/lib/gvc/libgvc.la \
@@ -44,10 +48,6 @@ dot_LDADD = \
         $(top_builddir)/plugin/gd/libgvplugin_gd.la \
         $(top_builddir)/plugin/text/libgvplugin_text.la \
         $(top_builddir)/plugin/layout/libgvplugin_layout.la @CAIRO_LIBS@
-else
-dot_LDADD = \
-        $(top_builddir)/lib/common/libcommon.la \
-        $(top_builddir)/lib/gvc/libgvc.la
 endif
 
 install-data-hook:
index 8783d0f2c44e843d8ab051bf3859cdb0ff9613e6..161d22704386db0cbd354ae3d1e76c85fd176548 100644 (file)
 #include <fdp.h>
 #include <circo.h>
 
-/* FIXME - these shouldn't be needed */
-#ifndef ENABLE_CODEGENS
-#define ENABLE_CODEGENS 1
-#endif
-#ifndef GD_RENDER
-#define GD_RENDER 1
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif
index 771e5eb96c9fa6f43c02dbb0824dbda04e544d27..3b5587bf584e05224b460879352e9872503ad9ad 100644 (file)
@@ -168,43 +168,24 @@ AC_TYPE_SIZE_T
 AC_TYPE_UID_T
 
 dnl -----------------------------------
-dnl dynagraph requires C++ support beyond RedHat 7.2
+dnl old codegens
 
-AC_ARG_ENABLE(dynagraph,
-  [AC_HELP_STRING([--enable-dynagraph],
-                  [build dynagraph code])])
-AM_CONDITIONAL(ENABLE_DYNAGRAPH, [test "x$enable_dynagraph" = "xyes"])
+AC_ARG_ENABLE(codegens,
+  [AC_HELP_STRING([--disable-codegens], [don't build old codegens])])
+if test "x$enable_codegens" = "xno"; then
+  AC_DEFINE(DISABLE_CODEGENS,1,[Define if you don't want the old codegens])
+fi
+AM_CONDITIONAL(DISABLE_CODEGENS, [test "x$enable_codegens" = "xno"])
 
 dnl -----------------------------------
 dnl gvrender plugins
 
 AC_ARG_ENABLE(gvrender,
-  [AC_HELP_STRING([--enable-gvrender],
-                  [build gvrender plugins (EXPERIMENTAL)])])
-if test "x$enable_gvrender" = "xyes"; then
-  AC_DEFINE(ENABLE_GVRENDER,1,[Set to 1 if you want the new gvrender codegens])
-else
-  AC_DEFINE(ENABLE_GVRENDER,0,[Set to 1 if you want the new gvrender codegens])
-fi
-AM_CONDITIONAL(ENABLE_GVRENDER, [test "x$enable_gvrender" = "xyes"])
-
-dnl -----------------------------------
-dnl gd_render   -  currently unconditionally true 
-
-AC_DEFINE(GD_RENDER,1,[Define if you  want the gd renderers (png, gif, etc )])
-
-dnl -----------------------------------
-dnl old codegens
-
-AC_ARG_ENABLE(codegens,
-  [AC_HELP_STRING([--disable-codegens],
-                  [don't build old codegens])])
-if test "x$enable_codegens" = "xno"; then
-  AC_DEFINE(ENABLE_CODEGENS,0,[Set to 0 if you don't want the old codegens])
-else
-  AC_DEFINE(ENABLE_CODEGENS,1,[Set to 0 if you don't want the old codegens])
+  [AC_HELP_STRING([--disable-gvrender], [don't build gvrender plugins])])
+if test "x$enable_gvrender" = "xno"; then
+  AC_DEFINE(DISABLE_GVRENDER,1,[Define if you don't want the new gvrender codegens])
 fi
-AM_CONDITIONAL(ENABLE_CODEGENS, [test "x$enable_codegens" != "xno"])
+AM_CONDITIONAL(DISABLE_GVRENDER, [test "x$enable_gvrender" = "xno"])
 
 dnl -----------------------------------
 dnl ElectricFence support for debugging
@@ -987,7 +968,7 @@ fi
 dnl -----------------------------------
 dnl INCLUDES and LIBS for cairo
 
-if [ test "x$enable_gvrender" = "xyes" ]; then
+if [ test "x$enable_gvrender" != "xno" ]; then
        PKG_CHECK_MODULES(CAIRO, cairo >= 0.1.3,
                [AC_DEFINE_UNQUOTED(HAVE_CAIRO,1,
                        [Define if you have the cairo library [EXPERIMENTAL]])],
index ac577a0f7105233660496ee3377e7dd8e0142198..8aeba644db20b560a511c10fdd00df2ecc719ceb 100644 (file)
@@ -15,7 +15,7 @@ pkginclude_HEADERS = const.h globals.h htmllex.h htmltable.h macros.h \
 pkglib_LTLIBRARIES = libcommon.la
 pkgconfig_DATA = libcommon.pc
 
-if ENABLE_CODEGENS
+if !DISABLE_CODEGENS
 CODEGENS = diagen.c figgen.c gdgen.c hpglgen.c mapgen.c mifgen.c mpgen.c \
        picgen.c psgen.c svggen.c vrmlgen.c vtxgen.c ps.txt color_names
 endif
index b50903e7889139a0a0747eb130668216164e2fa9..60aeb43568ec9d06b9d5ba706b4d2c16a00ef99a 100644 (file)
@@ -48,7 +48,7 @@ static char *Deffontname;
 static char *Layerdelims;
 static attrsym_t *G_peripheries;
 
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
 static char *lang_name(int langID);
 #endif
 
@@ -296,7 +296,7 @@ void setup_graph(GVC_t * gvc, graph_t * g)
        if (gvrender_features(gvc) & GVRENDER_DOES_LAYERS) {
            Nlayers = parse_layers(g, p);
        }
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
        else {
            agerr(AGWARN, "layers not supported in %s output\n",
                  lang_name(Output_lang));
@@ -1294,7 +1294,7 @@ char **parse_style(char *s)
     return parse;
 }
 
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
 static codegen_info_t cg[MAX_CODEGENS] = {
     {&PS_CodeGen, "ps", POSTSCRIPT},
     {&PS_CodeGen, "ps2", PDF},
@@ -1416,7 +1416,7 @@ codegen_info_t *next_codegen(codegen_info_t * p)
 
 void config_codegen_builtins(GVC_t * gvc)
 {
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     codegen_info_t *p;
 
     for (p = cg; p->name; ++p)
@@ -1439,7 +1439,7 @@ int lang_select(GVC_t * gvc, char *str, int warn)
 
 char *lang_name(int langID)
 {
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     codegen_info_t *p;
     for (p = first_codegen(); p->name; p = next_codegen(p)) {
        if (p->id == langID)
index e8d7f4cbf78d9f9112c3f7ed549aca145d84eba0..ffcc391f1b9da402c8b2bf9fd50c9895b1b085f6 100644 (file)
@@ -124,7 +124,7 @@ static double courFontWidth[] = {
     0.5999, 0.5999, 0.5999, 0.5999, 0.5999, 0.5999, 0.5999, 0.5999,    /* øùúû     */
 };
 
-#if ENABLE_CODEGENS && !defined(HAVE_GD_FREETYPE)
+#if !defined(DISABLE_CODEGENS) && !defined(HAVE_GD_FREETYPE)
 extern codegen_t *Output_codegen;
 
 double _dpi;
@@ -160,7 +160,7 @@ estimate_textsize(textline_t * textline, char *fontname, double fontsz,
 
     textline->width = 0.0;
     textline->xshow = NULL;
-#if ENABLE_CODEGENS && !defined(HAVE_GD_FREETYPE)
+#if !defined(DISABLE_CODEGENS) && !defined(HAVE_GD_FREETYPE)
     if (Output_codegen == &GD_CodeGen) {
        int cwidth;
        double fsize = (fontsz * _dpi) / POINTS_PER_INCH;       /* in pixels */
index 504c3847d355425083de15b27a6d6cf9f62beb26..77db409f27fbdb495615e5b04640060c67f0988b 100644 (file)
@@ -528,8 +528,7 @@ void gd_missingfont(char *err, char *fontreq)
 extern gdFontPtr gdFontTiny, gdFontSmall, gdFontMediumBold, gdFontLarge,
     gdFontGiant;
 
-#if ENABLE_CODEGENS && !defined(HAVE_GD_FREETYPE)
-
+#if !defined(DISABLE_CODEGENS) && !defined(HAVE_GD_FREETYPE)
 /* builtinFont:
  * Map fontsz in pixels to builtin font.
  */
index 981c8fc3eff44b263bda722f73b6ce6f78dddd59..3d1c9e05aab2344be3c5c959359e87cbe249bd12 100644 (file)
@@ -59,7 +59,7 @@ extern "C" {
     external char *Gvfilepath; /* Path of files allowed in 'shapefile' attrib  (also ps libs) */
     external int y_invert;     /* invert y in dot & plain output */
 
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     external int Output_lang;  /* POSTSCRIPT, DOT, etc. */
     external FILE *Output_file;
     external int Obj;
index 2ed9fe743ee45ce35847676fcfa72e787de67e65..794e470cab15f550d9fc903926655b8a87fad19d 100644 (file)
@@ -18,7 +18,7 @@
 #include       "htmltable.h"
 #include       <ctype.h>
 
-#if ENABLE_CODEGENS && !defined(HAVE_GD_FREETYPE)
+#if !defined(DISABLE_CODEGENS) && !defined(HAVE_GD_FREETYPE)
 codegen_t *Output_codegen;
 #endif
 
@@ -271,7 +271,7 @@ void dotneato_initialize(GVC_t * gvc, int argc, char **argv)
     gvplugin_builtins(gvc);
     gvconfig(gvc, CONFIG);
 
-#if ENABLE_CODEGENS && !defined(HAVE_GD_FREETYPE)
+#if !defined(DISABLE_CODEGENS) && !defined(HAVE_GD_FREETYPE)
     Output_codegen = gvc->codegen;
 #endif
 
@@ -372,7 +372,7 @@ graph_t *next_input_graph(void)
 
 void graph_init(graph_t * g)
 {
-#if ENABLE_CODEGENS && !defined(HAVE_GD_FREETYPE)
+#if !defined(DISABLE_CODEGENS) && !defined(HAVE_GD_FREETYPE)
     initDPI(g);
 #endif
     /* initialize the graph */
index e7a91f95ac3138e42c714cad20af6f9ed4ba981c..1b565f5d4ecb32f7389bf85ca263850cc7dff64b 100644 (file)
@@ -37,7 +37,7 @@ static void storeline(textlabel_t * lp, char *line, char terminator,
     if (lp->dimen.x < width)
        lp->dimen.x = width;
     /* recalculate total height */
-#if ENABLE_CODEGENS && !defined(HAVE_GD_FREETYPE)
+#if !defined(DISABLE_CODEGENS) && !defined(HAVE_GD_FREETYPE)
     if (Output_codegen == &GD_CodeGen)
        lp->dimen.y = textheight(lp->u.txt.nlines, lp->fontsize);
     else
index cb577a3bfc1a7d806a6b451d54e13906f8128ae6..b92b682c250974c842b08c04eb89240cdfd3bb67 100644 (file)
@@ -18,7 +18,7 @@
 #include       "gvrender.h"
 #include       "agxbuf.h"
 
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
 FILE *Output_file;
 int Output_lang;
 #endif
@@ -123,7 +123,7 @@ void dotneato_write_one(GVC_t * gvc, graph_t * g)
     int flags;
 
     if (NOT(gvrender_features(gvc) & GVRENDER_DOES_MULTIGRAPH_OUTPUT_FILES)
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
 /* FIXME - bad hack until feaures supported in codegens */
        && gvc->codegen != &PS_CodeGen
 #ifdef QUARTZ_RENDER
@@ -227,7 +227,7 @@ void dotneato_write(GVC_t * gvc)
            }
            job->output_lang = lang_select(gvc, job->output_langname, 1);
        }
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
        Output_file = job->output_file;
        Output_lang = job->output_lang;
 #endif
@@ -568,7 +568,7 @@ static agxbuf charbuf;
 static attrsym_t *g_draw;
 static attrsym_t *g_l_draw;
 
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
 
 static void xd_textline(point p, textline_t * line)
 {
@@ -764,7 +764,7 @@ static void extend_attrs(GVC_t * gvc)
            scale = late_double(e, E_arrowsz, 1.0, 0.0);
            for (i = 0; i < ED_spl(e)->size; i++) {
                bz = ED_spl(e)->list[i];
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
 /* FIXME - why is this here? */
                xd_bezier(bz.list, bz.size, FALSE, FALSE);
 #endif
index 239458a7ef0353c823841a577e4a62094f08787f..2effe7dbe4cbe8e7cb6f4506dd7d2c286f9a1691 100644 (file)
@@ -202,14 +202,13 @@ extern "C" {
     extern void toggle(int);
     extern int test_toggle();
 
-#if ENABLE_CODEGENS && !defined(HAVE_GD_FREETYPE)
+#ifndef DISABLE_CODEGENS
+#ifndef HAVE_GD_FREETYPE
     extern void initDPI(graph_t *);
     extern double textheight(int nlines, double fontsz);
     extern int builtinFontHt(double fontsz);
     extern int builtinFontWd(double fontsz);
 #endif
-
-#if ENABLE_CODEGENS
     extern codegen_info_t *first_codegen();
     extern codegen_info_t *next_codegen();
 #endif
index 7d502c47341f3e25d36b45d3c9ed774b6060e067..b202ddde2f85706948df04a45cf8e881701f8cfc 100644 (file)
@@ -249,7 +249,7 @@ char *findFill(node_t * n)
            if (ND_shape(n) == point_desc) {
                color = "black";
            }
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
            else {
                color = (Output_lang == MIF ? "black" : DEFAULT_FILL);
            }
@@ -1003,13 +1003,11 @@ static void poly_gencode(GVC_t * gvc, node_t * n)
     xsize = (16.0 * (ND_lw_i(n) + ND_rw_i(n)) / POINTS(ND_width(n)));
     ysize = (16.0 * ND_ht_i(n) / POINTS(ND_height(n)));
 
-#if ENABLE_CODEGENS
-#ifdef HAVE_GD_PNG
+#if !defined(DISABLE_CODEGENS) && defined(HAVE_GD_PNG)
     /* this is bad, but it's because of how the VRML driver works */
     if ((gvc->codegen == &VRML_CodeGen) && (peripheries == 0)) {
        peripheries = 1;
     }
-#endif
 #endif
 
     if (ND_shape(n) == point_desc) {
index d7b6a472b37fb0cf30f683bd36e9d33e3ec9dbe8..70f102bee3243d7601e2622ae39ef7ff14f921f8 100644 (file)
@@ -190,8 +190,7 @@ extern "C" {
        boolean usershape;
     } shape_desc;
 
-#if ENABLE_CODEGENS
-
+#ifndef DISABLE_CODEGENS
     typedef struct codegen_t {
        void (*reset) (void);
        void (*begin_job) (FILE * ofp, graph_t * g, char **lib, char *user,
index edc6f0a9eba81a1bb38ca388b12960f05f6147cb..db76c8b801db873a9d08f7d265e38c3ebe2bbbe3 100644 (file)
@@ -55,13 +55,13 @@ int gvrender_select(GVC_t * gvc, char *str)
 {
     gv_plugin_t *plugin;
     gvplugin_type_t *typeptr;
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     codegen_info_t *cg_info;
 #endif
 
     plugin = gvplugin_load(gvc, API_render, str);
     if (plugin) {
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
        if (strcmp(plugin->path, "cg") == 0) {
            cg_info = (codegen_info_t *) (plugin->typeptr);
            gvc->codegen = cg_info->cg;
@@ -74,7 +74,7 @@ int gvrender_select(GVC_t * gvc, char *str)
                (gvrender_features_t *) (typeptr->features);
            gvc->render_id = typeptr->id;
            return GVRENDER_PLUGIN;
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
        }
 #endif
     }
@@ -89,7 +89,7 @@ int gvrender_features(GVC_t * gvc)
     if (gvre) {
        features = gvc->render_features->flags;
     }
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -109,7 +109,7 @@ int gvrender_features(GVC_t * gvc)
 
 void gvrender_reset(GVC_t * gvc)
 {
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     gvrender_engine_t *gvre = gvc->render_engine;
 
     if (!gvre) {
@@ -130,7 +130,7 @@ void gvrender_begin_job(GVC_t * gvc, char **lib, point pages)
     if (gvre && gvre->begin_job)
 //      gvre->begin_job(gvc, agget(g, "stylesheet"));
        gvre->begin_job(gvc);
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -147,7 +147,7 @@ void gvrender_end_job(GVC_t * gvc)
 
     if (gvre && gvre->end_job)
        gvre->end_job(gvc);
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -277,7 +277,7 @@ void gvrender_begin_graph(GVC_t * gvc, graph_t * g, box bb, point pb)
        gvc->style->fill = PEN_NONE;
        gvc->style->penwidth = PENWIDTH_NORMAL;
     }
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -293,7 +293,7 @@ void gvrender_end_graph(GVC_t * gvc)
 
     if (gvre && gvre->end_graph)
        gvre->end_graph(gvc);
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -317,7 +317,7 @@ void gvrender_begin_page(GVC_t * gvc, point page, double scale, int rot,
     gvc->page_number = page.x + page.y * gvc->pages.x + 1;
     if (gvre && gvre->begin_page)
        gvre->begin_page(gvc, gvc->g->name);
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -333,7 +333,7 @@ void gvrender_end_page(GVC_t * gvc)
 
     if (gvre && gvre->end_page)
        gvre->end_page(gvc);
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -352,7 +352,7 @@ void gvrender_begin_layer(GVC_t * gvc, char *layername, int layer,
     gvc->nLayers = nLayers;
     if (gvre && gvre->begin_layer)
        gvre->begin_layer(gvc, layername);
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -368,7 +368,7 @@ void gvrender_end_layer(GVC_t * gvc)
 
     if (gvre && gvre->end_layer)
        gvre->end_layer(gvc);
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -386,7 +386,7 @@ void gvrender_begin_cluster(GVC_t * gvc, graph_t * sg)
 
     if (gvre && gvre->begin_cluster)
        gvre->begin_cluster(gvc, sg->name, sg->meta_node->id);
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -402,7 +402,7 @@ void gvrender_end_cluster(GVC_t * gvc)
 
     if (gvre && gvre->end_cluster)
        gvre->end_cluster(gvc);
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -418,7 +418,7 @@ void gvrender_begin_nodes(GVC_t * gvc)
 
     if (gvre && gvre->begin_nodes)
        gvre->begin_nodes(gvc);
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -434,7 +434,7 @@ void gvrender_end_nodes(GVC_t * gvc)
 
     if (gvre && gvre->end_nodes)
        gvre->end_nodes(gvc);
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -450,7 +450,7 @@ void gvrender_begin_edges(GVC_t * gvc)
 
     if (gvre && gvre->begin_edges)
        gvre->begin_edges(gvc);
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -466,7 +466,7 @@ void gvrender_end_edges(GVC_t * gvc)
 
     if (gvre && gvre->end_edges)
        gvre->end_edges(gvc);
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -482,7 +482,7 @@ void gvrender_begin_node(GVC_t * gvc, node_t * n)
 
     if (gvre && gvre->begin_node)
        gvre->begin_node(gvc, n->name, n->id);
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -498,7 +498,7 @@ void gvrender_end_node(GVC_t * gvc)
 
     if (gvre && gvre->end_node)
        gvre->end_node(gvc);
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -516,7 +516,7 @@ void gvrender_begin_edge(GVC_t * gvc, edge_t * e)
        gvre->begin_edge(gvc, e->tail->name,
                         e->tail->graph->root->kind & AGFLAG_DIRECTED,
                         e->head->name, e->id);
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -532,7 +532,7 @@ void gvrender_end_edge(GVC_t * gvc)
 
     if (gvre && gvre->end_edge)
        gvre->end_edge(gvc);
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -552,7 +552,7 @@ void gvrender_begin_context(GVC_t * gvc)
        (gvc->styles)[gvc->SP] = (gvc->styles)[(gvc->SP) - 1];
        gvc->style = &((gvc->styles)[gvc->SP]);
     }
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -571,7 +571,7 @@ void gvrender_end_context(GVC_t * gvc)
        assert(gvc->SP >= 0);
        gvc->style = &(gvc->styles[gvc->SP]);
     }
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -588,7 +588,7 @@ void gvrender_begin_anchor(GVC_t * gvc, char *href, char *tooltip,
 
     if (gvre && gvre->begin_anchor)
        gvre->begin_anchor(gvc, href, tooltip, target);
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -604,7 +604,7 @@ void gvrender_end_anchor(GVC_t * gvc)
 
     if (gvre && gvre->end_anchor)
        gvre->end_anchor(gvc);
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -622,7 +622,7 @@ void gvrender_set_font(GVC_t * gvc, char *fontname, double fontsize)
        gvc->style->fontfam = fontname;
        gvc->style->fontsz = fontsize;
     }
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -642,7 +642,7 @@ void gvrender_textline(GVC_t * gvc, pointf p, textline_t * line)
                gvre->textline(gvc, gvrender_ptf(gvc, p), line);
            }
        }
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
        else {
            codegen_t *cg = gvc->codegen;
            point P;
@@ -665,7 +665,7 @@ void gvrender_set_pencolor(GVC_t * gvc, char *name)
        if (gvre->resolve_color)
            gvre->resolve_color(gvc, color);
     }
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -685,7 +685,7 @@ void gvrender_set_fillcolor(GVC_t * gvc, char *name)
        if (gvre->resolve_color)
            gvre->resolve_color(gvc, color);
     }
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -729,7 +729,7 @@ void gvrender_set_style(GVC_t * gvc, char **s)
            }
        }
     }
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -762,7 +762,7 @@ void gvrender_ellipse(GVC_t * gvc, point p, int rx, int ry, int filled)
            gvre->ellipse(gvc, AF, filled);
        }
     }
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -791,7 +791,7 @@ void gvrender_polygon(GVC_t * gvc, point * A, int n, int filled)
            gvre->polygon(gvc, AF, n, filled);
        }
     }
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -819,7 +819,7 @@ void gvrender_beziercurve(GVC_t * gvc, pointf * AF, int n,
            gvre->beziercurve(gvc, AF2, n, arrow_at_start, arrow_at_end);
        }
     }
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
        /* hack for old codegen int API */
@@ -856,7 +856,7 @@ void gvrender_polyline(GVC_t * gvc, point * A, int n)
            gvre->polyline(gvc, AF, n);
        }
     }
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -874,7 +874,7 @@ void gvrender_comment(GVC_t * gvc, void *obj, attrsym_t * sym)
        if (sym)
            gvre->comment(gvc, agxget(obj, sym->index));
     }
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
@@ -902,7 +902,7 @@ void gvrender_user_shape(GVC_t * gvc, char *name, point * A, int n,
 
     if (gvre && gvre->user_shape)
        gvre->user_shape(gvc, name, AF, n, filled);
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
     else {
        codegen_t *cg = gvc->codegen;
 
index d5016d44c20e7fe69f8afa7a1a51f5695ac65976..730b4e8a8b09433c8bd1acbf357d084c93d77643 100644 (file)
@@ -102,7 +102,7 @@ extern "C" {
        gvrender_engine_t *render_engine;       /* current render engine */
        gvrender_features_t *render_features;   /* features of current render */
        int render_id;          /* internal id of current render */
-#if ENABLE_CODEGENS
+#ifndef DISABLE_CODEGENS
        codegen_t *codegen;
 #endif