]> granicus.if.org Git - graphviz/commitdiff
pccomps: use a C99 bool for 'pin' instead of a boolean
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 27 Dec 2021 03:06:08 +0000 (19:06 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 5 Jan 2022 16:04:04 +0000 (08:04 -0800)
lib/pack/ccomps.c

index 8a7395d6f075c6e46add1e83357a90a62efcc33a..cfd313bbd7f21c4052c9cb0ff15206d2412d5131 100644 (file)
@@ -15,6 +15,7 @@
 #include <cgraph/prisize_t.h>
 #include <common/render.h>
 #include <pack/pack.h>
+#include <stdbool.h>
 
 #define MARKED(stk,n) ((stk)->markfn(n,-1))
 #define MARK(stk,n)   ((stk)->markfn(n,1))
@@ -205,7 +206,7 @@ Agraph_t **pccomps(Agraph_t * g, int *ncc, char *pfx, boolean * pinned)
     Agraph_t **ccs;
     size_t len;
     size_t bnd = 10;
-    boolean pin = FALSE;
+    bool pin = false;
     stk_t stk;
     blk_t blk;
     Agnode_t* base[INITBUF];
@@ -233,7 +234,7 @@ Agraph_t **pccomps(Agraph_t * g, int *ncc, char *pfx, boolean * pinned)
            agbindrec(out, "Agraphinfo_t", sizeof(Agraphinfo_t), TRUE); //node custom data
            ccs[c_cnt] = out;
            c_cnt++;
-           pin = TRUE;
+           pin = true;
        }
        if (dfs (g, n, out, &stk) == SIZE_MAX) {
            error = 1;
@@ -274,7 +275,7 @@ packerror:
     else {
        ccs = RALLOC(c_cnt, ccs, Agraph_t *);
        *ncc = (int) c_cnt;
-       *pinned = pin;
+       *pinned = pin ? TRUE : FALSE;
     }
     return ccs;
 }