]> granicus.if.org Git - graphviz/commitdiff
dist_data: replace a boolean with a C99 bool
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 16 Sep 2021 04:19:23 +0000 (21:19 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 19 Sep 2021 04:29:41 +0000 (21:29 -0700)
lib/neatogen/stress.c

index 1a13145c31a4d8c7128238655e0c2fa94ed6a3ef..e336020168c09283f013e37f8e1ed78b00ff35b6 100644 (file)
@@ -19,6 +19,7 @@
 #include <neatogen/kkutils.h>
 #include <neatogen/stress.h>
 #include <math.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <time.h>
 
@@ -48,7 +49,7 @@ typedef struct {
     int nedges;
     int *edges;
     DistType *edist;
-    boolean free_mem;
+    bool free_mem;
 } dist_data;
 
 static double compute_stressf(float **coords, float *lap, int dim, int n, int exp)
@@ -433,7 +434,7 @@ static int sparse_stress_subspace_majorization_kD(vtx_data * graph, /* Input gra
            distances[i].edist = N_GNEW(n - 1, DistType);
            distances[i].nedges = n - 1;
            nedges += n - 1;
-           distances[i].free_mem = TRUE;
+           distances[i].free_mem = true;
            index = CenterIndex[i];
            for (j = 0; j < i; j++) {
                distances[i].edges[j] = j;
@@ -477,9 +478,9 @@ static int sparse_stress_subspace_majorization_kD(vtx_data * graph, /* Input gra
            available_space = (dist_bound + 1) * n;
            storage1 = N_GNEW(available_space, int);
            storage2 = N_GNEW(available_space, DistType);
-           distances[i].free_mem = TRUE;
+           distances[i].free_mem = true;
        } else {
-           distances[i].free_mem = FALSE;
+           distances[i].free_mem = false;
        }
        distances[i].edges = storage1;
        distances[i].edist = storage2;