diff options
Diffstat (limited to 'src/H5Pfapl.c')
-rw-r--r-- | src/H5Pfapl.c | 217 |
1 files changed, 108 insertions, 109 deletions
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 4ec73e3..5f5782c 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -161,8 +161,8 @@ /* Definition for whether to convert family to a single-file driver. * It's a private property only used by h5repart. */ -#define H5F_ACS_FAMILY_TO_SINGLE_SIZE sizeof(hbool_t) -#define H5F_ACS_FAMILY_TO_SINGLE_DEF FALSE +#define H5F_ACS_FAMILY_TO_SINGLE_SIZE sizeof(bool) +#define H5F_ACS_FAMILY_TO_SINGLE_DEF false /* Definition for data type in multi file driver */ #define H5F_ACS_MULTI_TYPE_SIZE sizeof(H5FD_mem_t) #define H5F_ACS_MULTI_TYPE_DEF H5FD_MEM_DEFAULT @@ -184,8 +184,8 @@ /* Definition for whether to query the file descriptor from the core VFD * instead of the memory address. (Private to library) */ -#define H5F_ACS_WANT_POSIX_FD_SIZE sizeof(hbool_t) -#define H5F_ACS_WANT_POSIX_FD_DEF FALSE +#define H5F_ACS_WANT_POSIX_FD_SIZE sizeof(bool) +#define H5F_ACS_WANT_POSIX_FD_DEF false /* Definition for external file cache size */ #define H5F_ACS_EFC_SIZE_SIZE sizeof(unsigned) #define H5F_ACS_EFC_SIZE_DEF 0 @@ -212,21 +212,21 @@ NULL, NULL \ } /* Definition for status_flags in the superblock */ -#define H5F_ACS_CLEAR_STATUS_FLAGS_SIZE sizeof(hbool_t) -#define H5F_ACS_CLEAR_STATUS_FLAGS_DEF FALSE +#define H5F_ACS_CLEAR_STATUS_FLAGS_SIZE sizeof(bool) +#define H5F_ACS_CLEAR_STATUS_FLAGS_DEF false /* Definition for dropping free-space to the floor when reading in the superblock */ -#define H5F_ACS_NULL_FSM_ADDR_SIZE sizeof(hbool_t) -#define H5F_ACS_NULL_FSM_ADDR_DEF FALSE +#define H5F_ACS_NULL_FSM_ADDR_SIZE sizeof(bool) +#define H5F_ACS_NULL_FSM_ADDR_DEF false /* Definition for skipping EOF check when reading in the superblock */ -#define H5F_ACS_SKIP_EOF_CHECK_SIZE sizeof(hbool_t) -#define H5F_ACS_SKIP_EOF_CHECK_DEF FALSE +#define H5F_ACS_SKIP_EOF_CHECK_SIZE sizeof(bool) +#define H5F_ACS_SKIP_EOF_CHECK_DEF false /* Definition for 'use metadata cache logging' flag */ -#define H5F_ACS_USE_MDC_LOGGING_SIZE sizeof(hbool_t) -#define H5F_ACS_USE_MDC_LOGGING_DEF FALSE -#define H5F_ACS_USE_MDC_LOGGING_ENC H5P__encode_hbool_t -#define H5F_ACS_USE_MDC_LOGGING_DEC H5P__decode_hbool_t +#define H5F_ACS_USE_MDC_LOGGING_SIZE sizeof(bool) +#define H5F_ACS_USE_MDC_LOGGING_DEF false +#define H5F_ACS_USE_MDC_LOGGING_ENC H5P__encode_bool +#define H5F_ACS_USE_MDC_LOGGING_DEC H5P__decode_bool /* Definition for 'mdc log location' flag */ #define H5F_ACS_MDC_LOG_LOCATION_SIZE sizeof(char *) #define H5F_ACS_MDC_LOG_LOCATION_DEF NULL /* default is no log location */ @@ -237,15 +237,15 @@ #define H5F_ACS_MDC_LOG_LOCATION_CMP H5P__facc_mdc_log_location_cmp #define H5F_ACS_MDC_LOG_LOCATION_CLOSE H5P__facc_mdc_log_location_close /* Definition for 'start metadata cache logging on access' flag */ -#define H5F_ACS_START_MDC_LOG_ON_ACCESS_SIZE sizeof(hbool_t) -#define H5F_ACS_START_MDC_LOG_ON_ACCESS_DEF FALSE -#define H5F_ACS_START_MDC_LOG_ON_ACCESS_ENC H5P__encode_hbool_t -#define H5F_ACS_START_MDC_LOG_ON_ACCESS_DEC H5P__decode_hbool_t +#define H5F_ACS_START_MDC_LOG_ON_ACCESS_SIZE sizeof(bool) +#define H5F_ACS_START_MDC_LOG_ON_ACCESS_DEF false +#define H5F_ACS_START_MDC_LOG_ON_ACCESS_ENC H5P__encode_bool +#define H5F_ACS_START_MDC_LOG_ON_ACCESS_DEC H5P__decode_bool /* Definition for evict on close property */ -#define H5F_ACS_EVICT_ON_CLOSE_FLAG_SIZE sizeof(hbool_t) -#define H5F_ACS_EVICT_ON_CLOSE_FLAG_DEF FALSE -#define H5F_ACS_EVICT_ON_CLOSE_FLAG_ENC H5P__encode_hbool_t -#define H5F_ACS_EVICT_ON_CLOSE_FLAG_DEC H5P__decode_hbool_t +#define H5F_ACS_EVICT_ON_CLOSE_FLAG_SIZE sizeof(bool) +#define H5F_ACS_EVICT_ON_CLOSE_FLAG_DEF false +#define H5F_ACS_EVICT_ON_CLOSE_FLAG_ENC H5P__encode_bool +#define H5F_ACS_EVICT_ON_CLOSE_FLAG_DEC H5P__decode_bool #ifdef H5_HAVE_PARALLEL /* Definition of collective metadata read mode flag */ #define H5F_ACS_COLL_MD_READ_FLAG_SIZE sizeof(H5P_coll_md_read_flag_t) @@ -253,10 +253,10 @@ #define H5F_ACS_COLL_MD_READ_FLAG_ENC H5P__encode_coll_md_read_flag_t #define H5F_ACS_COLL_MD_READ_FLAG_DEC H5P__decode_coll_md_read_flag_t /* Definition of collective metadata write mode flag */ -#define H5F_ACS_COLL_MD_WRITE_FLAG_SIZE sizeof(hbool_t) -#define H5F_ACS_COLL_MD_WRITE_FLAG_DEF FALSE -#define H5F_ACS_COLL_MD_WRITE_FLAG_ENC H5P__encode_hbool_t -#define H5F_ACS_COLL_MD_WRITE_FLAG_DEC H5P__decode_hbool_t +#define H5F_ACS_COLL_MD_WRITE_FLAG_SIZE sizeof(bool) +#define H5F_ACS_COLL_MD_WRITE_FLAG_DEF false +#define H5F_ACS_COLL_MD_WRITE_FLAG_ENC H5P__encode_bool +#define H5F_ACS_COLL_MD_WRITE_FLAG_DEC H5P__decode_bool /* Definition for the file's MPI communicator */ #define H5F_ACS_MPI_PARAMS_COMM_SIZE sizeof(MPI_Comm) #define H5F_ACS_MPI_PARAMS_COMM_DEF MPI_COMM_NULL @@ -313,26 +313,26 @@ /* Definition for using file locking or not. The default is set * via the configure step. */ -#define H5F_ACS_USE_FILE_LOCKING_SIZE sizeof(hbool_t) +#define H5F_ACS_USE_FILE_LOCKING_SIZE sizeof(bool) #if defined H5_USE_FILE_LOCKING && H5_USE_FILE_LOCKING -#define H5F_ACS_USE_FILE_LOCKING_DEF TRUE +#define H5F_ACS_USE_FILE_LOCKING_DEF true #else -#define H5F_ACS_USE_FILE_LOCKING_DEF FALSE +#define H5F_ACS_USE_FILE_LOCKING_DEF false #endif -#define H5F_ACS_USE_FILE_LOCKING_ENC H5P__encode_hbool_t -#define H5F_ACS_USE_FILE_LOCKING_DEC H5P__decode_hbool_t +#define H5F_ACS_USE_FILE_LOCKING_ENC H5P__encode_bool +#define H5F_ACS_USE_FILE_LOCKING_DEC H5P__decode_bool /* Definition for whether we ignore file locking errors when we can * tell that file locking has been disabled on the file system. * The default is set via the configure step. */ -#define H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_SIZE sizeof(hbool_t) +#define H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_SIZE sizeof(bool) #if defined H5_IGNORE_DISABLED_FILE_LOCKS && H5_IGNORE_DISABLED_FILE_LOCKS -#define H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_DEF TRUE +#define H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_DEF true #else -#define H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_DEF FALSE +#define H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_DEF false #endif -#define H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_ENC H5P__encode_hbool_t -#define H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_DEC H5P__decode_hbool_t +#define H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_ENC H5P__encode_bool +#define H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_DEC H5P__decode_bool /******************/ /* Local Typedefs */ @@ -478,8 +478,7 @@ static const H5F_close_degree_t H5F_def_close_degree_g = H5F_CLOSE_DEGREE_DEF; / static const hsize_t H5F_def_family_offset_g = H5F_ACS_FAMILY_OFFSET_DEF; /* Default offset for family VFD */ static const hsize_t H5F_def_family_newsize_g = H5F_ACS_FAMILY_NEWSIZE_DEF; /* Default size of new files for family VFD */ -static const hbool_t H5F_def_family_to_single_g = - H5F_ACS_FAMILY_TO_SINGLE_DEF; /* Default ?? for family VFD */ +static const bool H5F_def_family_to_single_g = H5F_ACS_FAMILY_TO_SINGLE_DEF; /* Default ?? for family VFD */ static const H5FD_mem_t H5F_def_mem_type_g = H5F_ACS_MULTI_TYPE_DEF; /* Default file space type for multi VFD */ @@ -488,7 +487,7 @@ static const H5F_libver_t H5F_def_libver_low_bound_g = static const H5F_libver_t H5F_def_libver_high_bound_g = H5F_ACS_LIBVER_HIGH_BOUND_DEF; /* Default setting for "high" bound of format version */ -static const hbool_t H5F_def_want_posix_fd_g = +static const bool H5F_def_want_posix_fd_g = H5F_ACS_WANT_POSIX_FD_DEF; /* Default setting for retrieving 'handle' from core VFD */ static const unsigned H5F_def_efc_size_g = H5F_ACS_EFC_SIZE_DEF; /* Default external file cache size */ static const H5FD_file_image_info_t H5F_def_file_image_info_g = @@ -497,24 +496,24 @@ static const unsigned H5F_def_metadata_read_attempts_g = H5F_ACS_METADATA_READ_ATTEMPTS_DEF; /* Default setting for the # of metadata read attempts */ static const H5F_object_flush_t H5F_def_object_flush_cb_g = H5F_ACS_OBJECT_FLUSH_CB_DEF; /* Default setting for object flush callback */ -static const hbool_t H5F_def_clear_status_flags_g = +static const bool H5F_def_clear_status_flags_g = H5F_ACS_CLEAR_STATUS_FLAGS_DEF; /* Default to clear the superblock status_flags */ -static const hbool_t H5F_def_skip_eof_check_g = +static const bool H5F_def_skip_eof_check_g = H5F_ACS_SKIP_EOF_CHECK_DEF; /* Default setting for skipping EOF check */ -static const hbool_t H5F_def_null_fsm_addr_g = +static const bool H5F_def_null_fsm_addr_g = H5F_ACS_NULL_FSM_ADDR_DEF; /* Default setting for dropping free-space to the floor */ -static const hbool_t H5F_def_use_mdc_logging_g = +static const bool H5F_def_use_mdc_logging_g = H5F_ACS_USE_MDC_LOGGING_DEF; /* Default metadata cache logging flag */ -static const char *H5F_def_mdc_log_location_g = H5F_ACS_MDC_LOG_LOCATION_DEF; /* Default mdc log location */ -static const hbool_t H5F_def_start_mdc_log_on_access_g = +static const char *H5F_def_mdc_log_location_g = H5F_ACS_MDC_LOG_LOCATION_DEF; /* Default mdc log location */ +static const bool H5F_def_start_mdc_log_on_access_g = H5F_ACS_START_MDC_LOG_ON_ACCESS_DEF; /* Default mdc log start on access flag */ -static const hbool_t H5F_def_evict_on_close_flag_g = +static const bool H5F_def_evict_on_close_flag_g = H5F_ACS_EVICT_ON_CLOSE_FLAG_DEF; /* Default setting for evict on close property */ #ifdef H5_HAVE_PARALLEL static const H5P_coll_md_read_flag_t H5F_def_coll_md_read_flag_g = H5F_ACS_COLL_MD_READ_FLAG_DEF; /* Default setting for the collective metedata read flag */ -static const hbool_t H5F_def_coll_md_write_flag_g = +static const bool H5F_def_coll_md_write_flag_g = H5F_ACS_COLL_MD_WRITE_FLAG_DEF; /* Default setting for the collective metedata write flag */ static const MPI_Comm H5F_def_mpi_params_comm_g = H5F_ACS_MPI_PARAMS_COMM_DEF; /* Default MPI communicator */ static const MPI_Info H5F_def_mpi_params_info_g = H5F_ACS_MPI_PARAMS_INFO_DEF; /* Default MPI info struct */ @@ -526,9 +525,9 @@ static const unsigned H5F_def_page_buf_min_meta_perc_g = H5F_ACS_PAGE_BUFFER_MIN_META_PERC_DEF; /* Default page buffer minimum metadata size */ static const unsigned H5F_def_page_buf_min_raw_perc_g = H5F_ACS_PAGE_BUFFER_MIN_RAW_PERC_DEF; /* Default page buffer minimum raw data size */ -static const hbool_t H5F_def_use_file_locking_g = +static const bool H5F_def_use_file_locking_g = H5F_ACS_USE_FILE_LOCKING_DEF; /* Default use file locking flag */ -static const hbool_t H5F_def_ignore_disabled_file_locks_g = +static const bool H5F_def_ignore_disabled_file_locks_g = H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_DEF; /* Default ignore disabled file locks flag */ /*------------------------------------------------------------------------- @@ -845,14 +844,14 @@ herr_t H5P__facc_set_def_driver(void) { const char *driver_env_var; - hbool_t driver_ref_inc = FALSE; + bool driver_ref_inc = false; hid_t driver_id = H5I_INVALID_HID; /* VFL driver ID */ herr_t ret_value = SUCCEED; FUNC_ENTER_PACKAGE /* Check if VFL driver environment variable is set */ - driver_env_var = HDgetenv(HDF5_DRIVER); + driver_env_var = getenv(HDF5_DRIVER); /* Only parse VFL driver string if it's set */ if (driver_env_var && *driver_env_var) { @@ -868,29 +867,29 @@ H5P__facc_set_def_driver(void) if (driver_is_registered) { assert(driver_id >= 0); - if (H5I_inc_ref(driver_id, TRUE) < 0) + if (H5I_inc_ref(driver_id, true) < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTINC, FAIL, "unable to increment ref count on VFD"); - driver_ref_inc = TRUE; + driver_ref_inc = true; } /* end else-if */ else { /* Check for VFL drivers that ship with the library */ if (H5P__facc_set_def_driver_check_predefined(driver_env_var, &driver_id) < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't check for predefined VFL driver name"); else if (driver_id > 0) { - if (H5I_inc_ref(driver_id, TRUE) < 0) + if (H5I_inc_ref(driver_id, true) < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTINC, FAIL, "can't increment VFL driver refcount"); - driver_ref_inc = TRUE; + driver_ref_inc = true; } else { /* Register the VFL driver */ - if ((driver_id = H5FD_register_driver_by_name(driver_env_var, TRUE)) < 0) + if ((driver_id = H5FD_register_driver_by_name(driver_env_var, true)) < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, FAIL, "can't register VFL driver"); - driver_ref_inc = TRUE; + driver_ref_inc = true; } /* end else */ } /* end else */ /* Retrieve driver configuration string from environment variable, if set. */ - driver_config_env_var = HDgetenv(HDF5_DRIVER_CONFIG); + driver_config_env_var = getenv(HDF5_DRIVER_CONFIG); driver_prop.driver_id = driver_id; driver_prop.driver_info = NULL; @@ -949,35 +948,35 @@ H5P__facc_set_def_driver_check_predefined(const char *driver_name, hid_t *driver assert(driver_name); assert(driver_id); - if (!HDstrcmp(driver_name, "sec2")) { + if (!strcmp(driver_name, "sec2")) { if ((*driver_id = H5FD_SEC2) < 0) HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize sec2 VFD"); } - else if (!HDstrcmp(driver_name, "core") || !HDstrcmp(driver_name, "core_paged")) { + else if (!strcmp(driver_name, "core") || !strcmp(driver_name, "core_paged")) { if ((*driver_id = H5FD_CORE) < 0) HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize core VFD"); } - else if (!HDstrcmp(driver_name, "log")) { + else if (!strcmp(driver_name, "log")) { if ((*driver_id = H5FD_LOG) < 0) HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize log VFD"); } - else if (!HDstrcmp(driver_name, "family")) { + else if (!strcmp(driver_name, "family")) { if ((*driver_id = H5FD_FAMILY) < 0) HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize family VFD"); } - else if (!HDstrcmp(driver_name, "multi") || !HDstrcmp(driver_name, "split")) { + else if (!strcmp(driver_name, "multi") || !strcmp(driver_name, "split")) { if ((*driver_id = H5FD_MULTI) < 0) HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize multi VFD"); } - else if (!HDstrcmp(driver_name, "stdio")) { + else if (!strcmp(driver_name, "stdio")) { if ((*driver_id = H5FD_STDIO) < 0) HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize stdio VFD"); } - else if (!HDstrcmp(driver_name, "splitter")) { + else if (!strcmp(driver_name, "splitter")) { if ((*driver_id = H5FD_SPLITTER) < 0) HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize splitter VFD"); } - else if (!HDstrcmp(driver_name, "mpio")) { + else if (!strcmp(driver_name, "mpio")) { #ifdef H5_HAVE_PARALLEL if ((*driver_id = H5FD_MPIO) < 0) HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize MPI I/O VFD"); @@ -985,7 +984,7 @@ H5P__facc_set_def_driver_check_predefined(const char *driver_name, hid_t *driver HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "MPI-I/O VFD is not enabled"); #endif } - else if (!HDstrcmp(driver_name, "direct")) { + else if (!strcmp(driver_name, "direct")) { #ifdef H5_HAVE_DIRECT if ((*driver_id = H5FD_DIRECT) < 0) HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize Direct I/O VFD"); @@ -993,7 +992,7 @@ H5P__facc_set_def_driver_check_predefined(const char *driver_name, hid_t *driver HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "Direct I/O VFD is not enabled"); #endif } - else if (!HDstrcmp(driver_name, "mirror")) { + else if (!strcmp(driver_name, "mirror")) { #ifdef H5_HAVE_MIRROR_VFD if ((*driver_id = H5FD_MIRROR) < 0) HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize mirror VFD"); @@ -1001,7 +1000,7 @@ H5P__facc_set_def_driver_check_predefined(const char *driver_name, hid_t *driver HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "Mirror VFD is not enabled"); #endif } - else if (!HDstrcmp(driver_name, "hdfs")) { + else if (!strcmp(driver_name, "hdfs")) { #ifdef H5_HAVE_LIBHDFS if ((*driver_id = H5FD_HDFS) < 0) HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize HDFS VFD"); @@ -1009,7 +1008,7 @@ H5P__facc_set_def_driver_check_predefined(const char *driver_name, hid_t *driver HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "HDFS VFD is not enabled"); #endif } - else if (!HDstrcmp(driver_name, "ros3")) { + else if (!strcmp(driver_name, "ros3")) { #ifdef H5_HAVE_ROS3_VFD if ((*driver_id = H5FD_ROS3) < 0) HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize ROS3 VFD"); @@ -1017,7 +1016,7 @@ H5P__facc_set_def_driver_check_predefined(const char *driver_name, hid_t *driver HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "ROS3 VFD is not enabled"); #endif } - else if (!HDstrcmp(driver_name, "subfiling")) { + else if (!strcmp(driver_name, "subfiling")) { #ifdef H5_HAVE_SUBFILING_VFD if ((*driver_id = H5FD_SUBFILING) < 0) HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize Subfiling VFD"); @@ -1025,7 +1024,7 @@ H5P__facc_set_def_driver_check_predefined(const char *driver_name, hid_t *driver HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "Subfiling VFD is not enabled"); #endif } - else if (!HDstrcmp(driver_name, "windows")) { + else if (!strcmp(driver_name, "windows")) { #ifdef H5_HAVE_WINDOWS if ((*driver_id = H5FD_WINDOWS) < 0) HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize Windows VFD"); @@ -1160,7 +1159,7 @@ H5P_set_driver(H5P_genplist_t *plist, hid_t new_driver_id, const void *new_drive if (NULL == H5I_object_verify(new_driver_id, H5I_VFL)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file driver ID"); - if (TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) { + if (true == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) { H5FD_driver_prop_t driver_prop; /* Property for driver ID, info & config. string */ /* Prepare the driver property */ @@ -1237,7 +1236,7 @@ done: */ herr_t H5P_set_driver_by_name(H5P_genplist_t *plist, const char *driver_name, const char *driver_config, - hbool_t app_ref) + bool app_ref) { hid_t new_driver_id = H5I_INVALID_HID; herr_t ret_value = SUCCEED; @@ -1299,7 +1298,7 @@ H5Pset_driver_by_name(hid_t plist_id, const char *driver_name, const char *drive HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "driver_name parameter cannot be an empty string"); /* Set the driver */ - if (H5P_set_driver_by_name(plist, driver_name, driver_config, TRUE) < 0) + if (H5P_set_driver_by_name(plist, driver_name, driver_config, true) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set driver info"); done: @@ -1325,7 +1324,7 @@ done: */ herr_t H5P_set_driver_by_value(H5P_genplist_t *plist, H5FD_class_value_t driver_value, const char *driver_config, - hbool_t app_ref) + bool app_ref) { hid_t new_driver_id = H5I_INVALID_HID; herr_t ret_value = SUCCEED; @@ -1385,7 +1384,7 @@ H5Pset_driver_by_value(hid_t plist_id, H5FD_class_value_t driver_value, const ch HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "negative VFD value is disallowed"); /* Set the driver */ - if (H5P_set_driver_by_value(plist, driver_value, driver_config, TRUE) < 0) + if (H5P_set_driver_by_value(plist, driver_value, driver_config, true) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set driver info"); done: @@ -1415,7 +1414,7 @@ H5P_peek_driver(H5P_genplist_t *plist) FUNC_ENTER_NOAPI(FAIL) /* Get the current driver ID */ - if (TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) { + if (true == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) { H5FD_driver_prop_t driver_prop; /* Property for driver ID, info & configuration string */ if (H5P_peek(plist, H5F_ACS_FILE_DRV_NAME, &driver_prop) < 0) @@ -1493,7 +1492,7 @@ H5P_peek_driver_info(H5P_genplist_t *plist) FUNC_ENTER_NOAPI(NULL) /* Get the current driver info */ - if (TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) { + if (true == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) { H5FD_driver_prop_t driver_prop; /* Property for driver ID, info & configuration string */ if (H5P_peek(plist, H5F_ACS_FILE_DRV_NAME, &driver_prop) < 0) @@ -1565,7 +1564,7 @@ H5P_peek_driver_config_str(H5P_genplist_t *plist) FUNC_ENTER_NOAPI(NULL) /* Get the current driver configuration string */ - if (TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) { + if (true == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) { H5FD_driver_prop_t driver_prop; /* Property for driver ID, info & configuration string */ if (H5P_peek(plist, H5F_ACS_FILE_DRV_NAME, &driver_prop) < 0) @@ -1617,10 +1616,10 @@ H5Pget_driver_config_str(hid_t fapl_id, char *config_buf, size_t buf_size) /* Retrieve configuration string property */ if ((config_str = H5P_peek_driver_config_str(plist))) { - size_t config_str_len = HDstrlen(config_str); + size_t config_str_len = strlen(config_str); if (config_buf) { - HDstrncpy(config_buf, config_str, buf_size); + strncpy(config_buf, config_str, buf_size); if (config_str_len >= buf_size) config_buf[buf_size - 1] = '\0'; } @@ -1661,7 +1660,7 @@ H5P__file_driver_copy(void *value) /* Copy the driver & info, if there is one */ if (info->driver_id > 0) { /* Increment the reference count on driver and copy driver info */ - if (H5I_inc_ref(info->driver_id, FALSE) < 0) + if (H5I_inc_ref(info->driver_id, false) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINC, FAIL, "unable to increment ref count on VFL driver"); /* Copy driver info, if it exists */ @@ -1917,7 +1916,7 @@ H5P__facc_file_driver_cmp(const void *_info1, const void *_info2, size_t H5_ATTR HGOTO_DONE(-1); if (cls1->name != NULL && cls2->name == NULL) HGOTO_DONE(1); - if (0 != (cmp_value = HDstrcmp(cls1->name, cls2->name))) + if (0 != (cmp_value = strcmp(cls1->name, cls2->name))) HGOTO_DONE(cmp_value); /* Compare driver infos */ @@ -1942,7 +1941,7 @@ H5P__facc_file_driver_cmp(const void *_info1, const void *_info2, size_t H5_ATTR if (info1->driver_config_str != NULL && info2->driver_config_str == NULL) HGOTO_DONE(1); if (info1->driver_config_str) { - if (0 != (cmp_value = HDstrcmp(info1->driver_config_str, info2->driver_config_str))) + if (0 != (cmp_value = strcmp(info1->driver_config_str, info2->driver_config_str))) HGOTO_DONE(cmp_value); } @@ -4098,7 +4097,7 @@ H5P__facc_cache_config_dec(const void **_pp, void *_value) H5_DECODE_UNSIGNED(*pp, config->close_trace_file); - HDstrcpy(config->trace_file_name, (const char *)(*pp)); + strcpy(config->trace_file_name, (const char *)(*pp)); *pp += H5AC__MAX_TRACE_FILE_NAME_LEN + 1; H5_DECODE_UNSIGNED(*pp, config->evictions_enabled); @@ -4623,7 +4622,7 @@ H5Pget_mdc_log_options(hid_t plist_id, hbool_t *is_enabled /*out*/, char *locati /* Get location size, including terminating NULL */ if (location_size) { if (location_ptr) - *location_size = HDstrlen(location_ptr) + 1; + *location_size = strlen(location_ptr) + 1; else *location_size = 0; } /* end if */ @@ -4659,7 +4658,7 @@ H5P__facc_mdc_log_location_enc(const void *value, void **_pp, size_t *size) /* calculate prefix length */ if (NULL != log_location) - len = HDstrlen(log_location); + len = strlen(log_location); enc_value = (uint64_t)len; enc_size = H5VM_limit_enc_size(enc_value); @@ -4725,7 +4724,7 @@ H5P__facc_mdc_log_location_dec(const void **_pp, void *_value) /* Make a copy of the user's prefix string */ if (NULL == (*log_location = (char *)H5MM_malloc(len + 1))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "memory allocation failed for prefix"); - HDstrncpy(*log_location, *(const char **)pp, len); + strncpy(*log_location, *(const char **)pp, len); (*log_location)[len] = '\0'; *pp += len; @@ -4805,7 +4804,7 @@ H5P__facc_mdc_log_location_cmp(const void *value1, const void *value2, size_t H5 if (NULL != pref1 && NULL == pref2) HGOTO_DONE(-1); if (NULL != pref1 && NULL != pref2) - ret_value = HDstrcmp(pref1, pref2); + ret_value = strcmp(pref1, pref2); done: FUNC_LEAVE_NOAPI(ret_value) @@ -4858,7 +4857,7 @@ H5Pset_evict_on_close(hid_t fapl_id, hbool_t H5_ATTR_PARALLEL_UNUSED evict_on_cl H5TRACE2("e", "ib", fapl_id, evict_on_close); /* Compare the property list's class against the other class */ - if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) + if (true != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist"); /* Get the plist structure */ @@ -4903,7 +4902,7 @@ H5Pget_evict_on_close(hid_t fapl_id, hbool_t *evict_on_close /*out*/) H5TRACE2("e", "ix", fapl_id, evict_on_close); /* Compare the property list's class against the other class */ - if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) + if (true != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not an access plist"); /* Get the plist structure */ @@ -4945,7 +4944,7 @@ H5Pset_file_locking(hid_t fapl_id, hbool_t use_file_locking, hbool_t ignore_when H5TRACE3("e", "ibb", fapl_id, use_file_locking, ignore_when_disabled); /* Make sure this is a fapl */ - if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) + if (true != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist"); /* Get the plist structure */ @@ -4984,7 +4983,7 @@ H5Pget_file_locking(hid_t fapl_id, hbool_t *use_file_locking /*out*/, hbool_t *i H5TRACE3("e", "ixx", fapl_id, use_file_locking, ignore_when_disabled); /* Make sure this is a fapl */ - if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) + if (true != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not an access plist"); /* Get the plist structure */ @@ -5098,10 +5097,10 @@ H5Pset_all_coll_metadata_ops(hid_t plist_id, hbool_t is_collective) /* (Dataset, group, attribute, and named datatype access property lists * are sub-classes of link access property lists -QAK) */ - if (TRUE != H5P_isa_class(plist_id, H5P_LINK_ACCESS) && TRUE != H5P_isa_class(plist_id, H5P_FILE_ACCESS)) + if (true != H5P_isa_class(plist_id, H5P_LINK_ACCESS) && true != H5P_isa_class(plist_id, H5P_FILE_ACCESS)) HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not an access plist"); - /* set property to either TRUE if > 0, or FALSE otherwise */ + /* set property to either true if > 0, or false otherwise */ if (is_collective) coll_meta_read = H5P_USER_TRUE; else @@ -5145,13 +5144,13 @@ H5Pget_all_coll_metadata_ops(hid_t plist_id, hbool_t *is_collective /*out*/) /* (Dataset, group, attribute, and named datatype access property lists * are sub-classes of link access property lists -QAK) */ - if (TRUE != H5P_isa_class(plist_id, H5P_LINK_ACCESS) && TRUE != H5P_isa_class(plist_id, H5P_FILE_ACCESS)) + if (true != H5P_isa_class(plist_id, H5P_LINK_ACCESS) && true != H5P_isa_class(plist_id, H5P_FILE_ACCESS)) HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not an access plist"); /* Get value */ if (is_collective) { H5P_coll_md_read_flag_t - internal_flag; /* property setting. we need to convert to either TRUE or FALSE */ + internal_flag; /* property setting. we need to convert to either true or false */ H5P_genplist_t *plist; /* Property list pointer */ /* Get the plist structure */ @@ -5162,9 +5161,9 @@ H5Pget_all_coll_metadata_ops(hid_t plist_id, hbool_t *is_collective /*out*/) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get core collective metadata read flag"); if (internal_flag < 0) - *is_collective = FALSE; + *is_collective = false; else - *is_collective = (hbool_t)internal_flag; + *is_collective = (bool)internal_flag; } /* end if */ done: @@ -5191,7 +5190,7 @@ H5Pset_coll_metadata_write(hid_t plist_id, hbool_t is_collective) H5TRACE2("e", "ib", plist_id, is_collective); /* Compare the property list's class against the other class */ - if (TRUE != H5P_isa_class(plist_id, H5P_FILE_ACCESS)) + if (true != H5P_isa_class(plist_id, H5P_FILE_ACCESS)) HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist"); /* Get the plist structure */ @@ -5225,7 +5224,7 @@ H5Pget_mpi_params(hid_t plist_id, MPI_Comm *comm /*out*/, MPI_Info *info /*out*/ H5TRACE3("e", "ixx", plist_id, comm, info); /* Make sure that the property list is a fapl */ - if (TRUE != H5P_isa_class(plist_id, H5P_FILE_ACCESS)) + if (true != H5P_isa_class(plist_id, H5P_FILE_ACCESS)) HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist"); /* Get the plist structure */ @@ -5265,7 +5264,7 @@ H5Pset_mpi_params(hid_t plist_id, MPI_Comm comm, MPI_Info info) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "not a valid argument"); /* Make sure that the property list is a fapl */ - if (TRUE != H5P_isa_class(plist_id, H5P_FILE_ACCESS)) + if (true != H5P_isa_class(plist_id, H5P_FILE_ACCESS)) HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist"); /* Get the plist structure */ @@ -5669,7 +5668,7 @@ H5Pget_coll_metadata_write(hid_t plist_id, hbool_t *is_collective /*out*/) H5TRACE2("e", "ix", plist_id, is_collective); /* Compare the property list's class against the other class */ - if (TRUE != H5P_isa_class(plist_id, H5P_FILE_ACCESS)) + if (true != H5P_isa_class(plist_id, H5P_FILE_ACCESS)) HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not an access plist"); /* Get the plist structure */ @@ -5792,7 +5791,7 @@ H5P_set_vol(H5P_genplist_t *plist, hid_t vol_id, const void *vol_info) if (NULL == H5I_object_verify(vol_id, H5I_VOL)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); - if (TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) { + if (true == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) { H5VL_connector_prop_t vol_prop; /* Property for VOL ID & info */ /* Prepare the VOL connector property */ @@ -5905,7 +5904,7 @@ H5Pget_vol_id(hid_t plist_id, hid_t *vol_id /*out*/) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* Get the current VOL ID */ - if (TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) { + if (true == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) { H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */ /* Get the connector property */ @@ -5913,7 +5912,7 @@ H5Pget_vol_id(hid_t plist_id, hid_t *vol_id /*out*/) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get VOL connector info"); /* Increment the VOL ID's ref count */ - if (H5I_inc_ref(connector_prop.connector_id, TRUE) < 0) + if (H5I_inc_ref(connector_prop.connector_id, true) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINC, FAIL, "unable to increment ref count on VOL connector ID"); /* Set the connector ID to return */ @@ -5951,7 +5950,7 @@ H5Pget_vol_info(hid_t plist_id, void **vol_info /*out*/) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* Get the current VOL info */ - if (TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) { + if (true == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) { void *new_connector_info = NULL; /* Copy of connector info */ H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */ @@ -6019,7 +6018,7 @@ H5Pget_vol_cap_flags(hid_t plist_id, uint64_t *cap_flags) if (H5P_DEFAULT == plist_id) plist_id = H5P_FILE_ACCESS_DEFAULT; - if (TRUE == H5P_isa_class(plist_id, H5P_FILE_ACCESS)) { + if (true == H5P_isa_class(plist_id, H5P_FILE_ACCESS)) { H5P_genplist_t *plist; /* Property list pointer */ H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */ |