]> granicus.if.org Git - graphviz/commitdiff
gdgen_begin_page: use a C99 bool for 'truecolor_p' instead of a boolean
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 27 Dec 2021 03:07:38 +0000 (19:07 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 5 Jan 2022 16:04:04 +0000 (08:04 -0800)
plugin/gd/gvrender_gd.c

index 18d168bb4e0e317e46010aba173186642eaf0406..e4083bf6b2c82169f8cdf1606d1b18af09f3b7c3 100644 (file)
@@ -67,22 +67,22 @@ static int white, black, transparent, basecolor;
 static void gdgen_begin_page(GVJ_t * job)
 {
     char *bgcolor_str = NULL, *truecolor_str = NULL;
-    boolean truecolor_p = FALSE;       /* try to use cheaper paletted mode */
+    bool truecolor_p = false;  /* try to use cheaper paletted mode */
     gdImagePtr im = NULL;
 
     truecolor_str = agget(job->gvc->g, "truecolor");   /* allow user to force truecolor */
     bgcolor_str = agget(job->gvc->g, "bgcolor");
 
     if (truecolor_str && truecolor_str[0])
-       truecolor_p = mapbool(truecolor_str);
+       truecolor_p = mapbool(truecolor_str) != FALSE;
 
     if (bgcolor_str && strcmp(bgcolor_str, "transparent") == 0) {
        if (job->render.features->flags & GVDEVICE_DOES_TRUECOLOR)
-           truecolor_p = TRUE; /* force truecolor */
+           truecolor_p = true; /* force truecolor */
     }
 
     if (GD_has_images(job->gvc->g))
-       truecolor_p = TRUE;     /* force truecolor */
+       truecolor_p = true;     /* force truecolor */
 
     if (job->external_context) {
        if (job->common->verbose)