]> granicus.if.org Git - graphviz/commitdiff
graph_init: [nfc] take a C99 bool parameter instead of a boolean
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 19 Dec 2021 20:34:37 +0000 (12:34 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 20 Dec 2021 00:14:25 +0000 (16:14 -0800)
cmd/tools/gvpack.c
lib/common/input.c
lib/common/render.h
lib/gvc/gvlayout.c

index 904d8770c613049cfe487cb9a5fc4a3bd40468de..19106563a233dc9e86e22bee5487f8f25f2247a5 100644 (file)
@@ -293,7 +293,7 @@ static void init_graph(Agraph_t *g, bool fill, GVC_t *gvc) {
     aginit (g, AGNODE, "Agnodeinfo_t", sizeof(Agnodeinfo_t), TRUE);
     aginit (g, AGEDGE, "Agedgeinfo_t", sizeof(Agedgeinfo_t), TRUE);
     GD_gvc(g) = gvc;
-    graph_init(g, FALSE);
+    graph_init(g, false);
     d = late_int(g, agfindgraphattr(g, "dim"), 2, 2);
     if (d != 2) {
        fprintf(stderr, "Error: graph %s has dim = %d (!= 2)\n", agnameof(g),
index 9a78ba5c1635a1b4e9b06e52a4cc68c785c847bb..e3037648c407671d4b3eb7fb80f4f348cffdabe7 100644 (file)
@@ -16,6 +16,7 @@
 #include <xdot/xdot.h>
 #include <cgraph/agxbuf.h>
 #include <cgraph/strcasecmp.h>
+#include <stdbool.h>
 #include <stddef.h>
 #include <string.h>
 
@@ -618,7 +619,7 @@ static void setRatio(graph_t * g)
        cgraph requires 
 
 */
-void graph_init(graph_t * g, boolean use_rankdir)
+void graph_init(graph_t * g, bool use_rankdir)
 {
     char *p;
     double xf;
index 3586ba3a54bbdd09e1ef22c4312541de865fecf3..e4dcf638bd042664e1c369721f53141b2c85393e 100644 (file)
@@ -86,7 +86,7 @@ extern "C" {
     RENDER_API char* charsetToStr (int c);
     RENDER_API pointf coord(node_t * n);
     RENDER_API void do_graph_label(graph_t * sg);
-    RENDER_API void graph_init(graph_t * g, boolean use_rankdir);
+    RENDER_API void graph_init(graph_t * g, bool use_rankdir);
     RENDER_API void graph_cleanup(graph_t * g);
     RENDER_API int dotneato_args_initialize(GVC_t * gvc, int, char **);
     RENDER_API int dotneato_usage(int);
index ea1d28ecb0ed4186dde18154bc60b0b0da349a23..a9f65cc7b0dceb9dcd4c09d8e87faa75e06e393d 100644 (file)
@@ -21,8 +21,9 @@
 #include <cgraph/cgraph.h>
 #include <gvc/gvcproc.h>
 #include <gvc/gvc.h>
+#include <stdbool.h>
 
-extern void graph_init(Agraph_t *g, boolean use_rankdir);
+extern void graph_init(Agraph_t *g, bool use_rankdir);
 extern void graph_cleanup(Agraph_t *g);
 extern void gv_fixLocale (int set);
 extern void gv_initShapes (void);
@@ -75,7 +76,7 @@ int gvLayoutJobs(GVC_t * gvc, Agraph_t * g)
        return -1;
 
     gv_fixLocale (1);
-    graph_init(g, gvc->layout.features->flags & LAYOUT_USES_RANKDIR);
+    graph_init(g, !!(gvc->layout.features->flags & LAYOUT_USES_RANKDIR));
     GD_drawing(agroot(g)) = GD_drawing(g);
     gv_initShapes ();
     if (gvle && gvle->layout) {