]> granicus.if.org Git - graphviz/commitdiff
replace boolean has_positions with a C99 bool
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 24 Apr 2021 04:33:18 +0000 (21:33 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 14 May 2021 00:03:36 +0000 (17:03 -0700)
lib/sparse/DotIO.c

index c07f6a1fde21a0d44419234664163a2d5acbee62..093c3f6e30c9f949ab7915828c7153d023a05573 100644 (file)
@@ -199,7 +199,7 @@ SparseMatrix_import_dot (Agraph_t* g, int dim, real **label_sizes, real **x, int
   }
 
   if (x && (psym = agattr(g, AGNODE, "pos", NULL))) {
-    int has_positions = TRUE;
+    bool has_positions = true;
     char* pval;
     if (!(*x)) {
       *x = MALLOC(sizeof(real)*dim*nnodes);
@@ -213,7 +213,7 @@ SparseMatrix_import_dot (Agraph_t* g, int dim, real **label_sizes, real **x, int
        if (dim == 2){
          nitems = sscanf(pval, "%lf,%lf", &xx, &yy);
          if (nitems != 2) {
-            has_positions = FALSE;
+            has_positions = false;
             agerr(AGERR, "Node \"%s\" pos has %d < 2 values", agnameof(n), nitems);
          }
          (*x)[i*dim] = xx;
@@ -221,7 +221,7 @@ SparseMatrix_import_dot (Agraph_t* g, int dim, real **label_sizes, real **x, int
        } else if (dim == 3){
          nitems = sscanf(pval, "%lf,%lf,%lf", &xx, &yy, &zz);
          if (nitems != 3) {
-            has_positions = FALSE;
+            has_positions = false;
             agerr(AGERR, "Node \"%s\" pos has %d < 3 values", agnameof(n), nitems);
          }
          (*x)[i*dim] = xx;
@@ -230,7 +230,7 @@ SparseMatrix_import_dot (Agraph_t* g, int dim, real **label_sizes, real **x, int
        } else if (dim == 4){
          nitems = sscanf(pval, "%lf,%lf,%lf,%lf", &xx, &yy, &zz,&ww);
          if (nitems != 4) {
-            has_positions = FALSE;
+            has_positions = false;
             agerr(AGERR, "Node \"%s\" pos has %d < 4 values", agnameof(n), nitems);
          }
          (*x)[i*dim] = xx;
@@ -248,7 +248,7 @@ SparseMatrix_import_dot (Agraph_t* g, int dim, real **label_sizes, real **x, int
          assert(0);
        }
       } else {
-        has_positions = FALSE;
+        has_positions = false;
        agerr(AGERR, "Node \"%s\" lacks position info", agnameof(n));
       }
     }