diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-07-27 20:43:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 20:43:30 (GMT) |
commit | 1e91d96fa02466ffe451319bdac1005f84dc7993 (patch) | |
tree | 4de04ef502c313dfd766497b20235188761146c0 /fortran | |
parent | 95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff) | |
download | hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2 |
Brings over most of the HD prefix removal (#3293)
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/src/H5Af.c | 24 | ||||
-rw-r--r-- | fortran/src/H5Df.c | 52 | ||||
-rw-r--r-- | fortran/src/H5Ef.c | 12 | ||||
-rw-r--r-- | fortran/src/H5Ff.c | 14 | ||||
-rw-r--r-- | fortran/src/H5Gf.c | 44 | ||||
-rw-r--r-- | fortran/src/H5If.c | 4 | ||||
-rw-r--r-- | fortran/src/H5Lf.c | 30 | ||||
-rw-r--r-- | fortran/src/H5Of.c | 26 | ||||
-rw-r--r-- | fortran/src/H5Pf.c | 84 | ||||
-rw-r--r-- | fortran/src/H5Rf.c | 14 | ||||
-rw-r--r-- | fortran/src/H5Sf.c | 34 | ||||
-rw-r--r-- | fortran/src/H5Tf.c | 26 | ||||
-rw-r--r-- | fortran/src/H5f90kit.c | 8 | ||||
-rw-r--r-- | fortran/test/t.c | 10 |
14 files changed, 191 insertions, 191 deletions
diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c index c17d3f8..68926e2 100644 --- a/fortran/src/H5Af.c +++ b/fortran/src/H5Af.c @@ -60,7 +60,7 @@ h5adelete_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen) done: if (c_name) - HDfree(c_name); + free(c_name); return ret_value; } @@ -135,7 +135,7 @@ h5aget_name_c(hid_t_f *attr_id, size_t_f *bufsize, _fcd buf) /* * Allocate buffer to hold name of an attribute */ - if (NULL == (c_buf = (char *)HDmalloc(c_bufsize))) + if (NULL == (c_buf = (char *)malloc(c_bufsize))) HGOTO_DONE(FAIL); /* @@ -151,7 +151,7 @@ h5aget_name_c(hid_t_f *attr_id, size_t_f *bufsize, _fcd buf) done: if (c_buf) - HDfree(c_buf); + free(c_buf); return ret_value; } @@ -204,9 +204,9 @@ h5adelete_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd done: if (c_attr_name) - HDfree(c_attr_name); + free(c_attr_name); if (c_obj_name) - HDfree(c_obj_name); + free(c_obj_name); return ret_value; } /****if* H5Af/h5adelete_by_idx_c @@ -256,7 +256,7 @@ h5adelete_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f done: if (c_obj_name) - HDfree(c_obj_name); + free(c_obj_name); return ret_value; } @@ -325,7 +325,7 @@ h5aget_name_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_ * Allocate buffer to hold name of an attribute */ c_buf_size = (size_t)*size + 1; - if (NULL == (c_buf = (char *)HDmalloc(c_buf_size))) + if (NULL == (c_buf = (char *)malloc(c_buf_size))) HGOTO_DONE(FAIL) /* @@ -344,9 +344,9 @@ h5aget_name_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_ done: if (c_obj_name) - HDfree(c_obj_name); + free(c_obj_name); if (c_buf) - HDfree(c_buf); + free(c_buf); return ret_value; } @@ -474,7 +474,7 @@ h5aget_info_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_ done: if (c_obj_name) - HDfree(c_obj_name); + free(c_obj_name); return ret_value; } @@ -542,9 +542,9 @@ h5aget_info_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fc done: if (c_obj_name) - HDfree(c_obj_name); + free(c_obj_name); if (c_attr_name) - HDfree(c_attr_name); + free(c_attr_name); return ret_value; } diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c index 3df2fbf..83032c1 100644 --- a/fortran/src/H5Df.c +++ b/fortran/src/H5Df.c @@ -67,10 +67,10 @@ h5dwrite_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id /* * Allocate temporary buffer and copy references from Fortran. */ - buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t) * n); + buf_c = (hdset_reg_ref_t *)malloc(sizeof(hdset_reg_ref_t) * n); if (buf_c != NULL) { for (i = 0; i < n; i++) { - HDmemcpy(&buf_c[i], buf, H5R_DSET_REG_REF_BUF_SIZE); + memcpy(&buf_c[i], buf, H5R_DSET_REG_REF_BUF_SIZE); buf = buf + REF_REG_BUF_LEN_F; } } @@ -85,7 +85,7 @@ h5dwrite_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id c_mem_space_id = (hid_t)*mem_space_id; c_file_space_id = (hid_t)*file_space_id; ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c); - HDfree(buf_c); + free(buf_c); if (ret < 0) return ret_value; ret_value = 0; @@ -138,7 +138,7 @@ h5dread_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, /* * Allocate temporary buffer. */ - buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t) * (size_t)n); + buf_c = (hdset_reg_ref_t *)malloc(sizeof(hdset_reg_ref_t) * (size_t)n); if (buf_c != NULL) { /* * Call H5Dread function. @@ -150,12 +150,12 @@ h5dread_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c); if (ret >= 0) { for (i = 0; i < n; i++) { - HDmemcpy(buf, &buf_c[i], H5R_DSET_REG_REF_BUF_SIZE); + memcpy(buf, &buf_c[i], H5R_DSET_REG_REF_BUF_SIZE); buf = buf + REF_REG_BUF_LEN_F; } } if (buf_c != NULL) - HDfree(buf_c); + free(buf_c); } if (ret < 0) return ret_value; @@ -320,7 +320,7 @@ h5dvlen_get_max_len_c(hid_t_f *dset_id, hid_t_f *type_id, hid_t_f *space_id, siz if (num_elem < 0) return ret_value; - c_buf = (hvl_t *)HDmalloc(sizeof(hvl_t) * (size_t)num_elem); + c_buf = (hvl_t *)malloc(sizeof(hvl_t) * (size_t)num_elem); if (c_buf == NULL) return ret_value; status = H5Dread(c_dset_id, c_type_id, H5S_ALL, c_space_id, H5P_DEFAULT, c_buf); @@ -336,7 +336,7 @@ h5dvlen_get_max_len_c(hid_t_f *dset_id, hid_t_f *type_id, hid_t_f *space_id, siz DONE: - HDfree(c_buf); + free(c_buf); return ret_value; } /****if* H5Df/h5dwrite_vl_integer_c @@ -393,7 +393,7 @@ h5dwrite_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space c_file_space_id = (hid_t)*file_space_id; c_xfer_prp = (hid_t)*xfer_prp; - c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t)); + c_buf = (hvl_t *)malloc((size_t)num_elem * sizeof(hvl_t)); if (c_buf == NULL) return ret_value; tmp = (int_f *)buf; @@ -411,7 +411,7 @@ h5dwrite_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space goto DONE; ret_value = 0; DONE: - HDfree(c_buf); + free(c_buf); return ret_value; } @@ -471,7 +471,7 @@ h5dread_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_ if (num_elem != (hssize_t)dims[1]) return ret_value; - c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t)); + c_buf = (hvl_t *)malloc((size_t)num_elem * sizeof(hvl_t)); if (c_buf == NULL) return ret_value; /* @@ -487,7 +487,7 @@ h5dread_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_ H5Treclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf); ret_value = 0; DONE: - HDfree(c_buf); + free(c_buf); return ret_value; } @@ -547,14 +547,14 @@ h5dwrite_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_ /* * Allocate arra of character pointers */ - c_buf = (char **)HDmalloc((size_t)num_elem * sizeof(char *)); + c_buf = (char **)malloc((size_t)num_elem * sizeof(char *)); if (c_buf == NULL) return ret_value; /* Copy data to long C string */ tmp = (char *)HD5f2cstring(buf, (size_t)(max_len * num_elem)); if (tmp == NULL) { - HDfree(c_buf); + free(c_buf); return ret_value; } /* @@ -562,7 +562,7 @@ h5dwrite_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_ */ tmp_p = tmp; for (i = 0; i < num_elem; i++) { - c_buf[i] = (char *)HDmalloc((size_t)len[i] + 1); + c_buf[i] = (char *)malloc((size_t)len[i] + 1); memcpy(c_buf[i], tmp_p, (size_t)len[i]); c_buf[i][len[i]] = '\0'; tmp_p = tmp_p + max_len; @@ -578,8 +578,8 @@ h5dwrite_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_ ret_value = 0; DONE: H5Treclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf); - HDfree(c_buf); - HDfree(tmp); + free(c_buf); + free(tmp); return ret_value; } /****if* H5Df/h5dread_vl_string_c @@ -638,7 +638,7 @@ h5dread_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_i /* * Allocate array of character pointers */ - c_buf = (char **)HDmalloc((size_t)num_elem * sizeof(char *)); + c_buf = (char **)malloc((size_t)num_elem * sizeof(char *)); if (c_buf == NULL) return ret_value; @@ -647,11 +647,11 @@ h5dread_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_i */ status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf); if (status < 0) { - HDfree(c_buf); + free(c_buf); return ret_value; } /* Copy data to long C string */ - tmp = (char *)HDmalloc((size_t)(max_len * num_elem) + 1); + tmp = (char *)malloc((size_t)(max_len * num_elem) + 1); tmp_p = tmp; for (i = 0; i < max_len * num_elem; i++) tmp[i] = ' '; @@ -664,8 +664,8 @@ h5dread_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_i HD5packFstring(tmp, _fcdtocp(buf), (size_t)(max_len * num_elem)); ret_value = 0; H5Treclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf); - HDfree(c_buf); - HDfree(tmp); + free(c_buf); + free(tmp); return ret_value; } @@ -723,7 +723,7 @@ h5dwrite_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id c_file_space_id = (hid_t)*file_space_id; c_xfer_prp = (hid_t)*xfer_prp; - c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t)); + c_buf = (hvl_t *)malloc((size_t)num_elem * sizeof(hvl_t)); if (c_buf == NULL) return ret_value; tmp = (real_f *)buf; @@ -741,7 +741,7 @@ h5dwrite_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id goto DONE; ret_value = 0; DONE: - HDfree(c_buf); + free(c_buf); return ret_value; } @@ -801,7 +801,7 @@ h5dread_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, if (num_elem != (hssize_t)dims[1]) return ret_value; - c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t)); + c_buf = (hvl_t *)malloc((size_t)num_elem * sizeof(hvl_t)); if (c_buf == NULL) return ret_value; /* @@ -818,7 +818,7 @@ h5dread_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, H5Treclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf); ret_value = 0; DONE: - HDfree(c_buf); + free(c_buf); return ret_value; } diff --git a/fortran/src/H5Ef.c b/fortran/src/H5Ef.c index 7948808..16ba70f 100644 --- a/fortran/src/H5Ef.c +++ b/fortran/src/H5Ef.c @@ -84,7 +84,7 @@ h5eprint_c1(_fcd name, int_f *namelen) if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen))) HGOTO_DONE(FAIL) - if (NULL == (file = HDfopen(c_name, "a"))) + if (NULL == (file = fopen(c_name, "a"))) HGOTO_DONE(FAIL) /* @@ -97,7 +97,7 @@ done: if (file) HDfclose(file); if (c_name) - HDfree(c_name); + free(c_name); return ret_value; } @@ -164,7 +164,7 @@ h5eget_major_c(int_f *error_no, _fcd name, size_t_f *namelen) int_f ret_value = 0; if (c_namelen > 0) - c_name = (char *)HDmalloc(c_namelen + 1); + c_name = (char *)malloc(c_namelen + 1); if (!c_name) HGOTO_DONE(FAIL) @@ -179,7 +179,7 @@ h5eget_major_c(int_f *error_no, _fcd name, size_t_f *namelen) done: if (c_name) - HDfree(c_name); + free(c_name); return ret_value; } @@ -212,7 +212,7 @@ h5eget_minor_c(int_f *error_no, _fcd name, size_t_f *namelen) int_f ret_value = 0; if (c_namelen > 0) - c_name = (char *)HDmalloc(c_namelen + 1); + c_name = (char *)malloc(c_namelen + 1); if (!c_name) HGOTO_DONE(FAIL) @@ -227,7 +227,7 @@ h5eget_minor_c(int_f *error_no, _fcd name, size_t_f *namelen) done: if (c_name) - HDfree(c_name); + free(c_name); return ret_value; } diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c index b2f09ef..e7b18f6 100644 --- a/fortran/src/H5Ff.c +++ b/fortran/src/H5Ff.c @@ -87,7 +87,7 @@ h5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *crt_prp, hi *file_id = c_file_id; } - HDfree(c_name); + free(c_name); return ret_value; } @@ -147,7 +147,7 @@ h5fmount_c(hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid if (status >= 0) ret_value = 0; - HDfree(c_name); + free(c_name); return ret_value; } @@ -195,7 +195,7 @@ h5funmount_c(hid_t_f *loc_id, _fcd dsetname, int_f *namelen) if (status >= 0) ret_value = 0; - HDfree(c_name); + free(c_name); return ret_value; } @@ -343,7 +343,7 @@ h5fget_obj_ids_c(hid_t_f *file_id, int_f *obj_type, size_t_f *max_objs, hid_t_f c_file_id = (hid_t)*file_id; c_obj_type = (unsigned)*obj_type; c_max_objs = (size_t)*max_objs; - c_obj_ids = (hid_t *)HDmalloc(sizeof(hid_t) * c_max_objs); + c_obj_ids = (hid_t *)malloc(sizeof(hid_t) * c_max_objs); c_num_objs = H5Fget_obj_ids(c_file_id, c_obj_type, c_max_objs, c_obj_ids); if (c_num_objs < 0) @@ -351,7 +351,7 @@ h5fget_obj_ids_c(hid_t_f *file_id, int_f *obj_type, size_t_f *max_objs, hid_t_f for (u = 0; u < c_max_objs; u++) obj_ids[u] = (hid_t_f)c_obj_ids[u]; - HDfree(c_obj_ids); + free(c_obj_ids); *num_objs = (size_t_f)c_num_objs; return ret_value; @@ -417,7 +417,7 @@ h5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen) /* * Allocate buffer to hold name of file */ - if (NULL == (c_buf = (char *)HDmalloc((size_t)*buflen + 1))) + if (NULL == (c_buf = (char *)malloc((size_t)*buflen + 1))) HGOTO_DONE(FAIL); /* @@ -434,7 +434,7 @@ h5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen) done: *size = (size_t_f)size_c; if (c_buf) - HDfree(c_buf); + free(c_buf); return ret_value; } diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c index 445fcea..6342bc3 100644 --- a/fortran/src/H5Gf.c +++ b/fortran/src/H5Gf.c @@ -68,7 +68,7 @@ h5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, _f */ c_obj_namelen = (size_t)*obj_namelen; if (c_obj_namelen) - if (NULL == (c_obj_name = (char *)HDmalloc(c_obj_namelen + 1))) + if (NULL == (c_obj_name = (char *)malloc(c_obj_namelen + 1))) goto DONE; /* Get a temporary group ID for the group to query */ @@ -100,9 +100,9 @@ DONE: H5Gclose(gid); if (c_obj_name) - HDfree(c_obj_name); + free(c_obj_name); if (c_name) - HDfree(c_name); + free(c_name); return ret_value; } @@ -147,7 +147,7 @@ h5gn_members_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers) DONE: if (c_name) - HDfree(c_name); + free(c_name); return ret_value; } @@ -227,9 +227,9 @@ h5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name, int_f *current_n DONE: if (c_current_name) - HDfree(c_current_name); + free(c_current_name); if (c_new_name) - HDfree(c_new_name); + free(c_new_name); return ret_value; } @@ -314,9 +314,9 @@ h5glink2_c(hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, int_f *link_t DONE: if (c_cur_name) - HDfree(c_cur_name); + free(c_cur_name); if (c_new_name) - HDfree(c_new_name); + free(c_new_name); return ret_value; } @@ -358,7 +358,7 @@ h5gunlink_c(hid_t_f *loc_id, _fcd name, int_f *namelen) DONE: if (c_name) - HDfree(c_name); + free(c_name); return ret_value; } @@ -406,9 +406,9 @@ h5gmove_c(hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int DONE: if (c_src_name) - HDfree(c_src_name); + free(c_src_name); if (c_dst_name) - HDfree(c_dst_name); + free(c_dst_name); return ret_value; } @@ -459,9 +459,9 @@ h5gmove2_c(hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_ DONE: if (c_src_name) - HDfree(c_src_name); + free(c_src_name); if (c_dst_name) - HDfree(c_dst_name); + free(c_dst_name); return ret_value; } @@ -503,9 +503,9 @@ h5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _fc * Allocate buffer to hold name of the value */ if (*size) - c_value = (char *)HDmalloc((size_t)*size); + c_value = (char *)malloc((size_t)*size); if (c_value == NULL) { - HDfree(c_name); + free(c_name); return ret_value; } @@ -523,9 +523,9 @@ h5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _fc DONE: if (c_value) - HDfree(c_value); + free(c_value); if (c_name) - HDfree(c_name); + free(c_name); return ret_value; } @@ -573,9 +573,9 @@ h5gset_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment, int_f DONE: if (c_name) - HDfree(c_name); + free(c_name); if (c_comment) - HDfree(c_comment); + free(c_comment); return ret_value; } @@ -616,7 +616,7 @@ h5gget_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, */ c_bufsize = (size_t)*bufsize; if (c_bufsize) { - if (NULL == (c_comment = (char *)HDmalloc(c_bufsize + 1))) + if (NULL == (c_comment = (char *)malloc(c_bufsize + 1))) goto DONE; } /* end if */ @@ -634,9 +634,9 @@ h5gget_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, DONE: if (c_name) - HDfree(c_name); + free(c_name); if (c_comment) - HDfree(c_comment); + free(c_comment); return ret_value; } diff --git a/fortran/src/H5If.c b/fortran/src/H5If.c index ffc6e08..40d5c8d 100644 --- a/fortran/src/H5If.c +++ b/fortran/src/H5If.c @@ -94,7 +94,7 @@ h5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size * Allocate buffer to hold name of an object */ c_buf_size = (size_t)*buf_size + 1; - c_buf = (char *)HDmalloc(c_buf_size); + c_buf = (char *)malloc(c_buf_size); if (c_buf == NULL) return ret_value; @@ -114,7 +114,7 @@ h5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size ret_value = 0; DONE: - HDfree(c_buf); + free(c_buf); return ret_value; } diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c index ffc1d3d..7454a66 100644 --- a/fortran/src/H5Lf.c +++ b/fortran/src/H5Lf.c @@ -75,9 +75,9 @@ h5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *de done: if (c_src_name) - HDfree(c_src_name); + free(c_src_name); if (c_dest_name) - HDfree(c_dest_name); + free(c_dest_name); return ret_value; } @@ -135,11 +135,11 @@ h5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size done: if (c_file_name) - HDfree(c_file_name); + free(c_file_name); if (c_obj_name) - HDfree(c_obj_name); + free(c_obj_name); if (c_link_name) - HDfree(c_link_name); + free(c_link_name); return ret_value; } @@ -211,7 +211,7 @@ h5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, int_ done: if (c_link_name) - HDfree(c_link_name); + free(c_link_name); return ret_value; } @@ -389,9 +389,9 @@ h5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *de done: if (c_src_name) - HDfree(c_src_name); + free(c_src_name); if (c_dest_name) - HDfree(c_dest_name); + free(c_dest_name); return ret_value; } @@ -443,7 +443,7 @@ h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, /* * Allocate buffer to hold name of an attribute */ - if (NULL == (c_name = (char *)HDmalloc(c_size))) + if (NULL == (c_name = (char *)malloc(c_size))) HGOTO_DONE(FAIL) if ((c_size_link = @@ -461,9 +461,9 @@ h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, done: if (c_group_name) - HDfree(c_group_name); + free(c_group_name); if (c_name) - HDfree(c_name); + free(c_name); return ret_value; } @@ -625,9 +625,9 @@ done: /* done: */ /* if(c_src_name) */ -/* HDfree(c_src_name); */ +/* free(c_src_name); */ /* if(c_dest_name) */ -/* HDfree(c_dest_name); */ +/* free(c_dest_name); */ /* return ret_value; */ /* } */ @@ -677,7 +677,7 @@ h5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_ done: if (c_link_name) - HDfree(c_link_name); + free(c_link_name); return ret_value; } @@ -739,7 +739,7 @@ h5literate_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, int_f *index *idx = (hsize_t_f)idx_c; if (c_name) - HDfree(c_name); + free(c_name); return ret_value; } diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c index 5abe745..2ef08fe 100644 --- a/fortran/src/H5Of.c +++ b/fortran/src/H5Of.c @@ -128,7 +128,7 @@ h5olink_c(hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen, done: if (c_name) - HDfree(c_name); + free(c_name); return ret_value; } @@ -273,7 +273,7 @@ h5oget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *namelen, int_f done: if (c_group_name) - HDfree(c_group_name); + free(c_group_name); return ret_value; } @@ -383,7 +383,7 @@ h5oexists_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl done: if (c_name) - HDfree(c_name); + free(c_name); return ret_value; } @@ -454,7 +454,7 @@ h5oset_comment_c(hid_t_f *object_id, _fcd comment, size_t_f *commentlen) done: if (c_comment) - HDfree(c_comment); + free(c_comment); return ret_value; } @@ -506,9 +506,9 @@ h5oset_comment_by_name_c(hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd done: if (c_name) - HDfree(c_name); + free(c_name); if (c_comment) - HDfree(c_comment); + free(c_comment); return ret_value; } @@ -544,7 +544,7 @@ h5oget_comment_c(hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize * Allocate buffer to hold comment name */ - if (NULL == (c_comment = (char *)HDmalloc(c_commentsize))) + if (NULL == (c_comment = (char *)malloc(c_commentsize))) HGOTO_DONE(FAIL); /* @@ -563,7 +563,7 @@ h5oget_comment_c(hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize done: if (c_comment) - HDfree(c_comment); + free(c_comment); return ret_value; } @@ -609,7 +609,7 @@ h5oget_comment_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *name_size, _fcd c * Allocate buffer to hold comment name */ - if (NULL == (c_comment = (char *)HDmalloc(c_commentsize))) + if (NULL == (c_comment = (char *)malloc(c_commentsize))) HGOTO_DONE(FAIL); /* @@ -621,7 +621,7 @@ h5oget_comment_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *name_size, _fcd c HGOTO_DONE(FAIL); if (c_name) - HDfree(c_name); + free(c_name); *bufsize = (size_t_f)c_bufsize; @@ -630,16 +630,16 @@ h5oget_comment_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *name_size, _fcd c */ if (c_comment) { HD5packFstring(c_comment, _fcdtocp(comment), c_commentsize - 1); - HDfree(c_comment); + free(c_comment); } return ret_value; done: if (c_comment) - HDfree(c_comment); + free(c_comment); if (c_name) - HDfree(c_name); + free(c_name); return ret_value; } diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 38eba37..c13262e 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -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 @@ -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; } @@ -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; } @@ -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; /* @@ -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; } @@ -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; diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c index a253b4a..c2f12e0 100644 --- a/fortran/src/H5Rf.c +++ b/fortran/src/H5Rf.c @@ -64,11 +64,11 @@ h5rcreate_region_c(int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t HGOTO_DONE(FAIL) /* Copy the reference created */ - HDmemcpy(ref, &ref_c, H5R_DSET_REG_REF_BUF_SIZE); + memcpy(ref, &ref_c, H5R_DSET_REG_REF_BUF_SIZE); done: if (c_name) - HDfree(c_name); + free(c_name); return ret_value; } /* end h5rcreate_region_c() */ @@ -112,7 +112,7 @@ h5rcreate_ptr_c(void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *re if (H5Rcreate(ref, (hid_t)*loc_id, c_name, (H5R_type_t)*ref_type, (hid_t)*space_id) >= 0) ret_value = 0; - HDfree(c_name); + free(c_name); return ret_value; } @@ -183,7 +183,7 @@ h5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id) int_f ret_value = 0; /* Copy the reference to dereference */ - HDmemcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE); + memcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE); /* * Call H5Rget_region function. @@ -316,7 +316,7 @@ h5rget_name_ptr_c(hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t /* * Allocate buffer to hold name of an attribute */ - if ((c_buf = (char *)HDmalloc(c_bufsize)) == NULL) + if ((c_buf = (char *)malloc(c_bufsize)) == NULL) return ret_value; /* @@ -324,7 +324,7 @@ h5rget_name_ptr_c(hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t */ if ((c_size = H5Rget_name((hid_t)*loc_id, (H5R_type_t)*ref_type, ref, c_buf, c_bufsize)) < 0) { if (c_buf) - HDfree(c_buf); + free(c_buf); return ret_value; } /* @@ -335,7 +335,7 @@ h5rget_name_ptr_c(hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t *size_default = (size_t_f)c_size; ret_value = 0; if (c_buf) - HDfree(c_buf); + free(c_buf); return ret_value; } diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c index 00b97f8..d7202c7 100644 --- a/fortran/src/H5Sf.c +++ b/fortran/src/H5Sf.c @@ -301,7 +301,7 @@ h5sget_select_hyper_blocklist_c(hid_t_f *space_id, hsize_t_f *startblock, hsize_ return ret_value; c_startblock = (hsize_t)*startblock; - c_buf = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)(c_num_blocks * 2 * (hsize_t)rank)); + c_buf = (hsize_t *)malloc(sizeof(hsize_t) * (size_t)(c_num_blocks * 2 * (hsize_t)rank)); if (!c_buf) return ret_value; @@ -323,7 +323,7 @@ h5sget_select_hyper_blocklist_c(hid_t_f *space_id, hsize_t_f *startblock, hsize_ } } - HDfree(c_buf); + free(c_buf); if (ret_value >= 0) ret_value = 0; return ret_value; @@ -429,7 +429,7 @@ h5sget_select_elem_pointlist_c(hid_t_f *space_id, hsize_t_f *startpoint, hsize_t return ret_value; c_startpoint = (hsize_t)*startpoint; - c_buf = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)(c_num_points * (hsize_t)rank)); + c_buf = (hsize_t *)malloc(sizeof(hsize_t) * (size_t)(c_num_points * (hsize_t)rank)); if (!c_buf) return ret_value; ret_value = H5Sget_select_elem_pointlist(c_space_id, c_startpoint, c_num_points, c_buf); @@ -449,7 +449,7 @@ h5sget_select_elem_pointlist_c(hid_t_f *space_id, hsize_t_f *startpoint, hsize_t if (ret_value >= 0) ret_value = 0; - HDfree(c_buf); + free(c_buf); return ret_value; } @@ -1054,19 +1054,19 @@ h5scombine_hyperslab_c(hid_t_f *space_id, int_f *op, hsize_t_f *start, hsize_t_f rank = H5Sget_simple_extent_ndims(*space_id); if (rank < 0) return ret_value; - c_start = (hsize_t *)HDmalloc(sizeof(hsize_t) * (unsigned)rank); + c_start = (hsize_t *)malloc(sizeof(hsize_t) * (unsigned)rank); if (c_start == NULL) goto DONE; - c_count = (hsize_t *)HDmalloc(sizeof(hsize_t) * (unsigned)rank); + c_count = (hsize_t *)malloc(sizeof(hsize_t) * (unsigned)rank); if (c_count == NULL) goto DONE; - c_stride = (hsize_t *)HDmalloc(sizeof(hsize_t) * (unsigned)rank); + c_stride = (hsize_t *)malloc(sizeof(hsize_t) * (unsigned)rank); if (c_stride == NULL) goto DONE; - c_block = (hsize_t *)HDmalloc(sizeof(hsize_t) * (unsigned)rank); + c_block = (hsize_t *)malloc(sizeof(hsize_t) * (unsigned)rank); if (c_block == NULL) goto DONE; @@ -1092,13 +1092,13 @@ h5scombine_hyperslab_c(hid_t_f *space_id, int_f *op, hsize_t_f *start, hsize_t_f ret_value = 0; DONE: if (c_start != NULL) - HDfree(c_start); + free(c_start); if (c_count != NULL) - HDfree(c_count); + free(c_count); if (c_stride != NULL) - HDfree(c_stride); + free(c_stride); if (c_block != NULL) - HDfree(c_block); + free(c_block); return ret_value; } /****if* H5Sf/h5scombine_select_c @@ -1257,7 +1257,7 @@ h5sselect_elements_c(hid_t_f *space_id, int_f *op, size_t_f *nelements, hsize_t_ c_space_id = *space_id; rank = H5Sget_simple_extent_ndims(c_space_id); - c_coord = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)rank * ((size_t)*nelements)); + c_coord = (hsize_t *)malloc(sizeof(hsize_t) * (size_t)rank * ((size_t)*nelements)); if (!c_coord) return ret_value; for (i = 0; i < (size_t)*nelements; i++) { @@ -1270,7 +1270,7 @@ h5sselect_elements_c(hid_t_f *space_id, int_f *op, size_t_f *nelements, hsize_t_ status = H5Sselect_elements(c_space_id, c_op, c_nelements, c_coord); if (status >= 0) ret_value = 0; - HDfree(c_coord); + free(c_coord); return ret_value; } @@ -1363,7 +1363,7 @@ h5sencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc, hid_t_f *fapl_id) /* * Allocate buffer */ - if (NULL == (c_buf = (unsigned char *)HDmalloc(c_size))) + if (NULL == (c_buf = (unsigned char *)malloc(c_size))) return ret_value; /* * Call H5Sencode function. @@ -1378,11 +1378,11 @@ h5sencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc, hid_t_f *fapl_id) * with blanks. */ - HDmemcpy(_fcdtocp(buf), (char *)c_buf, c_size); + memcpy(_fcdtocp(buf), (char *)c_buf, c_size); ret_value = 0; if (c_buf) - HDfree(c_buf); + free(c_buf); return ret_value; } diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c index a74f5d1..6438af0 100644 --- a/fortran/src/H5Tf.c +++ b/fortran/src/H5Tf.c @@ -66,7 +66,7 @@ h5topen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f done: if (c_name) - HDfree(c_name); + free(c_name); return ret_value; } @@ -116,7 +116,7 @@ h5tcommit_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_ done: if (c_name) - HDfree(c_name); + free(c_name); return ret_value; } @@ -1357,7 +1357,7 @@ h5tget_member_index_c(hid_t_f *type_id, _fcd name, int_f *namelen, int_f *idx) goto DONE; *idx = (int_f)c_index; DONE: - HDfree(c_name); + free(c_name); ret_value = 0; return ret_value; } @@ -1624,7 +1624,7 @@ h5tinsert_c(hid_t_f *type_id, _fcd name, int_f *namelen, size_t_f *offset, hid_t error = H5Tinsert((hid_t)*type_id, c_name, (size_t)*offset, (hid_t)*field_id); - HDfree(c_name); + free(c_name); if (error < 0) return ret_value; ret_value = 0; @@ -1784,7 +1784,7 @@ h5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f *namelen, int_f *value) c_value = *value; error = H5Tenum_insert((hid_t)*type_id, c_name, &c_value); - HDfree(c_name); + free(c_name); if (error < 0) return ret_value; @@ -1825,11 +1825,11 @@ h5tenum_nameof_c(hid_t_f *type_id, int_f *value, _fcd name, size_t_f *namelen) int_f c_value; c_value = *value; c_namelen = ((size_t)*namelen) + 1; - c_name = (char *)HDmalloc(sizeof(char) * c_namelen); + c_name = (char *)malloc(sizeof(char) * c_namelen); c_type_id = (hid_t)*type_id; error = H5Tenum_nameof(c_type_id, &c_value, c_name, c_namelen); HD5packFstring(c_name, _fcdtocp(name), strlen(c_name)); - HDfree(c_name); + free(c_name); if (error < 0) return ret_value; @@ -1870,7 +1870,7 @@ h5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f *namelen, int_f *value) return ret_value; error = H5Tenum_valueof((hid_t)*type_id, c_name, value); - HDfree(c_name); + free(c_name); if (error < 0) return ret_value; @@ -1947,7 +1947,7 @@ h5tset_tag_c(hid_t_f *type_id, _fcd tag, int_f *namelen) c_tag = (char *)HD5f2cstring(tag, (size_t)*namelen); status = H5Tset_tag((hid_t)*type_id, c_tag); - HDfree(c_tag); + free(c_tag); if (status < 0) return ret_value; @@ -2263,7 +2263,7 @@ h5tencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc) * Allocate buffer */ c_size = (size_t)*nalloc; - if (NULL == (c_buf = (unsigned char *)HDmalloc(c_size))) + if (NULL == (c_buf = (unsigned char *)malloc(c_size))) return ret_value; /* @@ -2278,11 +2278,11 @@ h5tencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc) * with blanks. */ - HDmemcpy(_fcdtocp(buf), (char *)c_buf, c_size); + memcpy(_fcdtocp(buf), (char *)c_buf, c_size); ret_value = 0; if (c_buf) - HDfree(c_buf); + free(c_buf); return ret_value; } @@ -2466,7 +2466,7 @@ h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f *namelen, void *value) status = H5Tenum_insert((hid_t)*type_id, c_name, value); - HDfree(c_name); + free(c_name); if (status < 0) return ret_value; diff --git a/fortran/src/H5f90kit.c b/fortran/src/H5f90kit.c index dc2fa19..ebe5955 100644 --- a/fortran/src/H5f90kit.c +++ b/fortran/src/H5f90kit.c @@ -54,11 +54,11 @@ HD5f2cstring(_fcd fdesc, size_t len) /*EMPTY*/; /* Allocate C string */ - if (NULL == (cstr = (char *)HDmalloc((size_t)(i + 2)))) + if (NULL == (cstr = (char *)malloc((size_t)(i + 2)))) return NULL; /* Copy text from FORTRAN to C string */ - HDmemcpy(cstr, str, (size_t)(i + 1)); + memcpy(cstr, str, (size_t)(i + 1)); /* Terminate C string */ cstr[i + 1] = '\0'; @@ -94,10 +94,10 @@ HD5packFstring(char *src, char *dest, size_t dst_len) /* Copy over the string information, up to the length of the src */ /* (Don't copy the NUL terminator from the C string to the FORTRAN string */ - HDmemcpy(dest, src, MIN(src_len, dst_len)); + memcpy(dest, src, MIN(src_len, dst_len)); /* Pad out any remaining space in the FORTRAN string with ' 's */ if (src_len < dst_len) - HDmemset(&dest[src_len], ' ', dst_len - src_len); + memset(&dest[src_len], ' ', dst_len - src_len); } /* HD5packFstring */ diff --git a/fortran/test/t.c b/fortran/test/t.c index b89e8ae..f3b326b 100644 --- a/fortran/test/t.c +++ b/fortran/test/t.c @@ -49,7 +49,7 @@ nh5_fixname_c(_fcd base_name, size_t_f *base_namelen, hid_t_f *fapl, _fcd full_n */ if (NULL == (c_base_name = (char *)HD5f2cstring(base_name, (size_t)*base_namelen))) HGOTO_DONE(FAIL) - if (NULL == (c_full_name = (char *)HDmalloc((size_t)*full_namelen + 1))) + if (NULL == (c_full_name = (char *)malloc((size_t)*full_namelen + 1))) HGOTO_DONE(FAIL) /* @@ -61,9 +61,9 @@ nh5_fixname_c(_fcd base_name, size_t_f *base_namelen, hid_t_f *fapl, _fcd full_n done: if (c_base_name) - HDfree(c_base_name); + free(c_base_name); if (c_full_name) - HDfree(c_full_name); + free(c_full_name); return ret_value; } @@ -112,7 +112,7 @@ nh5_cleanup_c(_fcd base_name, size_t_f *base_namelen, hid_t_f *fapl) DONE: if (NULL != c_base_name[0]) - HDfree(c_base_name[0]); + free(c_base_name[0]); return ret_value; } @@ -130,7 +130,7 @@ DONE: void nh5_exit_c(int_f *status) { - HDexit((int)*status); + exit((int)*status); } /* h5_exit_c */ /*---------------------------------------------------------------------------- |