]> granicus.if.org Git - graphviz/commitdiff
API BREAK: use a C99 bool for 'Agnodeinfo_t.has_port'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 15 Jan 2022 23:26:06 +0000 (15:26 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 16 Jan 2022 17:46:33 +0000 (09:46 -0800)
CHANGELOG.md
lib/common/types.h
lib/common/utils.c
lib/dotgen/sameport.c

index 301981e005015254d1b778f43b74227113fd8d72..1b949cf0fac2501f28879be6abc7c13ad5940daa 100644 (file)
@@ -31,8 +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**: The `clustnode` and `has_port` fields of the `Agnodeinfo_t`
+  struct are now C99 `bool`s instead of Graphviz-specific `boolean`s.
 - **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 41ab2f027889484238e719d1f2bf3218c2ac1e9b..eeebeb8f8b28afc468c76643f0973df1ae00adae 100644 (file)
@@ -435,7 +435,7 @@ typedef enum {NATIVEFONTS,PSFONTS,SVGFONTS} fontname_kind;
 #endif
 #ifndef NEATO_ONLY
        unsigned char showboxes;
-       boolean  has_port;
+       bool  has_port;
        node_t* rep;
        node_t *set;
 
index ead7b019d30e180dbc61fc3410fffd84159cfcbe..d0f4ba3e9218dde8510b4cc72a3b419488ad3396 100644 (file)
@@ -739,7 +739,7 @@ int common_init_edge(edge_t * e)
     /* libgraph always defines tailport/headport; libcgraph doesn't */
     if (!str) str = "";
     if (str && str[0])
-       ND_has_port(agtail(e)) = TRUE;
+       ND_has_port(agtail(e)) = true;
     ED_tail_port(e) = chkPort (ND_shape(agtail(e))->fns->portfn, agtail(e), str);
     if (noClip(e, E_tailclip))
        ED_tail_port(e).clip = false;
@@ -747,7 +747,7 @@ int common_init_edge(edge_t * e)
     /* libgraph always defines tailport/headport; libcgraph doesn't */
     if (!str) str = "";
     if (str && str[0])
-       ND_has_port(aghead(e)) = TRUE;
+       ND_has_port(aghead(e)) = true;
     ED_head_port(e) = chkPort(ND_shape(aghead(e))->fns->portfn, aghead(e), str);
     if (noClip(e, E_headclip))
        ED_head_port(e).clip = false;
index 9a0da0fc88319845a015616d15e091abf9f3aa36..a1201408262f32052520cacc620bef376127b67a 100644 (file)
@@ -202,5 +202,5 @@ static void sameport(node_t * u, elist * l)
        }
     }
 
-    ND_has_port(u) = TRUE;     /* kinda pointless, because mincross is already done */
+    ND_has_port(u) = true;     /* kinda pointless, because mincross is already done */
 }