From: Matthew Fernandez Date: Sat, 15 Jan 2022 18:53:15 +0000 (-0800) Subject: API BREAK: use a C99 bool for 'Agraphinfo_t.has_images' X-Git-Tag: 3.0.0~66^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=156630b3ddb97debcb1ea5ff3592d06f16011fee;p=graphviz API BREAK: use a C99 bool for 'Agraphinfo_t.has_images' --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a4c5ff71..23b62e9c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 now C99 `bool`s instead of Graphviz-specific `boolean`s. - **Breaking**: The `filled`, `landscape`, and `centered` fields of the `layout_t` struct are now C99 `bool`s instead of Graphviz-specific `boolean`s. +- **Breaking**: The `has_images` field of the `Agraphinfo_t` struct is now a + C99 `bool` instead of a Graphviz-specific `boolean`. - **Breaking**: Graphviz headers no longer define the constant `MAXSHORT`. A drop-in replacement is `SHRT_MAX` in the C standard library’s limits.h. - **Breaking**: Graphviz headers no lnger define `NIL` macros. A drop-in diff --git a/lib/common/htmltable.c b/lib/common/htmltable.c index 4dc2ecb66..f2d476909 100644 --- a/lib/common/htmltable.c +++ b/lib/common/htmltable.c @@ -1094,7 +1094,7 @@ static int size_html_img(htmlimg_t * img, htmlenv_t * env) agerr(AGERR, "No or improper image file=\"%s\"\n", img->src); } else { rv = 0; - GD_has_images(env->g) = TRUE; + GD_has_images(env->g) = true; } B2BF(b, img->box); diff --git a/lib/common/shapes.c b/lib/common/shapes.c index 5da5a4a0d..c2cc8625c 100644 --- a/lib/common/shapes.c +++ b/lib/common/shapes.c @@ -1940,7 +1940,7 @@ static void poly_init(node_t * n) sfile ? sfile : "", agnameof(n)); imagesize.x = imagesize.y = 0; } else { - GD_has_images(agraphof(n)) = TRUE; + GD_has_images(agraphof(n)) = true; imagesize.x += 2; /* some fixed padding */ imagesize.y += 2; } @@ -1953,7 +1953,7 @@ static void poly_init(node_t * n) sfile ? sfile : "", agnameof(n)); imagesize.x = imagesize.y = 0; } else { - GD_has_images(agraphof(n)) = TRUE; + GD_has_images(agraphof(n)) = true; imagesize.x += 2; /* some fixed padding */ imagesize.y += 2; } diff --git a/lib/common/types.h b/lib/common/types.h index b9b331c3e..1050b7b85 100644 --- a/lib/common/types.h +++ b/lib/common/types.h @@ -278,7 +278,7 @@ typedef enum {NATIVEFONTS,PSFONTS,SVGFONTS} fontname_kind; pointf border[4]; /* sizes of margins for graph labels */ unsigned char gui_state; /* Graph state for GUI ops */ unsigned char has_labels; - boolean has_images; + bool has_images; unsigned char charset; /* input character set */ int rankdir; double ht1; /* below and above extremal ranks */