]> granicus.if.org Git - graphviz/commitdiff
Unify usage of preprocessor constant HAVE_GTS.
authorPrimhill Computers <remi.chateauneu@primhillcomputers.com>
Mon, 11 Oct 2021 20:51:52 +0000 (21:51 +0100)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 16 Oct 2021 22:56:06 +0000 (15:56 -0700)
lib/neatogen/delaunay.c
lib/sfdpgen/sfdpinit.c

index 4a8e03170e5426982dc071b1d5b9f62f29da73ca..236738d8d4544e9839bb4b352c56bc03f16223d1 100644 (file)
@@ -20,7 +20,7 @@
 #include <common/memory.h>
 #include <common/logic.h>
 
-#if HAVE_GTS
+#if defined(HAVE_GTS)
 #include <gts.h>
 
 static gboolean triangle_is_hole(GtsTriangle * t)
index 9be0123837b34e7b2d81f189d00c2a89d9a40594..3eb0fd9ea29ed89eecc2acced24eb87bb3dd22a7 100644 (file)
@@ -164,7 +164,7 @@ late_smooth (graph_t* g, Agsym_t* sym, int dflt)
     if (!sym) return dflt;
     s = agxget (g, sym);
     if (isdigit(*s)) {
-#if (HAVE_GTS || HAVE_TRIANGLE)
+#if (defined(HAVE_GTS) || defined(HAVE_TRIANGLE))
        if ((v = atoi (s)) <= SMOOTHING_RNG)
 #else
        if ((v = atoi (s)) <= SMOOTHING_SPRING)
@@ -182,13 +182,13 @@ late_smooth (graph_t* g, Agsym_t* sym, int dflt)
            rv = SMOOTHING_NONE;
        else if (!strcasecmp(s, "power_dist"))
            rv = SMOOTHING_STRESS_MAJORIZATION_POWER_DIST;
-#if (HAVE_GTS || HAVE_TRIANGLE)
+#if (defined(HAVE_GTS) || defined(HAVE_TRIANGLE))
        else if (!strcasecmp(s, "rng"))
            rv = SMOOTHING_RNG;
 #endif
        else if (!strcasecmp(s, "spring"))
            rv = SMOOTHING_SPRING;
-#if (HAVE_GTS || HAVE_TRIANGLE)
+#if (defined(HAVE_GTS) || defined(HAVE_TRIANGLE))
        else if (!strcasecmp(s, "triangle"))
            rv = SMOOTHING_TRIANGLE;
 #endif
@@ -285,7 +285,7 @@ void sfdp_layout(graph_t * g)
        spring_electrical_control ctrl = spring_electrical_control_new();
 
        tuneControl (g, ctrl);
-#if (HAVE_GTS || HAVE_TRIANGLE)
+#if (defined(HAVE_GTS) || defined(HAVE_TRIANGLE))
        graphAdjustMode(g, &am, "prism0");
 #else
        graphAdjustMode(g, &am, 0);