]> granicus.if.org Git - graphviz/commitdiff
replace include of logic.h with stdbool.h
authorCosta Shulyupin <constantine.shulyupin@gmail.com>
Wed, 6 Jul 2022 09:35:18 +0000 (12:35 +0300)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 8 Jul 2022 02:17:22 +0000 (19:17 -0700)
and replace FALSE/TRUE with false/true

to reuse standard definitions

lib/label/index.c
lib/label/split.q.c

index 7643235164a2d070ccaecc9ad8dcb4561b10c57f..0d3f1b01f0d26db2a3fea96d992da6fd4a65439f 100644 (file)
@@ -14,7 +14,7 @@
 #include <stddef.h>
 #include <stdio.h>
 #include <assert.h>
-#include <common/logic.h>
+#include <stdbool.h>
 #include <common/memory.h>
 
 LeafList_t *RTreeNewLeafList(Leaf_t * lp)
@@ -249,7 +249,7 @@ RTreeInsert2(RTree_t * rtp, Rect_t * r, void *data,
        b.child = (Node_t *) data;
        return AddBranch(rtp, &b, n, new);
     } else {                   /* Not supposed to happen */
-       assert(FALSE);
+       assert(false);
        return 0;
     }
 }
index 57d7c57eb9cdad054ddf38b47f5b05c848505411..47ecfad95853683d13ac23dc97722f4c085e43e4 100644 (file)
@@ -13,7 +13,7 @@
 #include <stdio.h>
 #include <assert.h>
 #include <label/split.q.h>
-#include <common/logic.h>
+#include <stdbool.h>
 
 /* Forward declarations */
 static void MethodZero(RTree_t * rtp);
@@ -222,7 +222,7 @@ static void Classify(RTree_t * rtp, int i, int group)
     assert(!rtp->split.Partitions[0].taken[i]);
 
     rtp->split.Partitions[0].partition[i] = group;
-    rtp->split.Partitions[0].taken[i] = TRUE;
+    rtp->split.Partitions[0].taken[i] = true;
 
     if (rtp->split.Partitions[0].count[group] == 0)
        rtp->split.Partitions[0].cover[group] =
@@ -284,7 +284,7 @@ static void InitPVars(RTree_t * rtp)
     rtp->split.Partitions[0].area[0] = rtp->split.Partitions[0].area[1] =
        0;
     for (size_t i = 0; i < NODECARD + 1; i++) {
-       rtp->split.Partitions[0].taken[i] = FALSE;
+       rtp->split.Partitions[0].taken[i] = false;
        rtp->split.Partitions[0].partition[i] = -1;
     }
 }