diff options
Diffstat (limited to 'src/H5Gtest.c')
-rw-r--r-- | src/H5Gtest.c | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/src/H5Gtest.c b/src/H5Gtest.c index a68ffae..fc55c98 100644 --- a/src/H5Gtest.c +++ b/src/H5Gtest.c @@ -70,7 +70,7 @@ htri_t H5G__is_empty_test(gid) hid_t gid; IN: group to check RETURNS - TRUE/FALSE on success, FAIL on failure + true/false on success, FAIL on failure DESCRIPTION Checks to see if the group has no link messages and no symbol table message and no "dense" link storage @@ -83,11 +83,11 @@ htri_t H5G__is_empty_test(hid_t gid) { - H5G_t *grp = NULL; /* Pointer to group */ - htri_t msg_exists = FALSE; /* Indicate that a header message is present */ - htri_t linfo_exists = FALSE; /* Indicate that the 'link info' message is present */ - hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ - htri_t ret_value = TRUE; /* Return value */ + H5G_t *grp = NULL; /* Pointer to group */ + htri_t msg_exists = false; /* Indicate that a header message is present */ + htri_t linfo_exists = false; /* Indicate that the 'link info' message is present */ + bool api_ctx_pushed = false; /* Whether API context pushed */ + htri_t ret_value = true; /* Return value */ FUNC_ENTER_PACKAGE @@ -98,7 +98,7 @@ H5G__is_empty_test(hid_t gid) /* Set API context */ if (H5CX_push() < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context"); - api_ctx_pushed = TRUE; + api_ctx_pushed = true; /* "New format" checks */ @@ -112,7 +112,7 @@ H5G__is_empty_test(hid_t gid) if (msg_exists > 0) HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found"); - HGOTO_DONE(FALSE); + HGOTO_DONE(false); } /* end if */ /* Check for a link info message */ @@ -133,15 +133,15 @@ H5G__is_empty_test(hid_t gid) /* Check for 'dense' link storage file addresses being defined */ if (H5_addr_defined(linfo.fheap_addr)) - HGOTO_DONE(FALSE); + HGOTO_DONE(false); if (H5_addr_defined(linfo.name_bt2_addr)) - HGOTO_DONE(FALSE); + HGOTO_DONE(false); if (H5_addr_defined(linfo.corder_bt2_addr)) - HGOTO_DONE(FALSE); + HGOTO_DONE(false); /* Check for link count */ if (linfo.nlinks > 0) - HGOTO_DONE(FALSE); + HGOTO_DONE(false); } /* end if */ /* "Old format" checks */ @@ -171,11 +171,11 @@ H5G__is_empty_test(hid_t gid) /* Check for link count */ if (nlinks > 0) - HGOTO_DONE(FALSE); + HGOTO_DONE(false); } /* end if */ done: - if (api_ctx_pushed && H5CX_pop(FALSE) < 0) + if (api_ctx_pushed && H5CX_pop(false) < 0) HDONE_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "can't reset API context"); FUNC_LEAVE_NOAPI(ret_value) @@ -191,7 +191,7 @@ done: hid_t gid; IN: group to check unsigned *nmsgs; OUT: # of link messages in header RETURNS - TRUE/FALSE on success, FAIL on failure + true/false on success, FAIL on failure DESCRIPTION Checks to see if the group has link messages and how many. GLOBAL VARIABLES @@ -203,10 +203,10 @@ done: htri_t H5G__has_links_test(hid_t gid, unsigned *nmsgs) { - H5G_t *grp = NULL; /* Pointer to group */ - htri_t msg_exists = 0; /* Indicate that a header message is present */ - hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ - htri_t ret_value = TRUE; /* Return value */ + H5G_t *grp = NULL; /* Pointer to group */ + htri_t msg_exists = 0; /* Indicate that a header message is present */ + bool api_ctx_pushed = false; /* Whether API context pushed */ + htri_t ret_value = true; /* Return value */ FUNC_ENTER_PACKAGE @@ -217,13 +217,13 @@ H5G__has_links_test(hid_t gid, unsigned *nmsgs) /* Set API context */ if (H5CX_push() < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context"); - api_ctx_pushed = TRUE; + api_ctx_pushed = true; /* Check if the group has any link messages */ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID)) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header"); if (msg_exists == 0) - HGOTO_DONE(FALSE); + HGOTO_DONE(false); /* Check if the group has a symbol table message */ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0) @@ -242,7 +242,7 @@ H5G__has_links_test(hid_t gid, unsigned *nmsgs) } /* end if */ done: - if (api_ctx_pushed && H5CX_pop(FALSE) < 0) + if (api_ctx_pushed && H5CX_pop(false) < 0) HDONE_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "can't reset API context"); FUNC_LEAVE_NOAPI(ret_value) @@ -257,7 +257,7 @@ done: htri_t H5G__has_stab_test(gid) hid_t gid; IN: group to check RETURNS - TRUE/FALSE on success, FAIL on failure + true/false on success, FAIL on failure DESCRIPTION Checks to see if the group has a symbol table message. GLOBAL VARIABLES @@ -269,10 +269,10 @@ done: htri_t H5G__has_stab_test(hid_t gid) { - H5G_t *grp = NULL; /* Pointer to group */ - htri_t msg_exists = 0; /* Indicate that a header message is present */ - hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ - htri_t ret_value = TRUE; /* Return value */ + H5G_t *grp = NULL; /* Pointer to group */ + htri_t msg_exists = 0; /* Indicate that a header message is present */ + bool api_ctx_pushed = false; /* Whether API context pushed */ + htri_t ret_value = true; /* Return value */ FUNC_ENTER_PACKAGE @@ -283,13 +283,13 @@ H5G__has_stab_test(hid_t gid) /* Set API context */ if (H5CX_push() < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context"); - api_ctx_pushed = TRUE; + api_ctx_pushed = true; /* Check if the group has a symbol table message */ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header"); if (msg_exists == 0) - HGOTO_DONE(FALSE); + HGOTO_DONE(false); /* Check if the group has any link messages */ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID)) < 0) @@ -298,7 +298,7 @@ H5G__has_stab_test(hid_t gid) HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found"); done: - if (api_ctx_pushed && H5CX_pop(FALSE) < 0) + if (api_ctx_pushed && H5CX_pop(false) < 0) HDONE_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "can't reset API context"); FUNC_LEAVE_NOAPI(ret_value) @@ -313,7 +313,7 @@ done: htri_t H5G__is_new_dense_test(gid) hid_t gid; IN: group to check RETURNS - TRUE/FALSE on success, FAIL on failure + true/false on success, FAIL on failure DESCRIPTION Checks to see if the group is in the "new" format for groups (link messages/ fractal heap+v2 B-tree) and if it is in "dense" storage form (ie. it has @@ -327,10 +327,10 @@ done: htri_t H5G__is_new_dense_test(hid_t gid) { - H5G_t *grp = NULL; /* Pointer to group */ - htri_t msg_exists = 0; /* Indicate that a header message is present */ - hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ - htri_t ret_value = TRUE; /* Return value */ + H5G_t *grp = NULL; /* Pointer to group */ + htri_t msg_exists = 0; /* Indicate that a header message is present */ + bool api_ctx_pushed = false; /* Whether API context pushed */ + htri_t ret_value = true; /* Return value */ FUNC_ENTER_PACKAGE @@ -341,19 +341,19 @@ H5G__is_new_dense_test(hid_t gid) /* Set API context */ if (H5CX_push() < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context"); - api_ctx_pushed = TRUE; + api_ctx_pushed = true; /* Check if the group has a symbol table message */ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header"); if (msg_exists > 0) - HGOTO_DONE(FALSE); + HGOTO_DONE(false); /* Check if the group has any link messages */ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID)) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header"); if (msg_exists > 0) - HGOTO_DONE(FALSE); + HGOTO_DONE(false); /* Check if the group has link info message */ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINFO_ID)) < 0) @@ -367,13 +367,13 @@ H5G__is_new_dense_test(hid_t gid) /* Check for 'dense' link storage file addresses being defined */ if (!H5_addr_defined(linfo.fheap_addr)) - HGOTO_DONE(FALSE); + HGOTO_DONE(false); if (!H5_addr_defined(linfo.name_bt2_addr)) - HGOTO_DONE(FALSE); + HGOTO_DONE(false); } /* end if */ done: - if (api_ctx_pushed && H5CX_pop(FALSE) < 0) + if (api_ctx_pushed && H5CX_pop(false) < 0) HDONE_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "can't reset API context"); FUNC_LEAVE_NOAPI(ret_value) @@ -407,7 +407,7 @@ H5G__new_dense_info_test(hid_t gid, hsize_t *name_count, hsize_t *corder_count) H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */ H5O_linfo_t linfo; /* Link info message */ H5G_t *grp = NULL; /* Pointer to group */ - 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 @@ -419,7 +419,7 @@ H5G__new_dense_info_test(hid_t gid, hsize_t *name_count, hsize_t *corder_count) /* Set API context */ if (H5CX_push() < 0) HGOTO_ERROR(H5E_SYM, 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(grp->oloc.addr) @@ -466,7 +466,7 @@ done: HDONE_ERROR(H5E_SYM, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index"); if (bt2_corder && H5B2_close(bt2_corder) < 0) HDONE_ERROR(H5E_SYM, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for creation order index"); - if (api_ctx_pushed && H5CX_pop(FALSE) < 0) + if (api_ctx_pushed && H5CX_pop(false) < 0) HDONE_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "can't reset API context"); FUNC_LEAVE_NOAPI(ret_value) @@ -496,7 +496,7 @@ H5G__lheap_size_test(hid_t gid, size_t *lheap_size) { H5G_t *grp = NULL; /* Pointer to group */ H5O_stab_t stab; /* Symbol table 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 @@ -508,7 +508,7 @@ H5G__lheap_size_test(hid_t gid, size_t *lheap_size) /* Set API context */ if (H5CX_push() < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context"); - api_ctx_pushed = TRUE; + api_ctx_pushed = true; /* Make certain the group has a symbol table message */ if (NULL == H5O_msg_read(&(grp->oloc), H5O_STAB_ID, &stab)) @@ -519,7 +519,7 @@ H5G__lheap_size_test(hid_t gid, size_t *lheap_size) HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't query local heap size"); done: - if (api_ctx_pushed && H5CX_pop(FALSE) < 0) + if (api_ctx_pushed && H5CX_pop(false) < 0) HDONE_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "can't reset API context"); FUNC_LEAVE_NOAPI(ret_value) @@ -552,7 +552,7 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign { void *obj_ptr; /* Pointer to object for ID */ const H5G_name_t *obj_path; /* Pointer to group hier. path for obj */ - 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 @@ -568,7 +568,7 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign /* Set API context */ if (H5CX_push() < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context"); - api_ctx_pushed = TRUE; + api_ctx_pushed = true; /* Get the symbol table entry */ switch (H5I_get_type(obj_id)) { @@ -631,7 +631,7 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign } /* end else */ done: - if (api_ctx_pushed && H5CX_pop(FALSE) < 0) + if (api_ctx_pushed && H5CX_pop(false) < 0) HDONE_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "can't reset API context"); FUNC_LEAVE_NOAPI(ret_value) @@ -726,7 +726,7 @@ H5G__verify_cached_stabs_test_cb(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, h * the cached stab (if present). If one exists, both must exist. */ /* Initialize constant fields in target oloc */ targ_oloc.file = f; - targ_oloc.holding_file = FALSE; + targ_oloc.holding_file = false; /* Iterate over entries */ for (i = 0; i < sn->nsyms; i++) { @@ -734,7 +734,7 @@ H5G__verify_cached_stabs_test_cb(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, h targ_oloc.addr = sn->entry[i].header; /* Load target object header */ - if (NULL == (targ_oh = H5O_protect(&targ_oloc, H5AC__READ_ONLY_FLAG, FALSE))) + if (NULL == (targ_oh = H5O_protect(&targ_oloc, H5AC__READ_ONLY_FLAG, false))) HGOTO_ERROR(H5E_SYM, H5E_CANTPROTECT, H5_ITER_ERROR, "unable to protect target object header"); /* Check if a symbol table message exists */ |