]> granicus.if.org Git - graphviz/commitdiff
API BREAK: use a C99 bool for 'GVJ_t.device_sets_dpi'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 15 Jan 2022 23:42:33 +0000 (15:42 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 16 Jan 2022 17:46:33 +0000 (09:46 -0800)
CHANGELOG.md
lib/gvc/gvcjob.h
plugin.demo/xgtk/src/gvdevice_xgtk.c
plugin/glitz/gvdevice_glitz.c
plugin/gtk/gvdevice_gtk.c
plugin/xlib/gvdevice_xlib.c

index 4d39bae9df749e241c4ab01f552dc7fa49a0e0d1..cfbeb19a32fce7a62739f817026d53e348b5f70d 100644 (file)
@@ -37,6 +37,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
   C99 `bool` instead of a Graphviz-specific `boolean`.
 - **Breaking**: The `must_inline` and `nocache` fields of the `usershape_t`
   struct are now C99 `bool`s instead of Graphviz-specific `boolean`s.
+- **Breaking**: The `device_sets_dpi` field of the `GVJ_t` struct is now a C99
+  `bool` instead of a Graphviz-specific `boolean`.
 - **Breaking**: 1-bit fields of the `obj_state_s` struct are now unsigned
   instead of signed.
 - **Breaking**: Graphviz headers no longer define the constant `MAXSHORT`. A
index b8de4d250d78f7248475361100141c985e6d8020..00cceacfe6f8c81cd0742a21ba1e5134a901712a 100644 (file)
@@ -18,6 +18,7 @@ extern "C" {
 
 #include "gvcommon.h"
 #include "color.h"
+#include <stdbool.h>
 
 #define ARRAY_SIZE(A) (sizeof(A)/sizeof(A[0]))
 
@@ -292,7 +293,7 @@ extern "C" {
        gvplugin_active_loadimage_t loadimage;
        gvdevice_callbacks_t *callbacks;
        pointf device_dpi;
-       boolean device_sets_dpi;
+       bool device_sets_dpi;
 
        void *display;
        int screen;
index 7f6e70298416aef5c350ec996f2e31a94445370c..440431f1d9d79cca1e10caab3f01883660d4e4b4 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "config.h"
 
+#include <stdbool.h>
 #include <stdint.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
@@ -72,7 +73,7 @@ static void gtk_initialize(GVJ_t *firstjob)
     scr = DefaultScreen(dpy);
     firstjob->device_dpi.x = DisplayWidth(dpy, scr) * 25.4 / DisplayWidthMM(dpy, scr);
     firstjob->device_dpi.y = DisplayHeight(dpy, scr) * 25.4 / DisplayHeightMM(dpy, scr);
-    firstjob->device_sets_dpi = TRUE;
+    firstjob->device_sets_dpi = true;
 }
 
 static void gtk_finalize(GVJ_t *firstjob)
index 3a8f342bc4d7e915ec4633b4af3771d1e003d092..079cdc9a7625e6995ab8f8c825e3b32c6ec7fb06 100644 (file)
@@ -468,7 +468,7 @@ static void glitz_initialize(GVJ_t *firstjob)
 
     firstjob->device_dpi.x = DisplayWidth(dpy, scr) * 25.4 / DisplayWidthMM(dpy, scr);
     firstjob->device_dpi.y = DisplayHeight(dpy, scr) * 25.4 / DisplayHeightMM(dpy, scr);
-    firstjob->device_sets_dpi = TRUE;
+    firstjob->device_sets_dpi = true;
 }
 
 static void glitz_finalize(GVJ_t *firstjob)
index 61a7bf33a6ae50f8797bcb369d29a42143b6f49a..c2dfc7967b3c19cd078ca6dd504cc6a0af0ed792 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "config.h"
 
+#include <stdbool.h>
 #include <stdint.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
@@ -70,7 +71,7 @@ static void gtk_initialize(GVJ_t *firstjob)
     scr = DefaultScreen(dpy);
     firstjob->device_dpi.x = DisplayWidth(dpy, scr) * 25.4 / DisplayWidthMM(dpy, scr);
     firstjob->device_dpi.y = DisplayHeight(dpy, scr) * 25.4 / DisplayHeightMM(dpy, scr);
-    firstjob->device_sets_dpi = TRUE;
+    firstjob->device_sets_dpi = true;
 }
 
 static void gtk_finalize(GVJ_t *firstjob)
index c2fd1b482284153c0bd4c4af5a7cad3040ae1c90..c29f6024f2d11f16ef8590b2eb4239c5341e84f3 100644 (file)
@@ -484,7 +484,7 @@ static void xlib_initialize(GVJ_t *firstjob)
 
     firstjob->device_dpi.x = DisplayWidth(dpy, scr) * 25.4 / DisplayWidthMM(dpy, scr);
     firstjob->device_dpi.y = DisplayHeight(dpy, scr) * 25.4 / DisplayHeightMM(dpy, scr);
-    firstjob->device_sets_dpi = TRUE;
+    firstjob->device_sets_dpi = true;
 
     initialized = true;
 }