]> granicus.if.org Git - graphviz/commitdiff
API BREAK: use a C99 bool for 'Agraphinfo_t.has_images'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 15 Jan 2022 18:53:15 +0000 (10:53 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 15 Jan 2022 23:03:24 +0000 (15:03 -0800)
CHANGELOG.md
lib/common/htmltable.c
lib/common/shapes.c
lib/common/types.h

index 1a4c5ff71722cacd14213ec936bacc1fd21f9525..23b62e9c879a3ae53e6d66d8722a3abcc53e8d24 100644 (file)
@@ -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
index 4dc2ecb6602d2166c577ca9a94427f410791532c..f2d476909736006b3651efd432ab79162cda84c6 100644 (file)
@@ -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);
index 5da5a4a0de5cfbdecee598144e4e9794143ac095..c2cc8625c2571b7f5185d721ceaae7b18cdfc65e 100644 (file)
@@ -1940,7 +1940,7 @@ static void poly_init(node_t * n)
                      sfile ? sfile : "<nil>", 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 : "<nil>", 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;
        }
index b9b331c3ea8ed5e47637d9cf0467a4ab60f32929..1050b7b85b8b0c5e7ed5ed3f8844a1275c3ab7ee 100644 (file)
@@ -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 */