diff options
Diffstat (limited to 'fortran/src/H5Pf.c')
-rw-r--r-- | fortran/src/H5Pf.c | 148 |
1 files changed, 74 insertions, 74 deletions
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 38eba37..e02798c 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -224,10 +224,10 @@ int_f h5pset_preserve_c(hid_t_f *prp_id, int_f *flag) /******/ { - int ret_value = 0; - hid_t c_prp_id; - herr_t status; - hbool_t c_flag = 0; + int ret_value = 0; + hid_t c_prp_id; + herr_t status; + bool c_flag = 0; if (*flag > 0) c_flag = 1; @@ -1153,13 +1153,13 @@ int_f h5pset_fapl_core_c(hid_t_f *prp_id, size_t_f *increment, int_f *flag) /******/ { - int ret_value = -1; - hid_t c_prp_id; - herr_t ret = -1; - size_t c_increment; - hbool_t c_backing_store; + int ret_value = -1; + hid_t c_prp_id; + herr_t ret = -1; + size_t c_increment; + bool c_backing_store; c_increment = (size_t)*increment; - c_backing_store = (hbool_t)*flag; + c_backing_store = (bool)*flag; /* * Call H5Pset_fapl_core function. @@ -1194,11 +1194,11 @@ int_f h5pget_fapl_core_c(hid_t_f *prp_id, size_t_f *increment, int_f *flag) /******/ { - int ret_value = -1; - hid_t c_prp_id; - herr_t ret = -1; - size_t c_increment = 0; - hbool_t c_backing_store; + int ret_value = -1; + hid_t c_prp_id; + herr_t ret = -1; + size_t c_increment = 0; + bool c_backing_store; *flag = 0; /* * Call H5Pset_fapl_core function. @@ -1445,7 +1445,7 @@ h5pset_fapl_split_c(hid_t_f *prp_id, int_f *meta_len, _fcd meta_ext, hid_t_f *me return ret_value; c_raw_ext = (char *)HD5f2cstring(raw_ext, (size_t)*raw_len); if (c_raw_ext == NULL) { - HDfree(c_meta_ext); + free(c_meta_ext); return ret_value; } @@ -1462,8 +1462,8 @@ h5pset_fapl_split_c(hid_t_f *prp_id, int_f *meta_len, _fcd meta_ext, hid_t_f *me ret_value = 0; DONE: - HDfree(c_meta_ext); - HDfree(c_raw_ext); + free(c_meta_ext); + free(c_raw_ext); return ret_value; } @@ -1511,8 +1511,8 @@ h5pget_fapl_split_c(hid_t_f *prp_id, size_t_f *meta_ext_size, _fcd meta_ext, hid c_meta_ext_size = (size_t)*meta_ext_size; c_raw_ext_size = (size_t)*raw_ext_size; - c_meta_ext = (char *)HDmalloc(sizeof(char) * c_meta_ext_size); - c_raw_ext = (char *)HDmalloc(sizeof(char) * c_raw_ext_size); + c_meta_ext = (char *)malloc(sizeof(char) * c_meta_ext_size); + c_raw_ext = (char *)malloc(sizeof(char) * c_raw_ext_size); if (c_meta_ext == NULL || c_raw_ext == NULL) return ret_value; @@ -1726,7 +1726,7 @@ h5pset_filter_c(hid_t_f *prp_id, int_f *filter, int_f *flags, size_t_f *cd_nelmt unsigned int *c_cd_values; unsigned i; - c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts); + c_cd_values = (unsigned int *)malloc(sizeof(unsigned int) * c_cd_nelmts); if (!c_cd_values) return ret_value; for (i = 0; i < c_cd_nelmts; i++) @@ -1742,7 +1742,7 @@ h5pset_filter_c(hid_t_f *prp_id, int_f *filter, int_f *flags, size_t_f *cd_nelmt ret_value = 0; DONE: - HDfree(c_cd_values); + free(c_cd_values); return ret_value; } @@ -1818,10 +1818,10 @@ h5pget_filter_c(hid_t_f *prp_id, int_f *filter_number, int_f *flags, size_t_f *c c_cd_nelmts = (size_t)*cd_nelmts; - if (NULL == (c_name = (char *)HDmalloc((size_t)*namelen + 1))) + if (NULL == (c_name = (char *)malloc((size_t)*namelen + 1))) goto DONE; - if (NULL == (c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts))) + if (NULL == (c_cd_values = (unsigned int *)malloc(sizeof(unsigned int) * c_cd_nelmts))) goto DONE; /* @@ -1843,9 +1843,9 @@ h5pget_filter_c(hid_t_f *prp_id, int_f *filter_number, int_f *flags, size_t_f *c DONE: if (c_name) - HDfree(c_name); + free(c_name); if (c_cd_values) - HDfree(c_cd_values); + free(c_cd_values); return ret_value; } @@ -1901,7 +1901,7 @@ h5pset_external_c(hid_t_f *prp_id, _fcd name, int_f *namelen, off_t_f *offset, h ret_value = 0; DONE: - HDfree(c_name); + free(c_name); return ret_value; } @@ -1986,7 +1986,7 @@ h5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f *name_size, _fcd name, o * Allocate memory to store the name of the external file. */ if (c_namelen) - c_name = (char *)HDmalloc(c_namelen + 1); + c_name = (char *)malloc(c_namelen + 1); if (c_name == NULL) return ret_value; @@ -2010,7 +2010,7 @@ h5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f *name_size, _fcd name, o ret_value = 0; DONE: - HDfree(c_name); + free(c_name); return ret_value; } @@ -2739,7 +2739,7 @@ h5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls, H5P DONE: if (c_name != NULL) - HDfree(c_name); + free(c_name); return ret_value; } @@ -2782,7 +2782,7 @@ h5pregister_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void H5_ DONE: if (c_name != NULL) - HDfree(c_name); + free(c_name); return ret_value; } @@ -2825,7 +2825,7 @@ h5pinsert_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void H5_ DONE: if (c_name) - HDfree(c_name); + free(c_name); return ret_value; } @@ -2870,7 +2870,7 @@ h5pexist_c(hid_t_f *cls, _fcd name, int_f *name_len) DONE: if (c_name != NULL) - HDfree(c_name); + free(c_name); return ret_value; } /****if* H5Pf/h5pisa_class_c @@ -2954,7 +2954,7 @@ h5pget_size_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size) DONE: if (c_name != NULL) - HDfree(c_name); + free(c_name); return ret_value; } /****if* H5Pf/h5pget_nprops_c @@ -3078,7 +3078,7 @@ h5pcopy_prop_c(hid_t_f *dst_id, hid_t_f *src_id, _fcd name, int_f *name_len) DONE: if (c_name != NULL) - HDfree(c_name); + free(c_name); return ret_value; } /****if* H5Pf/h5premove_c @@ -3121,7 +3121,7 @@ h5premove_c(hid_t_f *plid, _fcd name, int_f *name_len) DONE: if (c_name != NULL) - HDfree(c_name); + free(c_name); return ret_value; } /****if* H5Pf/h5punregister_c @@ -3164,7 +3164,7 @@ h5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len) DONE: if (c_name != NULL) - HDfree(c_name); + free(c_name); return ret_value; } /****if* H5Pf/h5pclose_class_c @@ -3235,7 +3235,7 @@ h5pget_class_name_c(hid_t_f *cls, _fcd name, int_f *name_len) goto DONE; HD5packFstring(c_name, _fcdtocp(name), (size_t)*name_len); - ret_value = (int_f)HDstrlen(c_name); + ret_value = (int_f)strlen(c_name); H5free_memory(c_name); DONE: @@ -3281,7 +3281,7 @@ h5pset_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) DONE: if (c_name != NULL) - HDfree(c_name); + free(c_name); return ret_value; } @@ -3325,7 +3325,7 @@ h5pget_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value) DONE: if (c_name != NULL) - HDfree(c_name); + free(c_name); return ret_value; } @@ -3534,14 +3534,14 @@ h5pset_fapl_multi_c(hid_t_f *prp_id, int_f *memb_map, hid_t_f *memb_fapl, _fcd m hid_t c_memb_fapl[H5FD_MEM_NTYPES]; char *c_memb_name[H5FD_MEM_NTYPES]; haddr_t c_memb_addr[H5FD_MEM_NTYPES]; - hbool_t relax; + bool relax; herr_t status; char *tmp, *tmp_p, *tmp_pp; int i; int c_lenmax; long double tmp_max_addr; c_lenmax = (int)*lenmax; - relax = (hbool_t)*flag; + relax = (bool)*flag; /* * Check that we got correct values from Fortran for memb_addr array */ @@ -3558,8 +3558,8 @@ h5pset_fapl_multi_c(hid_t_f *prp_id, int_f *memb_map, hid_t_f *memb_fapl, _fcd m return ret_value; tmp_p = tmp; for (i = 0; i < H5FD_MEM_NTYPES; i++) { - c_memb_name[i] = (char *)HDmalloc((size_t)len[i] + 1); - HDmemcpy(c_memb_name[i], tmp_p, (size_t)len[i]); + c_memb_name[i] = (char *)malloc((size_t)len[i] + 1); + memcpy(c_memb_name[i], tmp_p, (size_t)len[i]); tmp_pp = c_memb_name[i]; tmp_pp[len[i]] = '\0'; tmp_p = tmp_p + c_lenmax; @@ -3588,9 +3588,9 @@ h5pset_fapl_multi_c(hid_t_f *prp_id, int_f *memb_map, hid_t_f *memb_fapl, _fcd m ret_value = 0; DONE: - HDfree(tmp); + free(tmp); for (i = 0; i < H5FD_MEM_NTYPES; i++) - HDfree(c_memb_name[i]); + free(c_memb_name[i]); return ret_value; } @@ -3615,12 +3615,12 @@ int_f h5pset_fapl_multi_sc(hid_t_f *prp_id, int_f *flag) /******/ { - int_f ret_value = -1; - hid_t c_prp_id; - hbool_t relax; - herr_t status; + int_f ret_value = -1; + hid_t c_prp_id; + bool relax; + herr_t status; - relax = (hbool_t)*flag; + relax = (bool)*flag; c_prp_id = (hid_t)*prp_id; /* * Call H5Pset_fapl_multi function @@ -3667,7 +3667,7 @@ h5pget_fapl_multi_c(hid_t_f *prp_id, int_f *memb_map, hid_t_f *memb_fapl, _fcd m hid_t c_memb_fapl[H5FD_MEM_NTYPES]; char *c_memb_name[H5FD_MEM_NTYPES]; haddr_t c_memb_addr[H5FD_MEM_NTYPES]; - hbool_t relax; + bool relax; herr_t status; char *tmp, *tmp_p; int i; @@ -3687,9 +3687,9 @@ h5pget_fapl_multi_c(hid_t_f *prp_id, int_f *memb_map, hid_t_f *memb_fapl, _fcd m /* * Take care of names array */ - tmp = (char *)HDmalloc(c_lenmax * H5FD_MEM_NTYPES + 1); + tmp = (char *)malloc(c_lenmax * H5FD_MEM_NTYPES + 1); tmp_p = tmp; - HDmemset(tmp, ' ', c_lenmax * H5FD_MEM_NTYPES); + memset(tmp, ' ', c_lenmax * H5FD_MEM_NTYPES); tmp[c_lenmax * H5FD_MEM_NTYPES] = '\0'; for (i = 0; i < H5FD_MEM_NTYPES; i++) { memcpy(tmp_p, c_memb_name[i], strlen(c_memb_name[i])); @@ -3714,9 +3714,9 @@ h5pget_fapl_multi_c(hid_t_f *prp_id, int_f *memb_map, hid_t_f *memb_fapl, _fcd m *flag = (int_f)relax; *maxlen_out = (int_f)length; ret_value = 0; - HDfree(tmp); + free(tmp); for (i = 0; i < H5FD_MEM_NTYPES; i++) - HDfree(c_memb_name[i]); + free(c_memb_name[i]); return ret_value; } @@ -3842,10 +3842,10 @@ h5pget_filter_by_id_c(hid_t_f *prp_id, int_f *filter_id, int_f *flags, size_t_f unsigned i; int_f ret_value = -1; - if (NULL == (c_name = (char *)HDmalloc((size_t)*namelen + 1))) + if (NULL == (c_name = (char *)malloc((size_t)*namelen + 1))) goto DONE; - if (NULL == (c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts_in))) + if (NULL == (c_cd_values = (unsigned int *)malloc(sizeof(unsigned int) * c_cd_nelmts_in))) goto DONE; /* @@ -3857,7 +3857,7 @@ h5pget_filter_by_id_c(hid_t_f *prp_id, int_f *filter_id, int_f *flags, size_t_f *cd_nelmts = (size_t_f)c_cd_nelmts; *flags = (int_f)c_flags; - HD5packFstring(c_name, _fcdtocp(name), HDstrlen(c_name)); + HD5packFstring(c_name, _fcdtocp(name), strlen(c_name)); for (i = 0; i < c_cd_nelmts_in; i++) cd_values[i] = (int_f)c_cd_values[i]; @@ -3866,9 +3866,9 @@ h5pget_filter_by_id_c(hid_t_f *prp_id, int_f *filter_id, int_f *flags, size_t_f DONE: if (c_name) - HDfree(c_name); + free(c_name); if (c_cd_values) - HDfree(c_cd_values); + free(c_cd_values); return ret_value; } @@ -3907,7 +3907,7 @@ h5pmodify_filter_c(hid_t_f *prp_id, int_f *filter, int_f *flags, size_t_f *cd_ne unsigned int *c_cd_values; unsigned i; - c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts); + c_cd_values = (unsigned int *)malloc(sizeof(unsigned int) * c_cd_nelmts); if (!c_cd_values) return ret_value; for (i = 0; i < c_cd_nelmts; i++) @@ -3923,7 +3923,7 @@ h5pmodify_filter_c(hid_t_f *prp_id, int_f *filter, int_f *flags, size_t_f *cd_ne ret_value = 0; DONE: - HDfree(c_cd_values); + free(c_cd_values); return ret_value; } @@ -4281,9 +4281,9 @@ int_f h5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag) /******/ { - int ret_value = -1; - hbool_t c_track_times = 0; - herr_t ret; + int ret_value = -1; + bool c_track_times = 0; + herr_t ret; /* * Call H5Pget_obj_track_times function. @@ -4323,11 +4323,11 @@ int_f h5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag) /******/ { - int ret_value = -1; - hbool_t c_track_times; - herr_t ret; + int ret_value = -1; + bool c_track_times; + herr_t ret; - c_track_times = (hbool_t)*flag; + c_track_times = (bool)*flag; /* * Call H5Pset_obj_track_times function. @@ -4632,7 +4632,7 @@ h5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_le * Allocate memory to store the expression. */ if (c_expression_len) { - c_expression = (char *)HDmalloc(c_expression_len); + c_expression = (char *)malloc(c_expression_len); if (NULL == c_expression) HGOTO_DONE(FAIL) } /* end if */ @@ -4651,7 +4651,7 @@ h5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_le done: if (c_expression) - HDfree(c_expression); + free(c_expression); return ret_value; } @@ -4702,7 +4702,7 @@ h5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_le done: if (c_expression) - HDfree(c_expression); + free(c_expression); return ret_value; } @@ -5373,7 +5373,7 @@ h5pget_file_image_c(hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len_ptr) if ((H5Pget_file_image((hid_t)*fapl_id, (void **)&c_buf_ptr, &c_buf_len_ptr)) < 0) return ret_value; /* error occurred */ - HDmemcpy((void *)*buf_ptr, (void *)c_buf_ptr, c_buf_len_ptr); + memcpy((void *)*buf_ptr, (void *)c_buf_ptr, c_buf_len_ptr); *buf_len_ptr = (size_t_f)c_buf_len_ptr; |