]> granicus.if.org Git - graphviz/commitdiff
constrained_majorization_vpsc: [nfc] use a C99 bool instead of boolean
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 18 Dec 2021 16:32:30 +0000 (08:32 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 19 Dec 2021 18:33:22 +0000 (10:33 -0800)
lib/neatogen/quad_prog_vpsc.c

index fd2a7f022b6f84a15b8d3d1228fbb5d2c98cbd53..f9fb1c733164d4a4efc00b0c16de8dd63ac304d2 100644 (file)
@@ -23,6 +23,7 @@
  **********************************************************/
 
 #include <neatogen/digcola.h>
+#include <stdbool.h>
 #ifdef IPSEPCOLA
 #include <math.h>
 #include <stdlib.h>
@@ -52,7 +53,7 @@ constrained_majorization_vpsc(CMajEnvVPSC * e, float *b, float *place,
      * dummy vars included in lap
      */
     int n = e->nv + e->nldv;
-    boolean converged = FALSE;
+    bool converged = false;
 #ifdef CONMAJ_LOGGING
     static int call_no = 0;
 #endif                         /* CONMAJ_LOGGING */
@@ -93,7 +94,7 @@ constrained_majorization_vpsc(CMajEnvVPSC * e, float *b, float *place,
        float alpha, beta;
        float numerator = 0, denominator = 0, r;
        /* fprintf(stderr,"."); */
-       converged = TRUE;
+       converged = true;
        /* find steepest descent direction */
        for (i = 0; i < n; i++) {
            old_place[i] = place[i];
@@ -170,7 +171,7 @@ constrained_majorization_vpsc(CMajEnvVPSC * e, float *b, float *place,
        prev_stress = stress;
 #endif
        if (test > quad_prog_tol) {
-           converged = FALSE;
+           converged = false;
        }
     }
 #ifdef CONMAJ_LOGGING