From 7ba6bc1b4f8b1a75fa97ce9b889fb8f89edca85f Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 15 Jan 2022 15:24:22 -0800 Subject: [PATCH] API BREAK: use a C99 bool for 'Agnodeinfo_t.clustnode' --- CHANGELOG.md | 2 ++ lib/common/macros.h | 4 +++- lib/common/types.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e92a6ca8..301981e00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **Breaking**: The `has_images`, `has_flat_edges`, `has_sourcerank`, `has_sinkrank`, `expanded`, and `exact_ranksep` fields of the `Agraphinfo_t` struct are now C99 `bool`s instead of Graphviz-specific `boolean`s. +- **Breaking**: The `clustnode` field of the `Agnodeinfo_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/macros.h b/lib/common/macros.h index cabd7a777..0b244c6ed 100644 --- a/lib/common/macros.h +++ b/lib/common/macros.h @@ -10,6 +10,8 @@ #pragma once +#include + #ifndef NOTUSED #define NOTUSED(var) (void) var #endif @@ -19,7 +21,7 @@ #define isFixed(n) (ND_pinned(n) > P_SET) #define CL_EDGE_TAG "cl_edge_info" -#define SET_CLUST_NODE(n) (ND_clustnode(n) = TRUE) +#define SET_CLUST_NODE(n) (ND_clustnode(n) = true) #define IS_CLUST_NODE(n) (ND_clustnode(n)) #define HAS_CLUST_EDGE(g) (aggetrec(g, CL_EDGE_TAG, FALSE)) #define EDGE_TYPE(g) (GD_flags(g) & (7 << 1)) diff --git a/lib/common/types.h b/lib/common/types.h index f7c5426f6..41ab2f027 100644 --- a/lib/common/types.h +++ b/lib/common/types.h @@ -423,7 +423,7 @@ typedef enum {NATIVEFONTS,PSFONTS,SVGFONTS} fontname_kind; void *alg; char state; unsigned char gui_state; /* Node state for GUI ops */ - boolean clustnode; + bool clustnode; #ifndef DOT_ONLY unsigned char pinned; -- 2.40.0