summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-09-05 21:52:30 (GMT)
committerGitHub <noreply@github.com>2023-09-05 21:52:30 (GMT)
commit8253ab9ebf6a082dc07eb931f27b169d6a45d577 (patch)
tree47630856491e54f5d28e1608ffa5e2f976dc9c95 /src/H5F.c
parent920869796031ed4ee9c1fbea8aaccda3592a88b3 (diff)
downloadhdf5-8253ab9ebf6a082dc07eb931f27b169d6a45d577.zip
hdf5-8253ab9ebf6a082dc07eb931f27b169d6a45d577.tar.gz
hdf5-8253ab9ebf6a082dc07eb931f27b169d6a45d577.tar.bz2
Convert hbool_t --> bool in src (#3496)
* hbool_t --> bool in src * Does not remove TRUE/FALSE * Public header files are unchanged * Public API calls are unchanged * TRUE/FALSE --> true/false in src * Add deprecation notice for hbool_t
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 692331e..e64782f 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -268,19 +268,19 @@ H5Fget_obj_count(hid_t file_id, unsigned types)
udata.obj_count = 0;
if (types & H5F_OBJ_FILE)
- if (H5I_iterate(H5I_FILE, H5F__get_all_count_cb, &udata, TRUE) < 0)
+ if (H5I_iterate(H5I_FILE, H5F__get_all_count_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over file IDs failed");
if (types & H5F_OBJ_DATASET)
- if (H5I_iterate(H5I_DATASET, H5F__get_all_count_cb, &udata, TRUE) < 0)
+ if (H5I_iterate(H5I_DATASET, H5F__get_all_count_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over dataset IDs failed");
if (types & H5F_OBJ_GROUP)
- if (H5I_iterate(H5I_GROUP, H5F__get_all_count_cb, &udata, TRUE) < 0)
+ if (H5I_iterate(H5I_GROUP, H5F__get_all_count_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over group IDs failed");
if (types & H5F_OBJ_DATATYPE)
- if (H5I_iterate(H5I_DATATYPE, H5F__get_all_count_cb, &udata, TRUE) < 0)
+ if (H5I_iterate(H5I_DATATYPE, H5F__get_all_count_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over datatype IDs failed");
if (types & H5F_OBJ_ATTR)
- if (H5I_iterate(H5I_ATTR, H5F__get_all_count_cb, &udata, TRUE) < 0)
+ if (H5I_iterate(H5I_ATTR, H5F__get_all_count_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over attribute IDs failed");
/* Set return value */
@@ -395,19 +395,19 @@ H5Fget_obj_ids(hid_t file_id, unsigned types, size_t max_objs, hid_t *oid_list /
udata.obj_count = 0;
if (types & H5F_OBJ_FILE)
- if (H5I_iterate(H5I_FILE, H5F__get_all_ids_cb, &udata, TRUE) < 0)
+ if (H5I_iterate(H5I_FILE, H5F__get_all_ids_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over file IDs failed");
if (types & H5F_OBJ_DATASET)
- if (H5I_iterate(H5I_DATASET, H5F__get_all_ids_cb, &udata, TRUE) < 0)
+ if (H5I_iterate(H5I_DATASET, H5F__get_all_ids_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over dataset IDs failed");
if (types & H5F_OBJ_GROUP)
- if (H5I_iterate(H5I_GROUP, H5F__get_all_ids_cb, &udata, TRUE) < 0)
+ if (H5I_iterate(H5I_GROUP, H5F__get_all_ids_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over group IDs failed");
if (types & H5F_OBJ_DATATYPE)
- if (H5I_iterate(H5I_DATATYPE, H5F__get_all_ids_cb, &udata, TRUE) < 0)
+ if (H5I_iterate(H5I_DATATYPE, H5F__get_all_ids_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over datatype IDs failed");
if (types & H5F_OBJ_ATTR)
- if (H5I_iterate(H5I_ATTR, H5F__get_all_ids_cb, &udata, TRUE) < 0)
+ if (H5I_iterate(H5I_ATTR, H5F__get_all_ids_cb, &udata, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over attribute IDs failed");
/* Set return value */
@@ -466,7 +466,7 @@ done:
*
* Purpose: Check if the file can be opened with the given fapl.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: -1 (includes file does not exist)
*
*-------------------------------------------------------------------------
@@ -475,7 +475,7 @@ htri_t
H5Fis_accessible(const char *filename, hid_t fapl_id)
{
H5VL_file_specific_args_t vol_cb_args; /* Arguments to VOL callback */
- hbool_t is_accessible = FALSE; /* Whether file is accessible */
+ bool is_accessible = false; /* Whether file is accessible */
htri_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -488,7 +488,7 @@ H5Fis_accessible(const char *filename, hid_t fapl_id)
/* Check the file access property list */
if (H5P_DEFAULT == fapl_id)
fapl_id = H5P_FILE_ACCESS_DEFAULT;
- else if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
+ else if (true != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not file access property list");
/* Set up VOL callback arguments */
@@ -581,11 +581,11 @@ H5F__create_api_common(const char *filename, unsigned flags, hid_t fcpl_id, hid_
/* Check file creation property list */
if (H5P_DEFAULT == fcpl_id)
fcpl_id = H5P_FILE_CREATE_DEFAULT;
- else if (TRUE != H5P_isa_class(fcpl_id, H5P_FILE_CREATE))
+ else if (true != H5P_isa_class(fcpl_id, H5P_FILE_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not file create property list");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0)
+ if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info");
/* Get the VOL info from the fapl */
@@ -614,7 +614,7 @@ H5F__create_api_common(const char *filename, unsigned flags, hid_t fcpl_id, hid_
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to create file");
/* Get an ID for the file */
- if ((ret_value = H5VL_register_using_vol_id(H5I_FILE, new_file, connector_prop.connector_id, TRUE)) < 0)
+ if ((ret_value = H5VL_register_using_vol_id(H5I_FILE, new_file, connector_prop.connector_id, true)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle");
done:
@@ -775,7 +775,7 @@ H5F__open_api_common(const char *filename, unsigned flags, hid_t fapl_id, void *
"SWMR read access on a file open for read-write access is not allowed");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0)
+ if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info");
/* Get the VOL info from the fapl */
@@ -796,7 +796,7 @@ H5F__open_api_common(const char *filename, unsigned flags, hid_t fapl_id, void *
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to open file");
/* Get an ID for the file */
- if ((ret_value = H5VL_register_using_vol_id(H5I_FILE, new_file, connector_prop.connector_id, TRUE)) < 0)
+ if ((ret_value = H5VL_register_using_vol_id(H5I_FILE, new_file, connector_prop.connector_id, true)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle");
done:
@@ -1139,7 +1139,7 @@ H5Fdelete(const char *filename, hid_t fapl_id)
H5P_genplist_t *plist; /* Property list pointer */
H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
H5VL_file_specific_args_t vol_cb_args; /* Arguments to VOL callback */
- hbool_t is_accessible = FALSE; /* Whether file is accessible */
+ bool is_accessible = false; /* Whether file is accessible */
herr_t ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
@@ -1150,7 +1150,7 @@ H5Fdelete(const char *filename, hid_t fapl_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "no file name specified");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0)
+ if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, true) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set access property list info");
/* Get the VOL info from the fapl */
@@ -1226,7 +1226,7 @@ H5Fmount(hid_t loc_id, const char *name, hid_t child_id, hid_t plist_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "child_id parameter not a file ID");
if (H5P_DEFAULT == plist_id)
plist_id = H5P_FILE_MOUNT_DEFAULT;
- else if (TRUE != H5P_isa_class(plist_id, H5P_FILE_MOUNT))
+ else if (true != H5P_isa_class(plist_id, H5P_FILE_MOUNT))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "plist_id is not a file mount property list ID");
/* Set up collective metadata if appropriate */
@@ -1437,7 +1437,7 @@ H5F__reopen_api_common(hid_t file_id, void **token_ptr)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "unable to reopen file");
/* Get an ID for the file */
- if ((ret_value = H5VL_register(H5I_FILE, reopen_file, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_FILE, reopen_file, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle");
done: