summaryrefslogtreecommitdiffstats
path: root/src/H5O.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/H5O.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/H5O.c')
-rw-r--r--src/H5O.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/H5O.c b/src/H5O.c
index fc92a61..13447db 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -111,7 +111,7 @@ H5O__open_api_common(hid_t loc_id, const char *name, hid_t lapl_id, void **token
/* name is checked in this H5VL_setup_name_args() */
/* Set up object access arguments */
- if (H5VL_setup_name_args(loc_id, name, FALSE, lapl_id, vol_obj_ptr, &loc_params) < 0)
+ if (H5VL_setup_name_args(loc_id, name, false, lapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments");
/* Open the object */
@@ -120,7 +120,7 @@ H5O__open_api_common(hid_t loc_id, const char *name, hid_t lapl_id, void **token
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object");
/* Get an atom for the object */
- if ((ret_value = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, true)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize object handle");
done:
@@ -235,7 +235,7 @@ H5O__open_by_idx_api_common(hid_t loc_id, const char *group_name, H5_index_t idx
/* Check args */
/* group_name, idx_type, order are checked in H5VL_setup_idx-args() */
/* Set up object access arguments */
- if (H5VL_setup_idx_args(loc_id, group_name, idx_type, order, n, FALSE, lapl_id, vol_obj_ptr,
+ if (H5VL_setup_idx_args(loc_id, group_name, idx_type, order, n, false, lapl_id, vol_obj_ptr,
&loc_params) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments");
@@ -245,7 +245,7 @@ H5O__open_by_idx_api_common(hid_t loc_id, const char *group_name, H5_index_t idx
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object");
/* Get an ID for the object */
- if ((ret_value = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, true)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle");
done:
@@ -383,7 +383,7 @@ H5Oopen_by_token(hid_t loc_id, H5O_token_t token)
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object");
/* Register the object's ID */
- if ((ret_value = H5VL_register(opened_type, opened_obj, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(opened_type, opened_obj, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle");
done:
@@ -426,13 +426,13 @@ H5O__copy_api_common(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, c
/* Get correct property lists */
if (H5P_DEFAULT == lcpl_id)
lcpl_id = H5P_LINK_CREATE_DEFAULT;
- else if (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))
+ else if (true != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link creation property list");
/* Get object copy property list */
if (H5P_DEFAULT == ocpypl_id)
ocpypl_id = H5P_OBJECT_COPY_DEFAULT;
- else if (TRUE != H5P_isa_class(ocpypl_id, H5P_OBJECT_COPY))
+ else if (true != H5P_isa_class(ocpypl_id, H5P_OBJECT_COPY))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not object copy property list");
/* Set the LCPL for the API context */
@@ -840,7 +840,7 @@ H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, hid
if (HDstrlen(new_name) > H5L_MAX_LINK_NAME_LEN)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "name too long");
#endif /* H5_SIZEOF_SIZE_T > H5_SIZEOF_INT32_T */
- if (lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
+ if (lcpl_id != H5P_DEFAULT && (true != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list");
/* Get the link creation property list */
@@ -851,7 +851,7 @@ H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, hid
H5CX_set_lcpl(lcpl_id);
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, obj_id, TRUE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, obj_id, true) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Set up new location struct */
@@ -1008,7 +1008,7 @@ done:
*
* Purpose: Determine if a linked-to object exists
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: FAIL
*
*-------------------------------------------------------------------------
@@ -1019,7 +1019,7 @@ H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id)
H5VL_object_t *vol_obj; /* Object of loc_id */
H5VL_object_specific_args_t vol_cb_args; /* Arguments to VOL callback */
H5VL_loc_params_t loc_params; /* Location parameters for object access */
- hbool_t obj_exists = FALSE; /* Whether object exists */
+ bool obj_exists = false; /* Whether object exists */
htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1032,7 +1032,7 @@ H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Get the location object */
@@ -1139,7 +1139,7 @@ H5O__get_info_by_name_api_common(hid_t loc_id, const char *name, H5O_info2_t *oi
/* "name" is checked in H5VL_setup_name_args() */
/* Set up object access arguments */
- if (H5VL_setup_name_args(loc_id, name, FALSE, lapl_id, vol_obj_ptr, &loc_params) < 0)
+ if (H5VL_setup_name_args(loc_id, name, false, lapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set object access arguments");
/* Set up VOL callback arguments */
@@ -1260,7 +1260,7 @@ H5Oget_info_by_idx3(hid_t loc_id, const char *group_name, H5_index_t idx_type, H
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Set location struct fields */
@@ -1372,7 +1372,7 @@ H5Oget_native_info_by_name(hid_t loc_id, const char *name, H5O_native_info_t *oi
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Fill out location struct */
@@ -1437,7 +1437,7 @@ H5Oget_native_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_t
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Set location struct fields */
@@ -1551,7 +1551,7 @@ H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment, hid_
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, TRUE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, true) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Fill in location struct fields */
@@ -1662,7 +1662,7 @@ H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment /*out*/, si
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "no name");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, (-1), "can't set access property list info");
/* Fill in location struct fields */
@@ -1832,7 +1832,7 @@ H5Ovisit_by_name3(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_it
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields");
/* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info");
/* Get the location object */
@@ -1868,14 +1868,14 @@ done:
* Purpose: This is the common function to validate an object
* before closing it.
*
- * Return: TRUE/FALSE/FAIL
+ * Return: true/false/FAIL
*
*-------------------------------------------------------------------------
*/
static htri_t
H5O__close_check_type(hid_t object_id)
{
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1905,7 +1905,7 @@ H5O__close_check_type(hid_t object_id)
case H5I_EVENTSET:
case H5I_NTYPES:
default:
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
break;
} /* end switch */
@@ -2053,7 +2053,7 @@ H5Odisable_mdc_flushes(hid_t object_id)
H5TRACE1("e", "i", object_id);
/* Make sure the ID is a file object */
- if (H5I_is_file_object(object_id) != TRUE)
+ if (H5I_is_file_object(object_id) != true)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID is not a file object");
/* Get the VOL object */
@@ -2123,7 +2123,7 @@ H5Oenable_mdc_flushes(hid_t object_id)
H5TRACE1("e", "i", object_id);
/* Make sure the ID is a file object */
- if (H5I_is_file_object(object_id) != TRUE)
+ if (H5I_is_file_object(object_id) != true)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID is not a file object");
/* Get the VOL object */
@@ -2176,8 +2176,8 @@ done:
* Function: H5Oare_mdc_flushes_disabled
*
* Purpose: Retrieve the object's "cork" status in the parameter "are_disabled":
- * TRUE if mdc flushes for the object is disabled
- * FALSE if mdc flushes for the object is not disabled
+ * true if mdc flushes for the object is disabled
+ * false if mdc flushes for the object is not disabled
*
* Return error if the parameter "are_disabled" is not supplied
*
@@ -2187,7 +2187,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Oare_mdc_flushes_disabled(hid_t object_id, hbool_t *are_disabled)
+H5Oare_mdc_flushes_disabled(hid_t object_id, bool *are_disabled)
{
H5VL_object_t *vol_obj; /* Object of loc_id */
H5VL_optional_args_t vol_cb_args; /* Arguments to VOL callback */
@@ -2196,14 +2196,14 @@ H5Oare_mdc_flushes_disabled(hid_t object_id, hbool_t *are_disabled)
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE2("e", "i*b", object_id, are_disabled);
+ H5TRACE2("e", "i*!", object_id, are_disabled);
/* Sanity check */
if (!are_disabled)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location from ID");
/* Make sure the ID is a file object */
- if (H5I_is_file_object(object_id) != TRUE)
+ if (H5I_is_file_object(object_id) != true)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID is not a file object");
/* Get the VOL object */