]> granicus.if.org Git - graphviz/commitdiff
gvtextlayout: [nfc] return a C99 bool instead of a boolean
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 20 Dec 2021 03:58:56 +0000 (19:58 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 25 Dec 2021 18:38:17 +0000 (10:38 -0800)
lib/gvc/gvcproc.h
lib/gvc/gvtextlayout.c

index 47122941ad93a1fbd92e8719b07f52d39a2891f1..5a4a86255e0d517e90c641676d2ad9853afa3bf0 100644 (file)
@@ -50,7 +50,7 @@
 /* textlayout */
 
     int gvtextlayout_select(GVC_t * gvc);
-    boolean gvtextlayout(GVC_t *gvc, textspan_t *span, char **fontpath);
+    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);
index 0358880109c02d8a20ba7ad1d3cfe876270f8e29..584dd1a45b2c23ed49146e3965575906935266c9 100644 (file)
@@ -18,6 +18,7 @@
 #include <gvc/gvplugin_textlayout.h>
 #include <gvc/gvcint.h>
 #include <gvc/gvcproc.h>
+#include <stdbool.h>
 
 int gvtextlayout_select(GVC_t * gvc)
 {
@@ -33,11 +34,11 @@ int gvtextlayout_select(GVC_t * gvc)
     return NO_SUPPORT;
 }
 
-boolean gvtextlayout(GVC_t *gvc, textspan_t *span, char **fontpath)
+bool gvtextlayout(GVC_t *gvc, textspan_t *span, char **fontpath)
 {
     gvtextlayout_engine_t *gvte = gvc->textlayout.engine;
 
     if (gvte && gvte->textlayout)
-       return gvte->textlayout(span, fontpath);
-    return FALSE;
+       return gvte->textlayout(span, fontpath) != FALSE;
+    return false;
 }