]> granicus.if.org Git - graphviz/commitdiff
API BREAK: return a C99 bool from 'gvusershape_file_access'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 16 Jan 2022 00:31:42 +0000 (16:31 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 16 Jan 2022 17:48:40 +0000 (09:48 -0800)
CHANGELOG.md
lib/gvc/gvplugin_loadimage.h
lib/gvc/gvusershape.c

index 113d7836aa477d064d60740be9edcf8f376103a8..678e5719200791bba09d48ebe2e7bc4f214e96ac 100644 (file)
@@ -50,6 +50,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
   `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**: `gvusershape_file_access` now returns a C99 `bool` instead of a
+  Graphviz-specific `boolean`.
 - **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 4f496e2832c5cbe9bef08e1e936edafc624f2863..ed81a82afb7dec8f4552edc9d61de49ace3de724 100644 (file)
@@ -31,7 +31,7 @@ extern "C" {
 #define GVPLUGIN_LOADIMAGE_API /* nothing */
 #endif
 
-GVPLUGIN_LOADIMAGE_API boolean gvusershape_file_access(usershape_t *us);
+GVPLUGIN_LOADIMAGE_API bool gvusershape_file_access(usershape_t *us);
 GVPLUGIN_LOADIMAGE_API void gvusershape_file_release(usershape_t *us);
 
     struct gvloadimage_engine_s {
index ee06dd6d1ac1b2438125c570570e801d2b641828..aaf3c8c49e2e05e72788ff941e65b0e45918f058 100644 (file)
@@ -586,7 +586,7 @@ usershape_t *gvusershape_find(const char *name)
 }
 
 #define MAX_USERSHAPE_FILES_OPEN 50
-boolean gvusershape_file_access(usershape_t *us)
+bool gvusershape_file_access(usershape_t *us)
 {
     static int usershape_files_open_cnt;
     const char *fn;
@@ -600,12 +600,12 @@ boolean gvusershape_file_access(usershape_t *us)
     else {
         if (! (fn = safefile(us->name))) {
            agerr(AGWARN, "Filename \"%s\" is unsafe\n", us->name);
-           return FALSE;
+           return false;
        }
        us->f = fopen(fn, "rb");
        if (us->f == NULL) {
            agerr(AGWARN, "%s while opening %s\n", strerror(errno), fn);
-           return FALSE;
+           return false;
        }
        if (usershape_files_open_cnt >= MAX_USERSHAPE_FILES_OPEN)
            us->nocache = true;
@@ -613,7 +613,7 @@ boolean gvusershape_file_access(usershape_t *us)
            usershape_files_open_cnt++;
     }
     assert(us->f);
-    return TRUE;
+    return true;
 }
 
 void gvusershape_file_release(usershape_t *us)