]> granicus.if.org Git - graphviz/commitdiff
gvloadimage: [nfc] take a C99 bool parameter instead of a boolean
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 20 Dec 2021 04:01:22 +0000 (20:01 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 25 Dec 2021 18:38:17 +0000 (10:38 -0800)
lib/gvc/gvcproc.h
lib/gvc/gvloadimage.c
lib/gvc/gvrender.c

index 5a4a86255e0d517e90c641676d2ad9853afa3bf0..eb92100bdd1db8bd31bd1a96ef4eaec3cb9ef819 100644 (file)
@@ -53,7 +53,7 @@
     bool gvtextlayout(GVC_t *gvc, textspan_t *span, char **fontpath);
 
 /* loadimage */
-    void gvloadimage(GVJ_t *job, usershape_t *us, boxf b, boolean filled, const char *target);
+    void gvloadimage(GVJ_t *job, usershape_t *us, boxf b, bool filled, const char *target);
     
 /* usershapes */
     point gvusershape_size_dpi(usershape_t *us, pointf dpi);
index aadd762151a5bb3fa0c1b673f34c46e603b07e96..bb8e52691781cd8d6cf6a95c2918b45f33257255 100644 (file)
@@ -25,6 +25,7 @@
 
 /* for agerr() */
 #include <cgraph/cgraph.h>
+#include <stdbool.h>
 
 static int gvloadimage_select(GVJ_t * job, char *str)
 {
@@ -41,7 +42,7 @@ static int gvloadimage_select(GVJ_t * job, char *str)
     return NO_SUPPORT;
 }
 
-void gvloadimage(GVJ_t * job, usershape_t *us, boxf b, boolean filled, const char *target)
+void gvloadimage(GVJ_t * job, usershape_t *us, boxf b, bool filled, const char *target)
 {
     gvloadimage_engine_t *gvli;
     char type[SMALLBUF];
@@ -59,5 +60,5 @@ void gvloadimage(GVJ_t * job, usershape_t *us, boxf b, boolean filled, const cha
            agerr (AGWARN, "No loadimage plugin for \"%s\"\n", type);
 
     if ((gvli = job->loadimage.engine) && gvli->loadimage)
-       gvli->loadimage(job, us, b, filled);
+       gvli->loadimage(job, us, b, filled ? TRUE : FALSE);
 }
index ee093d4fa2652b23b1460dd3ca06af105e6cac09..77395a7708cfecd59a5cedccac578c07c2c40047 100644 (file)
@@ -820,7 +820,7 @@ void gvrender_usershape(GVJ_t * job, char *name, pointf * a, int n,
        b.UR.y = d;
     }
     if (gvre) {
-       gvloadimage(job, us, b, filled, job->render.type);
+       gvloadimage(job, us, b, filled != FALSE, job->render.type);
     }
 }