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/H5Aint.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/H5Aint.c')
-rw-r--r-- | src/H5Aint.c | 147 |
1 files changed, 73 insertions, 74 deletions
diff --git a/src/H5Aint.c b/src/H5Aint.c index b68be48..f9f74c3 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -53,7 +53,7 @@ typedef struct { H5F_t *f; /* Pointer to file that fractal heap is in */ H5A_attr_table_t *atable; /* Pointer to attribute table to build */ size_t curr_attr; /* Current attribute to operate on */ - hbool_t bogus_crt_idx; /* Whether bogus creation index values need to be set */ + bool bogus_crt_idx; /* Whether bogus creation index values need to be set */ } H5A_compact_bt_ud_t; /* Data exchange structure to use when building table of dense attributes for an object */ @@ -66,7 +66,7 @@ typedef struct { typedef struct { const H5O_ainfo_t *ainfo; /* dense information */ H5F_t *file; /* file */ - hbool_t *recompute_size; /* Flag to indicate if size changed */ + bool *recompute_size; /* Flag to indicate if size changed */ H5O_copy_t *cpy_info; /* Information on copying options */ const H5O_loc_t *oloc_src; H5O_loc_t *oloc_dst; @@ -186,7 +186,7 @@ H5A_top_term_package(void) FUNC_ENTER_NOAPI_NOINIT_NOERR if (H5I_nmembers(H5I_ATTR) > 0) { - (void)H5I_clear_type(H5I_ATTR, FALSE, FALSE); + (void)H5I_clear_type(H5I_ATTR, false, false); n++; /*H5I*/ } /* end if */ @@ -243,7 +243,7 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons H5A_t *attr = NULL; /* Attribute created */ hssize_t snelmts; /* elements in attribute */ size_t nelmts; /* elements in attribute */ - hbool_t exists; /* Whether attribute exists */ + bool exists; /* Whether attribute exists */ H5A_t *ret_value = NULL; /* Return value */ FUNC_ENTER_PACKAGE_TAG(loc->oloc->addr) @@ -259,7 +259,7 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons * name, but it's going to be hard to unwind all the special cases on * failure, so just check first, for now - QAK) */ - exists = FALSE; + exists = false; if (H5O__attr_exists(loc->oloc, attr_name, &exists) < 0) HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "error checking attributes"); if (exists) @@ -270,7 +270,7 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons HGOTO_ERROR(H5E_ATTR, H5E_BADVALUE, NULL, "dataspace extent has not been set"); /* Check if the datatype is "sensible" for use in a dataset */ - if (H5T_is_sensible(type) != TRUE) + if (H5T_is_sensible(type) != true) HGOTO_ERROR(H5E_ATTR, H5E_BADTYPE, NULL, "datatype is not sensible"); /* Build the attribute information */ @@ -316,7 +316,7 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set version of datatype"); /* Copy the dataspace for the attribute */ - attr->shared->ds = H5S_copy(space, FALSE, TRUE); + attr->shared->ds = H5S_copy(space, false, true); /* Set the version for dataspace */ if (H5S_set_version(loc->oloc->file, attr->shared->ds) < 0) @@ -351,8 +351,8 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons * datatype and dataspace messages themselves, or the size of the "shared" * messages if either or both of them are shared. */ - attr->shared->dt_size = H5O_msg_raw_size(attr->oloc.file, H5O_DTYPE_ID, FALSE, attr->shared->dt); - attr->shared->ds_size = H5O_msg_raw_size(attr->oloc.file, H5O_SDSPACE_ID, FALSE, attr->shared->ds); + attr->shared->dt_size = H5O_msg_raw_size(attr->oloc.file, H5O_DTYPE_ID, false, attr->shared->dt); + attr->shared->ds_size = H5O_msg_raw_size(attr->oloc.file, H5O_SDSPACE_ID, false, attr->shared->ds); /* Get # of elements for attribute's dataspace */ if ((snelmts = H5S_GET_EXTENT_NPOINTS(attr->shared->ds)) < 0) @@ -366,7 +366,7 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons /* Hold the symbol table entry (and file) open */ if (H5O_open(&(attr->oloc)) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to open"); - attr->obj_opened = TRUE; + attr->obj_opened = true; /* Set the version to encode the attribute with */ if (H5A__set_version(attr->oloc.file, attr) < 0) @@ -403,7 +403,7 @@ H5A__create_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr H5G_loc_t obj_loc; /* Location used to open group */ H5G_name_t obj_path; /* Opened object group hier. path */ H5O_loc_t obj_oloc; /* Opened object object location */ - hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */ + bool loc_found = false; /* Entry at 'obj_name' found */ H5A_t *attr = NULL; /* Attribute from object header */ H5A_t *ret_value = NULL; /* Return value */ @@ -422,7 +422,7 @@ H5A__create_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr /* Find the object's location */ if (H5G_loc_find(loc, obj_name, &obj_loc /*out*/) < 0) HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "object not found"); - loc_found = TRUE; + loc_found = true; /* Go do the real work for attaching the attribute to the object */ if (NULL == (attr = H5A__create(&obj_loc, attr_name, type, space, acpl_id))) @@ -490,7 +490,7 @@ H5A__open_common(const H5G_loc_t *loc, H5A_t *attr) /* Hold the symbol table entry (and file) open */ if (H5O_open(&(attr->oloc)) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open"); - attr->obj_opened = TRUE; + attr->obj_opened = true; done: FUNC_LEAVE_NOAPI(ret_value) @@ -554,7 +554,7 @@ H5A__open_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type H5G_loc_t obj_loc; /* Location used to open group */ H5G_name_t obj_path; /* Opened object group hier. path */ H5O_loc_t obj_oloc; /* Opened object object location */ - hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */ + bool loc_found = false; /* Entry at 'obj_name' found */ H5A_t *attr = NULL; /* Attribute from object header */ H5A_t *ret_value = NULL; /* Return value */ @@ -572,7 +572,7 @@ H5A__open_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type /* Find the object's location */ if (H5G_loc_find(loc, obj_name, &obj_loc /*out*/) < 0) HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "object not found"); - loc_found = TRUE; + loc_found = true; /* Read in attribute from object header */ if (NULL == (attr = H5O__attr_open_by_idx(obj_loc.oloc, idx_type, order, n))) @@ -613,7 +613,7 @@ H5A__open_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr_n H5G_loc_t obj_loc; /* Location used to open group */ H5G_name_t obj_path; /* Opened object group hier. path */ H5O_loc_t obj_oloc; /* Opened object object location */ - hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */ + bool loc_found = false; /* Entry at 'obj_name' found */ H5A_t *attr = NULL; /* Attribute from object header */ H5A_t *ret_value = NULL; /* Return value */ @@ -632,7 +632,7 @@ H5A__open_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr_n /* Find the object's location */ if (H5G_loc_find(loc, obj_name, &obj_loc /*out*/) < 0) HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "object not found"); - loc_found = TRUE; + loc_found = true; /* Read in attribute from object header */ if (NULL == (attr = H5O__attr_open_by_name(obj_loc.oloc, attr_name))) @@ -722,9 +722,9 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf) if (!H5T_path_noop(tpath)) { H5T_bkg_t need_bkg; /* Background buffer type */ - if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(attr->shared->dt, H5T_COPY_ALL), FALSE)) < + if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(attr->shared->dt, H5T_COPY_ALL), false)) < 0 || - (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(mem_type, H5T_COPY_ALL), FALSE)) < 0) + (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(mem_type, H5T_COPY_ALL), false)) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, FAIL, "unable to register types for conversion"); /* Get the maximum buffer size needed and allocate it */ @@ -840,8 +840,8 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf) if (!H5T_path_noop(tpath)) { H5T_bkg_t need_bkg; /* Background buffer type */ - if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(mem_type, H5T_COPY_ALL), FALSE)) < 0 || - (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(attr->shared->dt, H5T_COPY_ALL), FALSE)) < 0) + if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(mem_type, H5T_COPY_ALL), false)) < 0 || + (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(attr->shared->dt, H5T_COPY_ALL), false)) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, FAIL, "unable to register types for conversion"); /* Get the maximum buffer size needed and allocate it */ @@ -853,7 +853,7 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf) H5MM_memcpy(tconv_buf, buf, (src_type_size * nelmts)); /* Check if we need a background buffer */ - if (H5T_detect_class(attr->shared->dt, H5T_VLEN, FALSE)) + if (H5T_detect_class(attr->shared->dt, H5T_VLEN, false)) need_bkg = H5T_BKG_YES; else need_bkg = H5T_path_bkg(tpath); @@ -988,11 +988,11 @@ H5A_get_space(H5A_t *attr) assert(attr); /* Copy the attribute's dataspace */ - if (NULL == (ds = H5S_copy(attr->shared->ds, FALSE, TRUE))) + if (NULL == (ds = H5S_copy(attr->shared->ds, false, true))) HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to copy dataspace"); /* Register */ - if ((ret_value = H5I_register(H5I_DATASPACE, ds, TRUE)) < 0) + if ((ret_value = H5I_register(H5I_DATASPACE, ds, true)) < 0) HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID"); done: @@ -1038,7 +1038,7 @@ H5A__get_type(H5A_t *attr) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5I_INVALID_HID, "invalid datatype location"); /* Lock copied type */ - if (H5T_lock(dt, FALSE) < 0) + if (H5T_lock(dt, false) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5I_INVALID_HID, "unable to lock transient datatype"); /* Register */ @@ -1047,11 +1047,11 @@ H5A__get_type(H5A_t *attr) * two level IDs, where the VOL object is a copy of the * returned datatype */ - if ((ret_value = H5VL_wrap_register(H5I_DATATYPE, dt, TRUE)) < 0) + if ((ret_value = H5VL_wrap_register(H5I_DATATYPE, dt, true)) < 0) HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle"); } else { - if ((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0) + if ((ret_value = H5I_register(H5I_DATATYPE, dt, true)) < 0) HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register datatype"); } @@ -1090,7 +1090,7 @@ H5A__get_create_plist(H5A_t *attr) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get default ACPL"); /* Create the property list object to return */ - if ((new_plist_id = H5P_copy_plist(plist, TRUE)) < 0) + if ((new_plist_id = H5P_copy_plist(plist, true)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy attribute creation properties"); if (NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_plist_id))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list"); @@ -1130,11 +1130,11 @@ H5A__get_info(const H5A_t *attr, H5A_info_t *ainfo) ainfo->cset = attr->shared->encoding; ainfo->data_size = attr->shared->data_size; if (attr->shared->crt_idx == H5O_MAX_CRT_ORDER_IDX) { - ainfo->corder_valid = FALSE; + ainfo->corder_valid = false; ainfo->corder = 0; } /* end if */ else { - ainfo->corder_valid = TRUE; + ainfo->corder_valid = true; ainfo->corder = attr->shared->crt_idx; } /* end else */ @@ -1154,9 +1154,9 @@ H5A__get_info(const H5A_t *attr, H5A_info_t *ainfo) H5A_t * H5A__copy(H5A_t *_new_attr, const H5A_t *old_attr) { - H5A_t *new_attr = NULL; - hbool_t allocated_attr = FALSE; /* Whether the attribute was allocated */ - H5A_t *ret_value = NULL; /* Return value */ + H5A_t *new_attr = NULL; + bool allocated_attr = false; /* Whether the attribute was allocated */ + H5A_t *ret_value = NULL; /* Return value */ FUNC_ENTER_PACKAGE @@ -1167,7 +1167,7 @@ H5A__copy(H5A_t *_new_attr, const H5A_t *old_attr) if (_new_attr == NULL) { if (NULL == (new_attr = H5FL_CALLOC(H5A_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); - allocated_attr = TRUE; + allocated_attr = true; } /* end if */ else new_attr = _new_attr; @@ -1186,7 +1186,7 @@ H5A__copy(H5A_t *_new_attr, const H5A_t *old_attr) new_attr->shared->nrefs++; /* Don't open the object header for a copy */ - new_attr->obj_opened = FALSE; + new_attr->obj_opened = false; /* Set the return value */ ret_value = new_attr; @@ -1409,17 +1409,17 @@ H5A_type(const H5A_t *attr) * * Purpose: Private version of H5Aexists_by_name * - * Return: TRUE/FALSE/FAIL + * Return: true/false/FAIL * *------------------------------------------------------------------------- */ herr_t -H5A__exists_by_name(H5G_loc_t loc, const char *obj_name, const char *attr_name, hbool_t *attr_exists) +H5A__exists_by_name(H5G_loc_t loc, const char *obj_name, const char *attr_name, bool *attr_exists) { H5G_loc_t obj_loc; /* Location used to open group */ H5G_name_t obj_path; /* Opened object group hier. path */ H5O_loc_t obj_oloc; /* Opened object object location */ - hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */ + bool loc_found = false; /* Entry at 'obj_name' found */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -1437,7 +1437,7 @@ H5A__exists_by_name(H5G_loc_t loc, const char *obj_name, const char *attr_name, /* Find the object's location */ if (H5G_loc_find(&loc, obj_name, &obj_loc /*out*/) < 0) HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found"); - loc_found = TRUE; + loc_found = true; /* Check if the attribute exists */ if (H5O__attr_exists(obj_loc.oloc, attr_name, attr_exists) < 0) @@ -1539,8 +1539,8 @@ H5A__compact_build_table(H5F_t *f, H5O_t *oh, H5_index_t idx_type, H5_iter_order udata.atable = atable; udata.curr_attr = 0; udata.bogus_crt_idx = - (hbool_t)((oh->version == H5O_VERSION_1 || !(oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED)) ? TRUE - : FALSE); + (bool)((oh->version == H5O_VERSION_1 || !(oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED)) ? true + : false); /* Iterate over existing attributes, checking for attribute with same name */ op.op_type = H5O_MESG_OP_LIB; @@ -1947,7 +1947,7 @@ done: * Purpose: Retrieves the "attribute info" message for an object. Also * sets the number of attributes correctly, if it isn't set up yet. * - * Return: TRUE/FALSE/FAIL + * Return: true/false/FAIL * *------------------------------------------------------------------------- */ @@ -2013,10 +2013,9 @@ done: herr_t H5A__set_version(const H5F_t *f, H5A_t *attr) { - hbool_t type_shared, - space_shared; /* Flags to indicate that shared messages are used for this attribute */ - uint8_t version; /* Message version */ - herr_t ret_value = SUCCEED; /* Return value */ + bool type_shared, space_shared; /* Flags to indicate that shared messages are used for this attribute */ + uint8_t version; /* Message version */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -2026,14 +2025,14 @@ H5A__set_version(const H5F_t *f, H5A_t *attr) /* Check whether datatype and dataspace are shared */ if (H5O_msg_is_shared(H5O_DTYPE_ID, attr->shared->dt) > 0) - type_shared = TRUE; + type_shared = true; else - type_shared = FALSE; + type_shared = false; if (H5O_msg_is_shared(H5O_SDSPACE_ID, attr->shared->ds) > 0) - space_shared = TRUE; + space_shared = true; else - space_shared = FALSE; + space_shared = false; /* Check which version to encode attribute with */ if (attr->shared->encoding != H5T_CSET_ASCII) @@ -2076,7 +2075,7 @@ done: *------------------------------------------------------------------------- */ H5A_t * -H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_size, +H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, bool *recompute_size, H5O_copy_t H5_ATTR_NDEBUG_UNUSED *cpy_info) { H5A_t *attr_dst = NULL; /* Destination attribute */ @@ -2113,7 +2112,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s /* Don't have an opened group location for copy */ H5O_loc_reset(&(attr_dst->oloc)); H5G_name_reset(&(attr_dst->path)); - attr_dst->obj_opened = FALSE; + attr_dst->obj_opened = false; /* Reference count for the header message in the cache */ attr_dst->shared->nrefs = 1; @@ -2144,7 +2143,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s /* Copy the dataspace for the attribute. Make sure the maximal dimension is also copied. * Otherwise the comparison in the test may complain about it. SLU 2011/4/12 */ - attr_dst->shared->ds = H5S_copy(attr_src->shared->ds, FALSE, TRUE); + attr_dst->shared->ds = H5S_copy(attr_src->shared->ds, false, true); assert(attr_dst->shared->ds); /* Reset the dataspace's sharing in the source file before trying to share @@ -2165,16 +2164,16 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s /* Compute the sizes of the datatype and dataspace. This is their raw * size unless they're shared. */ - attr_dst->shared->dt_size = H5O_msg_raw_size(file_dst, H5O_DTYPE_ID, FALSE, attr_dst->shared->dt); + attr_dst->shared->dt_size = H5O_msg_raw_size(file_dst, H5O_DTYPE_ID, false, attr_dst->shared->dt); assert(attr_dst->shared->dt_size > 0); - attr_dst->shared->ds_size = H5O_msg_raw_size(file_dst, H5O_SDSPACE_ID, FALSE, attr_dst->shared->ds); + attr_dst->shared->ds_size = H5O_msg_raw_size(file_dst, H5O_SDSPACE_ID, false, attr_dst->shared->ds); assert(attr_dst->shared->ds_size > 0); /* Check whether to recompute the size of the attribute */ /* (happens when the datatype or dataspace changes sharing status) */ if (attr_dst->shared->dt_size != attr_src->shared->dt_size || attr_dst->shared->ds_size != attr_src->shared->ds_size) - *recompute_size = TRUE; + *recompute_size = true; /* Get # of elements for destination attribute's dataspace */ if ((sdst_nelmts = H5S_GET_EXTENT_NPOINTS(attr_dst->shared->ds)) < 0) @@ -2194,7 +2193,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Check if we need to convert data */ - if (H5T_detect_class(attr_src->shared->dt, H5T_VLEN, FALSE) > 0) { + if (H5T_detect_class(attr_src->shared->dt, H5T_VLEN, false) > 0) { H5T_path_t *tpath_src_mem, *tpath_mem_dst; /* Datatype conversion paths */ H5T_t *dt_mem; /* Memory datatype */ size_t src_dt_size; /* Source datatype size */ @@ -2206,17 +2205,17 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s size_t buf_size; /* Size of copy buffer */ /* Create datatype ID for src datatype */ - if ((tid_src = H5I_register(H5I_DATATYPE, attr_src->shared->dt, FALSE)) < 0) + if ((tid_src = H5I_register(H5I_DATATYPE, attr_src->shared->dt, false)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register source file datatype"); /* create a memory copy of the variable-length datatype */ if (NULL == (dt_mem = H5T_copy(attr_src->shared->dt, H5T_COPY_TRANSIENT))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy"); - if ((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, FALSE)) < 0) + if ((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, false)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register memory datatype"); /* create variable-length datatype at the destination file */ - if ((tid_dst = H5I_register(H5I_DATATYPE, attr_dst->shared->dt, FALSE)) < 0) + if ((tid_dst = H5I_register(H5I_DATATYPE, attr_dst->shared->dt, false)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register destination file datatype"); @@ -2253,7 +2252,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, NULL, "can't create simple dataspace"); /* Register */ - if ((buf_sid = H5I_register(H5I_DATASPACE, buf_space, FALSE)) < 0) { + if ((buf_sid = H5I_register(H5I_DATASPACE, buf_space, false)) < 0) { H5S_close(buf_space); HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, NULL, "unable to register dataspace ID"); } /* end if */ @@ -2307,7 +2306,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s /* Recompute the destination attribute's size, if it's a different version */ if (attr_src->shared->version != attr_dst->shared->version) - *recompute_size = TRUE; + *recompute_size = true; /* Set return value */ ret_value = attr_dst; @@ -2390,7 +2389,7 @@ H5A__attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src, H5O_l dst_oloc_dt->file = file_dst; /* Copy the shared object from source to destination */ - if (H5O_copy_header_map(src_oloc_dt, dst_oloc_dt, cpy_info, FALSE, NULL, NULL) < 0) + if (H5O_copy_header_map(src_oloc_dt, dst_oloc_dt, cpy_info, false, NULL, NULL) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object"); /* Update shared message info from named datatype info */ @@ -2408,7 +2407,7 @@ H5A__attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src, H5O_l /* Only need to fix reference attribute with real data being copied to * another file. */ - if ((NULL != attr_dst->shared->data) && (H5T_get_class(attr_dst->shared->dt, FALSE) == H5T_REFERENCE)) { + if ((NULL != attr_dst->shared->data) && (H5T_get_class(attr_dst->shared->dt, false) == H5T_REFERENCE)) { /* copy object pointed by reference. The current implementation does not * deal with nested reference such as reference in a compound structure @@ -2500,7 +2499,7 @@ H5A__dense_post_copy_file_all(const H5O_loc_t *src_oloc, const H5O_ainfo_t *ainf { H5A_dense_file_cp_ud_t udata; /* User data for iteration callback */ H5A_attr_iter_op_t attr_op; /* Attribute operator */ - hbool_t recompute_size = FALSE; /* recompute the size */ + bool recompute_size = false; /* recompute the size */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -2542,7 +2541,7 @@ H5A__rename_by_name(H5G_loc_t loc, const char *obj_name, const char *old_attr_na H5G_loc_t obj_loc; /* Location used to open group */ H5G_name_t obj_path; /* Opened object group hier. path */ H5O_loc_t obj_oloc; /* Opened object object location */ - hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */ + bool loc_found = false; /* Entry at 'obj_name' found */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -2557,7 +2556,7 @@ H5A__rename_by_name(H5G_loc_t loc, const char *obj_name, const char *old_attr_na /* Find the object's location */ if (H5G_loc_find(&loc, obj_name, &obj_loc /*out*/) < 0) HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found"); - loc_found = TRUE; + loc_found = true; /* Call attribute rename routine */ if (H5O__attr_rename(obj_loc.oloc, old_attr_name, new_attr_name) < 0) @@ -2619,7 +2618,7 @@ H5A__iterate(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5 H5G_loc_t obj_loc; /* Location used to open group */ H5G_name_t obj_path; /* Opened object group hier. path */ H5O_loc_t obj_oloc; /* Opened object object location */ - hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */ + bool loc_found = false; /* Entry at 'obj_name' found */ hid_t obj_loc_id = H5I_INVALID_HID; /* ID for object located */ H5A_attr_iter_op_t attr_op; /* Attribute operator */ void *temp_obj = NULL; @@ -2640,14 +2639,14 @@ H5A__iterate(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5 /* Find the object's location */ if (H5G_loc_find(loc, obj_name, &obj_loc) < 0) HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found"); - loc_found = TRUE; + loc_found = true; /* Open the object */ if (NULL == (temp_obj = H5O_open_by_loc(&obj_loc, &obj_type))) HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open object"); /* Get an ID for the object */ - if ((obj_loc_id = H5VL_wrap_register(obj_type, temp_obj, TRUE)) < 0) + if ((obj_loc_id = H5VL_wrap_register(obj_type, temp_obj, true)) < 0) HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register datatype"); /* Call internal attribute iteration routine */ @@ -2721,7 +2720,7 @@ H5A__delete_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr H5G_loc_t obj_loc; /* Location used to open group */ H5G_name_t obj_path; /* Opened object group hier. path */ H5O_loc_t obj_oloc; /* Opened object object location */ - hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */ + bool loc_found = false; /* Entry at 'obj_name' found */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -2734,7 +2733,7 @@ H5A__delete_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr /* Find the object's location */ if (H5G_loc_find(loc, obj_name, &obj_loc /*out*/) < 0) HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found"); - loc_found = TRUE; + loc_found = true; /* Delete the attribute from the location */ if (H5O__attr_remove(obj_loc.oloc, attr_name) < 0) @@ -2764,7 +2763,7 @@ H5A__delete_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_ty H5G_loc_t obj_loc; /* Location used to open group */ H5G_name_t obj_path; /* Opened object group hier. path */ H5O_loc_t obj_oloc; /* Opened object object location */ - hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */ + bool loc_found = false; /* Entry at 'obj_name' found */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -2777,7 +2776,7 @@ H5A__delete_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_ty /* Find the object's location */ if (H5G_loc_find(loc, obj_name, &obj_loc /*out*/) < 0) HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found"); - loc_found = TRUE; + loc_found = true; /* Delete the attribute from the location */ if (H5O__attr_remove_by_idx(obj_loc.oloc, idx_type, order, n) < 0) |