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/H5Dbtree2.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/H5Dbtree2.c')
-rw-r--r-- | src/H5Dbtree2.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/H5Dbtree2.c b/src/H5Dbtree2.c index 7fe8397..b6aeeeb 100644 --- a/src/H5Dbtree2.c +++ b/src/H5Dbtree2.c @@ -108,27 +108,27 @@ static herr_t H5D__bt2_found_cb(const void *nrecord, void *op_data); static herr_t H5D__bt2_remove_cb(const void *nrecord, void *_udata); /* Callback for H5B2_update() which is called in H5D__bt2_idx_insert() */ -static herr_t H5D__bt2_mod_cb(void *_record, void *_op_data, hbool_t *changed); +static herr_t H5D__bt2_mod_cb(void *_record, void *_op_data, bool *changed); /* Chunked layout indexing callbacks for v2 B-tree indexing */ -static herr_t H5D__bt2_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space, - haddr_t dset_ohdr_addr); -static herr_t H5D__bt2_idx_create(const H5D_chk_idx_info_t *idx_info); -static hbool_t H5D__bt2_idx_is_space_alloc(const H5O_storage_chunk_t *storage); -static herr_t H5D__bt2_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata, - const H5D_t *dset); -static herr_t H5D__bt2_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata); -static int H5D__bt2_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb, - void *chunk_udata); -static herr_t H5D__bt2_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata); -static herr_t H5D__bt2_idx_delete(const H5D_chk_idx_info_t *idx_info); -static herr_t H5D__bt2_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, - const H5D_chk_idx_info_t *idx_info_dst); -static herr_t H5D__bt2_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chunk_t *storage_dst); -static herr_t H5D__bt2_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *size); -static herr_t H5D__bt2_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr); -static herr_t H5D__bt2_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream); -static herr_t H5D__bt2_idx_dest(const H5D_chk_idx_info_t *idx_info); +static herr_t H5D__bt2_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space, + haddr_t dset_ohdr_addr); +static herr_t H5D__bt2_idx_create(const H5D_chk_idx_info_t *idx_info); +static bool H5D__bt2_idx_is_space_alloc(const H5O_storage_chunk_t *storage); +static herr_t H5D__bt2_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata, + const H5D_t *dset); +static herr_t H5D__bt2_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata); +static int H5D__bt2_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb, + void *chunk_udata); +static herr_t H5D__bt2_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata); +static herr_t H5D__bt2_idx_delete(const H5D_chk_idx_info_t *idx_info); +static herr_t H5D__bt2_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, + const H5D_chk_idx_info_t *idx_info_dst); +static herr_t H5D__bt2_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chunk_t *storage_dst); +static herr_t H5D__bt2_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *size); +static herr_t H5D__bt2_idx_reset(H5O_storage_chunk_t *storage, bool reset_addr); +static herr_t H5D__bt2_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream); +static herr_t H5D__bt2_idx_dest(const H5D_chk_idx_info_t *idx_info); /*********************/ /* Package Variables */ @@ -136,7 +136,7 @@ static herr_t H5D__bt2_idx_dest(const H5D_chk_idx_info_t *idx_info); /* Chunked dataset I/O ops for v2 B-tree indexing */ const H5D_chunk_ops_t H5D_COPS_BT2[1] = {{ - TRUE, /* Fixed array indices support SWMR access */ + true, /* Fixed array indices support SWMR access */ H5D__bt2_idx_init, /* init */ H5D__bt2_idx_create, /* create */ H5D__bt2_idx_is_space_alloc, /* is_space_alloc */ @@ -608,7 +608,7 @@ H5D__btree2_idx_depend(const H5D_chk_idx_info_t *idx_info) oloc.addr = idx_info->storage->u.btree.dset_ohdr_addr; /* Get header */ - if (NULL == (oh = H5O_protect(&oloc, H5AC__READ_ONLY_FLAG, TRUE))) + if (NULL == (oh = H5O_protect(&oloc, H5AC__READ_ONLY_FLAG, true))) HGOTO_ERROR(H5E_DATASET, H5E_CANTPROTECT, FAIL, "unable to protect object header"); /* Retrieve the dataset's object header proxy */ @@ -766,7 +766,7 @@ done: * *------------------------------------------------------------------------- */ -static hbool_t +static bool H5D__bt2_idx_is_space_alloc(const H5O_storage_chunk_t *storage) { FUNC_ENTER_PACKAGE_NOERR @@ -774,7 +774,7 @@ H5D__bt2_idx_is_space_alloc(const H5O_storage_chunk_t *storage) /* Check args */ assert(storage); - FUNC_LEAVE_NOAPI((hbool_t)H5_addr_defined(storage->idx_addr)) + FUNC_LEAVE_NOAPI((bool)H5_addr_defined(storage->idx_addr)) } /* end H5D__bt2_idx_is_space_alloc() */ /*------------------------------------------------------------------------- @@ -790,7 +790,7 @@ H5D__bt2_idx_is_space_alloc(const H5O_storage_chunk_t *storage) *------------------------------------------------------------------------- */ static herr_t -H5D__bt2_mod_cb(void *_record, void *_op_data, hbool_t *changed) +H5D__bt2_mod_cb(void *_record, void *_op_data, bool *changed) { H5D_bt2_ud_t *op_data = (H5D_bt2_ud_t *)_op_data; /* User data for v2 B-tree calls */ H5D_chunk_rec_t *record = (H5D_chunk_rec_t *)_record; /* Chunk record */ @@ -811,7 +811,7 @@ H5D__bt2_mod_cb(void *_record, void *_op_data, hbool_t *changed) *record = op_data->rec; /* Note that the record changed */ - *changed = TRUE; + *changed = true; FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__bt2_mod_cb() */ @@ -928,7 +928,7 @@ H5D__bt2_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata) H5D_bt2_ud_t bt2_udata; /* User data for v2 B-tree calls */ H5D_chunk_rec_t found_rec; /* Record found from searching for object */ unsigned u; /* Local index variable */ - hbool_t found; /* Whether chunk was found */ + bool found; /* Whether chunk was found */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -970,7 +970,7 @@ H5D__bt2_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata) bt2_udata.rec.scaled[u] = udata->common.scaled[u]; /* Go get chunk information from v2 B-tree */ - found = FALSE; + found = false; if (H5B2_find(bt2, &bt2_udata, &found, H5D__bt2_found_cb, &found_rec) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTFIND, FAIL, "can't check for chunk in v2 B-tree"); @@ -1376,7 +1376,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5D__bt2_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr) +H5D__bt2_idx_reset(H5O_storage_chunk_t *storage, bool reset_addr) { FUNC_ENTER_PACKAGE_NOERR |