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

index 029980b7a34e9ee19fd45f3a45c5527f7e2246cf..d69b7a173ceae115bd72cfae50fdae81da68c63d 100644 (file)
@@ -22,6 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
   `port` struct are now C99 `bool`s instead of Graphviz-specific `boolean`s.
 - **Breaking**: The `set` and `html` fields of the `textlabel_t` struct are now
   C99 `bool`s instead of Graphviz-specific `boolean`s.
+- **Breaking**: The `usershape` field of the `shape_desc` 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 9e37e9382397ec94ae4db7fec0a18c6635b90b14..5da5a4a0de5cfbdecee598144e4e9794143ac095 100644 (file)
@@ -3810,9 +3810,9 @@ static shape_desc *user_shape(char *name)
     if (Lib == NULL && !streq(name, "custom")) {
        agerr(AGWARN, "using %s for unknown shape %s\n", Shapes[0].name,
              p->name);
-       p->usershape = FALSE;
+       p->usershape = false;
     } else {
-       p->usershape = TRUE;
+       p->usershape = true;
     }
     return p;
 }
index bb96d83b44de9fae1c47af33323b6b38c04dae8e..75ed36c931d25b5622e5047d83af2e2af75882bb 100644 (file)
@@ -183,7 +183,7 @@ extern "C" {
        char *name;             /* as read from graph file */
        shape_functions *fns;
        polygon_t *polygon;     /* base polygon info */
-       boolean usershape;
+       bool usershape;
     } shape_desc;
 
 #include "usershape.h"         /* usershapes needed by gvc */