From b8f5225bc9ff87e43db43c66de7d4d7faaca359f Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 15 Jan 2022 10:34:08 -0800 Subject: [PATCH] API BREAK: use a C99 bool for 'shape_desc.usershape' instead of a boolean --- CHANGELOG.md | 2 ++ lib/common/shapes.c | 4 ++-- lib/common/types.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 029980b7a..d69b7a173 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/lib/common/shapes.c b/lib/common/shapes.c index 9e37e9382..5da5a4a0d 100644 --- a/lib/common/shapes.c +++ b/lib/common/shapes.c @@ -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; } diff --git a/lib/common/types.h b/lib/common/types.h index bb96d83b4..75ed36c93 100644 --- a/lib/common/types.h +++ b/lib/common/types.h @@ -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 */ -- 2.40.0