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/H5Oprivate.h | |
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/H5Oprivate.h')
-rw-r--r-- | src/H5Oprivate.h | 87 |
1 files changed, 43 insertions, 44 deletions
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 2d05e54..cdf4d6c 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -58,7 +58,7 @@ typedef struct H5O_mesg_t H5O_mesg_t; #define H5O_FHEAP_MAN_MAX_DIRECT_SIZE (64 * 1024) #define H5O_FHEAP_MAN_MAX_INDEX 40 #define H5O_FHEAP_MAN_START_ROOT_ROWS 1 -#define H5O_FHEAP_CHECKSUM_DBLOCKS TRUE +#define H5O_FHEAP_CHECKSUM_DBLOCKS true #define H5O_FHEAP_MAX_MAN_SIZE (4 * 1024) #define H5O_FHEAP_ID_LEN 8 @@ -113,7 +113,7 @@ typedef struct H5O_mesg_t H5O_mesg_t; #ifdef H5O_ENABLE_BAD_MESG_COUNT #define H5O_BAD_MESG_COUNT_NAME "bad message count" /* Flag setting bad message count */ -#define H5O_BAD_MESG_COUNT_SIZE sizeof(hbool_t) +#define H5O_BAD_MESG_COUNT_SIZE sizeof(bool) #endif /* H5O_ENABLE_BAD_MESG_COUNT */ /* ========= Object Copy properties ============ */ @@ -157,7 +157,7 @@ typedef union { typedef struct H5O_loc_t { H5F_t *file; /* File that object header is located within */ haddr_t addr; /* File address of object header */ - hbool_t holding_file; /* True if this object header has incremented + bool holding_file; /* True if this object header has incremented * its file's count of open objects. */ } H5O_loc_t; @@ -175,20 +175,20 @@ typedef struct H5O_mcdt_cb_info_t { /* Settings/flags for copying an object */ typedef struct H5O_copy_t { - hbool_t copy_shallow; /* Flag to perform shallow hierarchy copy */ - hbool_t expand_soft_link; /* Flag to expand soft links */ - hbool_t expand_ext_link; /* Flag to expand external links */ - hbool_t expand_ref; /* Flag to expand object references */ - hbool_t copy_without_attr; /* Flag to not copy attributes */ - hbool_t preserve_null; /* Flag to not delete NULL messages */ - hbool_t merge_comm_dt; /* Flag to merge committed datatypes in dest file */ + bool copy_shallow; /* Flag to perform shallow hierarchy copy */ + bool expand_soft_link; /* Flag to expand soft links */ + bool expand_ext_link; /* Flag to expand external links */ + bool expand_ref; /* Flag to expand object references */ + bool copy_without_attr; /* Flag to not copy attributes */ + bool preserve_null; /* Flag to not delete NULL messages */ + bool merge_comm_dt; /* Flag to merge committed datatypes in dest file */ H5O_copy_dtype_merge_list_t *dst_dt_suggestion_list; /* Suggestions for merging committed datatypes */ int curr_depth; /* Current depth in hierarchy copied */ int max_depth; /* Maximum depth in hierarchy to copy */ H5SL_t *map_list; /* Skip list to hold address mappings */ H5SL_t *dst_dt_list; /* Skip list to hold committed datatypes in dest file */ - hbool_t dst_dt_list_complete; /* Whether the destination datatype list is complete (i.e. not only - populated with "suggestions" from H5Padd_merge_committed_dtype_path) */ + bool dst_dt_list_complete; /* Whether the destination datatype list is complete (i.e. not only + populated with "suggestions" from H5Padd_merge_committed_dtype_path) */ H5O_t *oh_dst; /* The destination object header */ H5F_t *file_dst; /* The destination file pointer */ /* This is used in the pre_copy_file callback to obtain @@ -252,7 +252,7 @@ typedef struct H5O_copy_t { /* Detect messages that aren't stored in message's object header */ #define H5O_IS_STORED_SHARED(T) \ - ((((T) == H5O_SHARE_TYPE_SOHM) || ((T) == H5O_SHARE_TYPE_COMMITTED)) ? TRUE : FALSE) + ((((T) == H5O_SHARE_TYPE_SOHM) || ((T) == H5O_SHARE_TYPE_COMMITTED)) ? true : false) /* Detect shared messages that are "tracked" in some other location */ #define H5O_IS_TRACKED_SHARED(T) ((T) > 0) @@ -295,8 +295,8 @@ typedef struct H5O_shared_t { */ typedef struct H5O_linfo_t { /* Creation order info */ - hbool_t track_corder; /* Are creation order values tracked on links? */ - hbool_t index_corder; /* Are creation order values indexed on links? */ + bool track_corder; /* Are creation order values tracked on links? */ + bool index_corder; /* Are creation order values indexed on links? */ int64_t max_corder; /* Current max. creation order value for group */ haddr_t corder_bt2_addr; /* Address of v2 B-tree for indexing creation order values of links */ @@ -336,7 +336,7 @@ struct H5O_fill_t { void *buf; /*the fill value */ H5D_alloc_time_t alloc_time; /* time to allocate space */ H5D_fill_time_t fill_time; /* time to write fill value */ - hbool_t fill_defined; /* whether fill value is defined */ + bool fill_defined; /* whether fill value is defined */ }; /* @@ -358,7 +358,7 @@ typedef struct H5O_link_ud_t { typedef struct H5O_link_t { H5L_type_t type; /* Type of link */ - hbool_t corder_valid; /* Creation order for link is valid (not stored) */ + bool corder_valid; /* Creation order for link is valid (not stored) */ int64_t corder; /* Creation order for link (stored if it's valid) */ H5T_cset_t cset; /* Character set of link name */ char *name; /* Link name */ @@ -492,9 +492,9 @@ typedef struct H5O_storage_chunk_t { } H5O_storage_chunk_t; typedef struct H5O_storage_compact_t { - hbool_t dirty; /* Dirty flag for compact dataset */ - size_t size; /* Size of buffer in bytes */ - void *buf; /* Buffer for compact dataset */ + bool dirty; /* Dirty flag for compact dataset */ + size_t size; /* Size of buffer in bytes */ + void *buf; /* Buffer for compact dataset */ } H5O_storage_compact_t; typedef struct H5O_storage_virtual_srcdset_t { @@ -507,7 +507,7 @@ typedef struct H5O_storage_virtual_srcdset_t { struct H5S_t *clipped_source_select; /* Clipped version of source_select */ struct H5S_t *clipped_virtual_select; /* Clipped version of virtual_select */ struct H5D_t *dset; /* Source dataset */ - hbool_t dset_exists; /* Whether the dataset exists (was opened successfully) */ + bool dset_exists; /* Whether the dataset exists (was opened successfully) */ /* Temporary - only used during I/O operation, NULL at all other times */ struct H5S_t *projected_mem_space; /* Selection within mem_space for this mapping */ @@ -575,11 +575,11 @@ typedef struct H5O_storage_virtual_t { min_dims[H5S_MAX_RANK]; /* Minimum extent of VDS (maximum of all non-unlimited selection bounds) */ H5D_vds_view_t view; /* Method for calculating the extent of the virtual dataset with unlimited selections */ - hsize_t printf_gap; /* Maximum number of sequential missing source datasets before terminating the search - for more */ - hid_t source_fapl; /* FAPL to use to open source files */ - hid_t source_dapl; /* DAPL to use to open source datasets */ - hbool_t init; /* Whether all information has been completely initialized */ + hsize_t printf_gap; /* Maximum number of sequential missing source datasets before terminating the search + for more */ + hid_t source_fapl; /* FAPL to use to open source files */ + hid_t source_dapl; /* DAPL to use to open source datasets */ + bool init; /* Whether all information has been completely initialized */ } H5O_storage_virtual_t; typedef struct H5O_storage_t { @@ -686,12 +686,12 @@ typedef struct H5O_ginfo_t { /* "New" format group info (stored) */ /* (storage management info) */ - hbool_t store_link_phase_change; /* Whether to store the link phase change values */ + bool store_link_phase_change; /* Whether to store the link phase change values */ uint16_t max_compact; /* Maximum # of compact links */ uint16_t min_dense; /* Minimum # of "dense" links */ /* (initial object header size info) */ - hbool_t store_est_entry_info; /* Whether to store the est. entry values */ + bool store_est_entry_info; /* Whether to store the est. entry values */ uint16_t est_num_entries; /* Estimated # of entries in group */ uint16_t est_name_len; /* Estimated length of entry name */ } H5O_ginfo_t; @@ -797,8 +797,8 @@ typedef struct H5O_drvinfo_t { */ typedef struct H5O_ainfo_t { /* Creation order info */ - hbool_t track_corder; /* Are creation order values tracked on attributes? */ - hbool_t index_corder; /* Are creation order values indexed on attributes? */ + bool track_corder; /* Are creation order values tracked on attributes? */ + bool index_corder; /* Are creation order values indexed on attributes? */ H5O_msg_crt_idx_t max_crt_idx; /* Maximum attribute creation index used */ haddr_t corder_bt2_addr; /* Address of v2 B-tree for indexing creation order values of "dense" attributes */ @@ -841,14 +841,14 @@ typedef unsigned H5O_unknown_t; /* Original message type ID */ typedef struct H5O_fsinfo_t { unsigned version; /* Version number */ H5F_fspace_strategy_t strategy; /* File space strategy */ - hbool_t persist; /* Persisting free-space or not */ + bool persist; /* Persisting free-space or not */ hsize_t threshold; /* Free-space section threshold */ hsize_t page_size; /* For paged aggregation: file space page size */ size_t pgend_meta_thres; /* For paged aggregation: page end metadata threshold */ haddr_t eoa_pre_fsm_fsalloc; /* For paged aggregation: the eoa before free-space headers & sinfo */ haddr_t fs_addr[H5F_MEM_PAGE_NTYPES - 1]; /* 13 addresses of free-space managers */ /* For non-paged aggregation: only 6 addresses are used */ - hbool_t mapped; /* Not stored */ + bool mapped; /* Not stored */ /* Indicate the message is mapped from version 0 to version 1 */ } H5O_fsinfo_t; @@ -905,15 +905,15 @@ H5_DLL herr_t H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hin H5O_loc_t *loc_out); H5_DLL herr_t H5O_open(H5O_loc_t *loc); H5_DLL void *H5O_open_by_loc(const H5G_loc_t *obj_loc, H5I_type_t *opened_type /*out*/); -H5_DLL herr_t H5O_close(H5O_loc_t *loc, hbool_t *file_closed /*out*/); +H5_DLL herr_t H5O_close(H5O_loc_t *loc, bool *file_closed /*out*/); H5_DLL int H5O_link(const H5O_loc_t *loc, int adjust); -H5_DLL H5O_t *H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks); +H5_DLL H5O_t *H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, bool pin_all_chunks); H5_DLL H5O_t *H5O_pin(const H5O_loc_t *loc); H5_DLL herr_t H5O_unpin(H5O_t *oh); H5_DLL herr_t H5O_dec_rc_by_loc(const H5O_loc_t *loc); H5_DLL herr_t H5O_unprotect(const H5O_loc_t *loc, H5O_t *oh, unsigned oh_flags); -H5_DLL herr_t H5O_touch(const H5O_loc_t *loc, hbool_t force); -H5_DLL herr_t H5O_touch_oh(H5F_t *f, H5O_t *oh, hbool_t force); +H5_DLL herr_t H5O_touch(const H5O_loc_t *loc, bool force); +H5_DLL herr_t H5O_touch_oh(H5F_t *f, H5O_t *oh, bool force); #ifdef H5O_ENABLE_BOGUS H5_DLL herr_t H5O_bogus_oh(H5F_t *f, H5O_t *oh, unsigned mesg_id, unsigned mesg_flags); #endif /* H5O_ENABLE_BOGUS */ @@ -952,12 +952,12 @@ H5_DLL void *H5O_msg_copy(unsigned type_id, const void *mesg, void *dst); H5_DLL int H5O_msg_count(const H5O_loc_t *loc, unsigned type_id); H5_DLL htri_t H5O_msg_exists(const H5O_loc_t *loc, unsigned type_id); H5_DLL htri_t H5O_msg_exists_oh(const H5O_t *oh, unsigned type_id); -H5_DLL herr_t H5O_msg_remove(const H5O_loc_t *loc, unsigned type_id, int sequence, hbool_t adj_link); +H5_DLL herr_t H5O_msg_remove(const H5O_loc_t *loc, unsigned type_id, int sequence, bool adj_link); H5_DLL herr_t H5O_msg_remove_op(const H5O_loc_t *loc, unsigned type_id, int sequence, H5O_operator_t op, - void *op_data, hbool_t adj_link); + void *op_data, bool adj_link); H5_DLL herr_t H5O_msg_iterate(const H5O_loc_t *loc, unsigned type_id, const H5O_mesg_operator_t *op, void *op_data); -H5_DLL size_t H5O_msg_raw_size(const H5F_t *f, unsigned type_id, hbool_t disable_shared, const void *mesg); +H5_DLL size_t H5O_msg_raw_size(const H5F_t *f, unsigned type_id, bool disable_shared, const void *mesg); H5_DLL size_t H5O_msg_size_f(const H5F_t *f, hid_t ocpl_id, unsigned type_id, const void *mesg, size_t extra_raw); H5_DLL size_t H5O_msg_size_oh(const H5F_t *f, const H5O_t *oh, unsigned type_id, const void *mesg, @@ -968,7 +968,7 @@ H5_DLL htri_t H5O_msg_can_share_in_ohdr(unsigned type_id); H5_DLL herr_t H5O_msg_set_share(unsigned type_id, const H5O_shared_t *share, void *mesg); H5_DLL herr_t H5O_msg_reset_share(unsigned type_id, void *mesg); H5_DLL herr_t H5O_msg_get_crt_index(unsigned type_id, const void *mesg, H5O_msg_crt_idx_t *crt_idx); -H5_DLL herr_t H5O_msg_encode(H5F_t *f, unsigned type_id, hbool_t disable_shared, unsigned char *buf, +H5_DLL herr_t H5O_msg_encode(H5F_t *f, unsigned type_id, bool disable_shared, unsigned char *buf, const void *obj); H5_DLL void *H5O_msg_decode(H5F_t *f, H5O_t *open_oh, unsigned type_id, size_t buf_size, const unsigned char *buf); @@ -980,12 +980,11 @@ H5_DLL herr_t H5O_flush(H5O_loc_t *oloc, hid_t obj_id); H5_DLL herr_t H5O_flush_common(H5O_loc_t *oloc, hid_t obj_id); H5_DLL herr_t H5O_refresh_metadata(H5O_loc_t *oloc, hid_t oid); H5_DLL herr_t H5O_refresh_metadata_reopen(hid_t oid, hid_t apl_id, H5G_loc_t *obj_loc, H5VL_t *vol_driver, - hbool_t start_swmr); + bool start_swmr); /* Object copying routines */ H5_DLL herr_t H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */, - H5O_copy_t *cpy_info, hbool_t inc_depth, H5O_type_t *obj_type, - void **udata); + H5O_copy_t *cpy_info, bool inc_depth, H5O_type_t *obj_type, void **udata); H5_DLL herr_t H5O_copy_expand_ref(H5F_t *file_src, hid_t tid_src, const H5T_t *dt_src, void *buf_src, size_t nbytes_src, H5F_t *file_dst, void *buf_dst, H5O_copy_t *cpy_info); @@ -1012,7 +1011,7 @@ H5_DLL herr_t H5O_fsinfo_check_version(H5F_libver_t high, H5O_fsinfo_t *fsinfo); /* Fill value operators */ H5_DLL herr_t H5O_fill_reset_dyn(H5O_fill_t *fill); -H5_DLL herr_t H5O_fill_convert(H5O_fill_t *fill, H5T_t *type, hbool_t *fill_changed); +H5_DLL herr_t H5O_fill_convert(H5O_fill_t *fill, H5T_t *type, bool *fill_changed); H5_DLL herr_t H5O_fill_set_version(H5F_t *f, H5O_fill_t *fill); /* Link operators */ |