diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-09-05 21:52:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-05 21:52:30 (GMT) |
commit | 8253ab9ebf6a082dc07eb931f27b169d6a45d577 (patch) | |
tree | 47630856491e54f5d28e1608ffa5e2f976dc9c95 /src/H5Otest.c | |
parent | 920869796031ed4ee9c1fbea8aaccda3592a88b3 (diff) | |
download | hdf5-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/H5Otest.c')
-rw-r--r-- | src/H5Otest.c | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/src/H5Otest.c b/src/H5Otest.c index c646f42..2c23f0c 100644 --- a/src/H5Otest.c +++ b/src/H5Otest.c @@ -70,7 +70,7 @@ htri_t H5O__is_attr_dense_test(oid) hid_t oid; IN: object to check RETURNS - Non-negative TRUE/FALSE on success, negative on failure + Non-negative true/false on success, negative on failure DESCRIPTION Checks to see if the object is storing attributes in the "dense" or "compact" form. @@ -86,7 +86,7 @@ H5O__is_attr_dense_test(hid_t oid) H5O_t *oh = NULL; /* Object header */ H5O_ainfo_t ainfo; /* Attribute information for object */ H5O_loc_t *loc; /* Pointer to object's location */ - hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ + bool api_ctx_pushed = false; /* Whether API context pushed */ htri_t ret_value = FAIL; /* Return value */ FUNC_ENTER_PACKAGE @@ -98,10 +98,10 @@ H5O__is_attr_dense_test(hid_t oid) /* Set API context */ if (H5CX_push() < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context"); - api_ctx_pushed = TRUE; + api_ctx_pushed = true; /* Get the object header */ - if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) + if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Check for attribute info stored */ @@ -117,15 +117,15 @@ H5O__is_attr_dense_test(hid_t oid) /* Check for any messages in object header */ assert(H5O__msg_count_real(oh, H5O_MSG_ATTR) == 0); - ret_value = TRUE; + ret_value = true; } /* end if */ else - ret_value = FALSE; + ret_value = false; done: if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header"); - if (api_ctx_pushed && H5CX_pop(FALSE) < 0) + if (api_ctx_pushed && H5CX_pop(false) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context"); FUNC_LEAVE_NOAPI(ret_value) @@ -140,7 +140,7 @@ done: htri_t H5O__is_attr_empty_test(oid) hid_t oid; IN: object to check RETURNS - Non-negative TRUE/FALSE on success, negative on failure + Non-negative true/false on success, negative on failure DESCRIPTION Checks to see if the object is storing any attributes. GLOBAL VARIABLES @@ -155,10 +155,10 @@ H5O__is_attr_empty_test(hid_t oid) H5O_t *oh = NULL; /* Object header */ H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */ H5O_ainfo_t ainfo; /* Attribute information for object */ - htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */ + htri_t ainfo_exists = false; /* Whether the attribute info exists in the file */ H5O_loc_t *loc; /* Pointer to object's location */ hsize_t nattrs; /* Number of attributes */ - hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ + bool api_ctx_pushed = false; /* Whether API context pushed */ htri_t ret_value = FAIL; /* Return value */ FUNC_ENTER_PACKAGE @@ -170,10 +170,10 @@ H5O__is_attr_empty_test(hid_t oid) /* Set API context */ if (H5CX_push() < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context"); - api_ctx_pushed = TRUE; + api_ctx_pushed = true; /* Get the object header */ - if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) + if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Check for attribute info stored */ @@ -219,7 +219,7 @@ H5O__is_attr_empty_test(hid_t oid) } /* end if */ /* Set the return value */ - ret_value = (nattrs == 0) ? TRUE : FALSE; + ret_value = (nattrs == 0) ? true : false; done: /* Release resources */ @@ -227,7 +227,7 @@ done: HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index"); if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header"); - if (api_ctx_pushed && H5CX_pop(FALSE) < 0) + if (api_ctx_pushed && H5CX_pop(false) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context"); FUNC_LEAVE_NOAPI(ret_value) @@ -260,7 +260,7 @@ H5O__num_attrs_test(hid_t oid, hsize_t *nattrs) H5O_ainfo_t ainfo; /* Attribute information for object */ H5O_loc_t *loc; /* Pointer to object's location */ hsize_t obj_nattrs; /* Number of attributes */ - hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ + bool api_ctx_pushed = false; /* Whether API context pushed */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -272,10 +272,10 @@ H5O__num_attrs_test(hid_t oid, hsize_t *nattrs) /* Set API context */ if (H5CX_push() < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context"); - api_ctx_pushed = TRUE; + api_ctx_pushed = true; /* Get the object header */ - if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) + if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Check for attribute info stored */ @@ -324,7 +324,7 @@ done: HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index"); if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header"); - if (api_ctx_pushed && H5CX_pop(FALSE) < 0) + if (api_ctx_pushed && H5CX_pop(false) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context"); FUNC_LEAVE_NOAPI(ret_value) @@ -359,7 +359,7 @@ H5O__attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count) H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */ H5O_ainfo_t ainfo; /* Attribute information for object */ H5O_loc_t *loc; /* Pointer to object's location */ - hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ + bool api_ctx_pushed = false; /* Whether API context pushed */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -371,13 +371,13 @@ H5O__attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count) /* Set API context */ if (H5CX_push() < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context"); - api_ctx_pushed = TRUE; + api_ctx_pushed = true; /* Set metadata tag in API context */ H5_BEGIN_TAG(loc->addr) /* Get the object header */ - if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) + if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false))) HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Check for attribute info stored */ @@ -428,7 +428,7 @@ done: HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for creation order index"); if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header"); - if (api_ctx_pushed && H5CX_pop(FALSE) < 0) + if (api_ctx_pushed && H5CX_pop(false) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context"); FUNC_LEAVE_NOAPI(ret_value) @@ -443,7 +443,7 @@ done: USAGE herr_t H5O__check_msg_marked_test(oid, flag_val) hid_t oid; IN: Object to check - hbool_t flag_val; IN: Desired flag value + bool flag_val; IN: Desired flag value RETURNS Non-negative on success, negative on failure DESCRIPTION @@ -456,7 +456,7 @@ done: REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5O__check_msg_marked_test(hid_t oid, hbool_t flag_val) +H5O__check_msg_marked_test(hid_t oid, bool flag_val) { H5O_t *oh = NULL; /* Object header */ H5O_loc_t *loc; /* Pointer to object's location */ @@ -471,7 +471,7 @@ H5O__check_msg_marked_test(hid_t oid, hbool_t flag_val) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found"); /* Get the object header */ - if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) + if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Locate "unknown" message */ @@ -528,7 +528,7 @@ H5O__expunge_chunks_test(const H5O_loc_t *loc) FUNC_ENTER_PACKAGE /* Get the object header */ - if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, FALSE))) + if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, false))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header"); /* Safety check */ @@ -587,7 +587,7 @@ H5O__get_rc_test(const H5O_loc_t *loc, unsigned *rc) assert(rc); /* Get the object header */ - if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) + if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header"); /* Save the refcount for the object header */ @@ -629,7 +629,7 @@ H5O__msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num) H5O_loc_t *loc; /* Pointer to object's location */ H5O_mesg_t *idx_msg; /* Pointer to message */ unsigned idx; /* Index of message */ - hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ + bool api_ctx_pushed = false; /* Whether API context pushed */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -641,10 +641,10 @@ H5O__msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num) /* Set API context */ if (H5CX_push() < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context"); - api_ctx_pushed = TRUE; + api_ctx_pushed = true; /* Get the object header */ - if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) + if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, false))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Locate first message of given type */ @@ -664,7 +664,7 @@ H5O__msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num) done: if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header"); - if (api_ctx_pushed && H5CX_pop(FALSE) < 0) + if (api_ctx_pushed && H5CX_pop(false) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context"); FUNC_LEAVE_NOAPI(ret_value) @@ -696,7 +696,7 @@ H5O__msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type) H5O_loc_t *loc; /* Pointer to object's location */ H5O_mesg_t *curr_msg; /* Pointer to current message */ unsigned idx; /* Index of message */ - hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ + bool api_ctx_pushed = false; /* Whether API context pushed */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -708,10 +708,10 @@ H5O__msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type) /* Set API context */ if (H5CX_push() < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context"); - api_ctx_pushed = TRUE; + api_ctx_pushed = true; /* Get the object header */ - if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, FALSE))) + if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, false))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Locate first message of given type */ @@ -775,7 +775,7 @@ H5O__msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type) done: if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header"); - if (api_ctx_pushed && H5CX_pop(FALSE) < 0) + if (api_ctx_pushed && H5CX_pop(false) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context"); FUNC_LEAVE_NOAPI(ret_value) |