From: Matthew Fernandez Date: Sat, 15 Jan 2022 23:42:33 +0000 (-0800) Subject: API BREAK: use a C99 bool for 'GVJ_t.device_sets_dpi' X-Git-Tag: 3.0.0~64^2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ccea4fd0e9d04f3c76ab7535cc3ef0ba1d07d324;p=graphviz API BREAK: use a C99 bool for 'GVJ_t.device_sets_dpi' --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d39bae9d..cfbeb19a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/lib/gvc/gvcjob.h b/lib/gvc/gvcjob.h index b8de4d250..00cceacfe 100644 --- a/lib/gvc/gvcjob.h +++ b/lib/gvc/gvcjob.h @@ -18,6 +18,7 @@ extern "C" { #include "gvcommon.h" #include "color.h" +#include #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; diff --git a/plugin.demo/xgtk/src/gvdevice_xgtk.c b/plugin.demo/xgtk/src/gvdevice_xgtk.c index 7f6e70298..440431f1d 100644 --- a/plugin.demo/xgtk/src/gvdevice_xgtk.c +++ b/plugin.demo/xgtk/src/gvdevice_xgtk.c @@ -10,6 +10,7 @@ #include "config.h" +#include #include #ifdef HAVE_UNISTD_H #include @@ -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) diff --git a/plugin/glitz/gvdevice_glitz.c b/plugin/glitz/gvdevice_glitz.c index 3a8f342bc..079cdc9a7 100644 --- a/plugin/glitz/gvdevice_glitz.c +++ b/plugin/glitz/gvdevice_glitz.c @@ -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) diff --git a/plugin/gtk/gvdevice_gtk.c b/plugin/gtk/gvdevice_gtk.c index 61a7bf33a..c2dfc7967 100644 --- a/plugin/gtk/gvdevice_gtk.c +++ b/plugin/gtk/gvdevice_gtk.c @@ -10,6 +10,7 @@ #include "config.h" +#include #include #ifdef HAVE_UNISTD_H #include @@ -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) diff --git a/plugin/xlib/gvdevice_xlib.c b/plugin/xlib/gvdevice_xlib.c index c2fd1b482..c29f6024f 100644 --- a/plugin/xlib/gvdevice_xlib.c +++ b/plugin/xlib/gvdevice_xlib.c @@ -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; }