]> granicus.if.org Git - graphviz/commitdiff
API BREAK: use a C99 bool for 'pccomps' output parameter
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 16 Jan 2022 00:29:57 +0000 (16:29 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 16 Jan 2022 17:48:37 +0000 (09:48 -0800)
CHANGELOG.md
lib/neatogen/neatoinit.c
lib/pack/ccomps.c
lib/pack/pack.h

index 8e662333b8b6b4cd59467adc43643df4991d2f70..113d7836aa477d064d60740be9edcf8f376103a8 100644 (file)
@@ -48,6 +48,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 - **Breaking**: The `fixed` member of the `pack_info` struct is now an array of
   C99 `bool`s instead of an array of Graphviz-specific `boolean`s. Similarly,
   `pack_graph` now takes a `bool` array instead of a `boolean` array.
+- **Breaking**: `pccomps` now takes a C99 `bool` instead of a `boolean` output
+  parameter.
 - **Breaking**: 1-bit fields of the `obj_state_s` struct are now unsigned
   instead of signed.
 - **Breaking**: Graphviz headers no longer define the constant `MAXSHORT`. A
index 2b6d196c58619587a4c6adf5493ab0b0b05b687c..a8c8c57bb9598433d49dcfc108502a22d836b793 100644 (file)
@@ -1450,7 +1450,7 @@ void neato_layout(Agraph_t * g)
            graph_t **cc;
            int n_cc;
            int i;
-           boolean pin;
+           bool pin;
 
            cc = pccomps(g, &n_cc, cc_pfx, &pin);
 
index 0a173b952b8e666246e23edfaab809cc126de2a5..da1bc189402a9e65df24628e49fa23f5681041c4 100644 (file)
@@ -196,7 +196,7 @@ setPrefix (char* pfx, size_t* lenp, char* buf, size_t buflen)
  * be obtained from the root graph.
  * Return NULL on error or if graph is empty.
  */
-Agraph_t **pccomps(Agraph_t * g, int *ncc, char *pfx, boolean * pinned)
+Agraph_t **pccomps(Agraph_t * g, int *ncc, char *pfx, bool *pinned)
 {
     size_t c_cnt = 0;
     char buffer[SMALLBUF];
@@ -275,7 +275,7 @@ packerror:
     else {
        ccs = RALLOC(c_cnt, ccs, Agraph_t *);
        *ncc = (int) c_cnt;
-       *pinned = pin ? TRUE : FALSE;
+       *pinned = pin;
     }
     return ccs;
 }
index 1600266cfa343294168a3670e0cfde7834e15a9b..bd7392ae988e5930b2e05ce8948c766083f079b1 100644 (file)
@@ -84,7 +84,7 @@ typedef unsigned int packval_t;
     PACK_API int isConnected(Agraph_t *);
     PACK_API Agraph_t **ccomps(Agraph_t *, int *, char *);
     PACK_API Agraph_t **cccomps(Agraph_t *, int *, char *);
-    PACK_API Agraph_t **pccomps(Agraph_t *, int *, char *, boolean *);
+    PACK_API Agraph_t **pccomps(Agraph_t *, int *, char *, bool *);
     PACK_API int nodeInduce(Agraph_t *);
     PACK_API Agraph_t *mapClust(Agraph_t *);
 #undef PACK_API