From 942739e6fbea0ebf736c35f461e1386396b54e11 Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Tue, 27 Jun 2023 17:42:29 -0700 Subject: Remove HD/hbool_t from fortran (#3182) --- fortran/src/H5Af.c | 24 +++---- fortran/src/H5Df.c | 52 ++++++++-------- fortran/src/H5Ef.c | 18 +++--- fortran/src/H5Ff.c | 14 ++--- fortran/src/H5Gf.c | 44 ++++++------- fortran/src/H5If.c | 4 +- fortran/src/H5Lf.c | 30 ++++----- fortran/src/H5Lff.F90 | 2 +- fortran/src/H5Of.c | 34 +++++----- fortran/src/H5Pf.c | 148 ++++++++++++++++++++++---------------------- fortran/src/H5Rf.c | 14 ++--- fortran/src/H5Sf.c | 34 +++++----- fortran/src/H5Tf.c | 28 ++++----- fortran/src/H5f90kit.c | 12 ++-- fortran/test/t.c | 12 ++-- fortran/test/tH5A_1_8.F90 | 12 ++-- fortran/test/tH5G_1_8.F90 | 18 +++--- fortran/test/tH5Sselect.F90 | 8 +-- 18 files changed, 254 insertions(+), 254 deletions(-) diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c index 0fdd8fd..a055479 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..b025193 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) /* @@ -95,9 +95,9 @@ h5eprint_c1(_fcd name, int_f *namelen) done: if (file) - HDfclose(file); + fclose(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) @@ -174,12 +174,12 @@ h5eget_major_c(int_f *error_no, _fcd name, size_t_f *namelen) */ H5Eget_msg((hid_t)*error_no, NULL, c_name, c_namelen); HD5packFstring((char *)c_name, _fcdtocp(name), c_namelen); - if (!HDstrcmp(c_name, "Invalid major error number")) + if (!strcmp(c_name, "Invalid major error number")) HGOTO_DONE(FAIL) 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) @@ -222,12 +222,12 @@ h5eget_minor_c(int_f *error_no, _fcd name, size_t_f *namelen) */ H5Eget_msg((hid_t)*error_no, NULL, c_name, c_namelen); HD5packFstring((char *)c_name, _fcdtocp(name), c_namelen); - if (!HDstrcmp(c_name, "Invalid minor error number")) + if (!strcmp(c_name, "Invalid minor error number")) HGOTO_DONE(FAIL) 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 c7ce511..363fa6d 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/H5Lff.F90 b/fortran/src/H5Lff.F90 index 72a471e..e2e9e49 100644 --- a/fortran/src/H5Lff.F90 +++ b/fortran/src/H5Lff.F90 @@ -57,7 +57,7 @@ MODULE H5L !< \li H5L_TYPE_SOFT_F Soft link !< \li H5L_TYPE_EXTERNAL_F External link !< \li H5L_TYPE_ERROR_F Invalid link type id - ! LOGICAL(c_bool) :: corder_valid ! hbool_t corder_valid + ! LOGICAL(c_bool) :: corder_valid ! bool corder_valid INTEGER(c_int64_t) :: corder !< Creation order INTEGER(c_int) :: cset !< Character set of link name is encoded. Valid values include the following: !< \li H5T_CSET_ASCII US ASCII diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c index 54e5187..cc99403 100644 --- a/fortran/src/H5Of.c +++ b/fortran/src/H5Of.c @@ -38,7 +38,7 @@ fill_h5o_info_t_f(H5O_info2_t Oinfo, H5O_info_t_f *object_info) object_info->type = (int_f)Oinfo.type; object_info->rc = (int_f)Oinfo.rc; - ts = HDgmtime(&Oinfo.atime); + ts = gmtime(&Oinfo.atime); object_info->atime[0] = (int_f)ts->tm_year + 1900; /* year starts at 1900 */ object_info->atime[1] = (int_f)ts->tm_mon + 1; /* month starts at 0 in C */ @@ -49,7 +49,7 @@ fill_h5o_info_t_f(H5O_info2_t Oinfo, H5O_info_t_f *object_info) object_info->atime[6] = (int_f)ts->tm_sec; object_info->atime[7] = -32767; /* millisecond is not available, assign it -HUGE(0) */ - ts = HDgmtime(&Oinfo.btime); + ts = gmtime(&Oinfo.btime); object_info->btime[0] = (int_f)ts->tm_year + 1900; /* year starts at 1900 */ object_info->btime[1] = (int_f)ts->tm_mon + 1; /* month starts at 0 in C */ @@ -60,7 +60,7 @@ fill_h5o_info_t_f(H5O_info2_t Oinfo, H5O_info_t_f *object_info) object_info->btime[6] = (int_f)ts->tm_sec; object_info->btime[7] = -32767; /* millisecond is not available, assign it -HUGE(0) */ - ts = HDgmtime(&Oinfo.ctime); + ts = gmtime(&Oinfo.ctime); object_info->ctime[0] = (int_f)ts->tm_year + 1900; /* year starts at 1900 */ object_info->ctime[1] = (int_f)ts->tm_mon + 1; /* month starts at 0 in C */ @@ -71,7 +71,7 @@ fill_h5o_info_t_f(H5O_info2_t Oinfo, H5O_info_t_f *object_info) object_info->ctime[6] = (int_f)ts->tm_sec; object_info->ctime[7] = -32767; /* millisecond is not available, assign it -HUGE(0) */ - ts = HDgmtime(&Oinfo.mtime); + ts = gmtime(&Oinfo.mtime); object_info->mtime[0] = (int_f)ts->tm_year + 1900; /* year starts at 1900 */ object_info->mtime[1] = (int_f)ts->tm_mon + 1; /* month starts at 0 in 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..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; 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..5b95c01 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; @@ -1989,7 +1989,7 @@ h5tget_tag_c(hid_t_f *type_id, _fcd tag, size_t_f *tag_size, int_f *taglen) return ret_value; HD5packFstring(c_tag, _fcdtocp(tag), (size_t)*tag_size); - *taglen = (int_f)HDstrlen(c_tag); + *taglen = (int_f)strlen(c_tag); H5free_memory(c_tag); ret_value = 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..5129bda 100644 --- a/fortran/src/H5f90kit.c +++ b/fortran/src/H5f90kit.c @@ -50,15 +50,15 @@ HD5f2cstring(_fcd fdesc, size_t len) /* Search for the end of the string */ str = _fcdtocp(fdesc); - for (i = (int)len - 1; i >= 0 && HDisspace((int)str[i]) && str[i] == ' '; i--) + for (i = (int)len - 1; i >= 0 && isspace((int)str[i]) && str[i] == ' '; i--) /*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'; @@ -90,14 +90,14 @@ void HD5packFstring(char *src, char *dest, size_t dst_len) /******/ { - size_t src_len = HDstrlen(src); + size_t src_len = strlen(src); /* 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..6519a2e 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 */ /*---------------------------------------------------------------------------- @@ -147,6 +147,6 @@ void nh5_env_nocleanup_c(int_f *status) { *status = (int_f)0; - if (HDgetenv(HDF5_NOCLEANUP)) + if (getenv(HDF5_NOCLEANUP)) *status = (int_f)1; } /* h5_env_nocleanup_c */ diff --git a/fortran/test/tH5A_1_8.F90 b/fortran/test/tH5A_1_8.F90 index 03e26ec..bffdb3e 100644 --- a/fortran/test/tH5A_1_8.F90 +++ b/fortran/test/tH5A_1_8.F90 @@ -621,7 +621,7 @@ SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error) my_dataset = dset3 dsetname = DSET3_NAME ! CASE DEFAULT - ! CALL HDassert(0.AND."Toomanydatasets!") + ! CALL assert(0.AND."Toomanydatasets!") END SELECT @@ -1487,7 +1487,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) CASE (2) my_dataset = dset3 ! CASE DEFAULT - ! CALL HDassert(0.AND."Toomanydatasets!") + ! CALL assert(0.AND."Toomanydatasets!") END SELECT @@ -1536,7 +1536,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) CASE (2) my_dataset = dset3 ! CASE DEFAULT - ! CALL HDassert(0.AND."Toomanydatasets!") + ! CALL assert(0.AND."Toomanydatasets!") END SELECT ! Delete attributes from compact storage @@ -1552,7 +1552,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ! Verify the attribute information for first attribute in appropriate order - ! HDmemset(&ainfo, 0, sizeof(ainfo)); + ! memset(&ainfo, 0, sizeof(ainfo)); !EP CALL h5aget_info_by_idx_f(my_dataset, ".", idx_type, order, 0_HSIZE_T, & CALL h5aget_info_by_idx_f(my_dataset, ".", idx_type, order, hzero, & @@ -1602,7 +1602,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) CASE (2) my_dataset = dset3 ! CASE DEFAULT - ! CALL HDassert(0.AND."Toomanydatasets!") + ! CALL assert(0.AND."Toomanydatasets!") END SELECT ! Create more attributes, to push into dense form @@ -1667,7 +1667,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) ENDIF ! Verify the name for first attribute in appropriate order - ! HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE); + ! memset(tmpname, 0, (size_t)NAME_BUF_SIZE); size = 7 ! *CHECK* if not the correct size CALL h5aget_name_by_idx_f(my_dataset, ".", idx_type, order,INT(0,hsize_t), & diff --git a/fortran/test/tH5G_1_8.F90 b/fortran/test/tH5G_1_8.F90 index 9444619..ab9c145 100644 --- a/fortran/test/tH5G_1_8.F90 +++ b/fortran/test/tH5G_1_8.F90 @@ -936,8 +936,8 @@ END SUBROUTINE group_info ! old_modification_time = oinfo.mtime; ! If this test happens too quickly, the times will all be the same. Make sure the time changes. -! curr_time = HDtime(NULL); -! while(HDtime(NULL) <= curr_time) +! curr_time = time(NULL); +! while(time(NULL) <= curr_time) ! ; ! Close the file and reopen it @@ -1411,7 +1411,7 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) CALL H5Ldelete_by_idx_f(group_id, ".", idx_type, iorder, INT(0,HSIZE_T), error) CALL check("H5Ldelete_by_idx_f", error, total_error) ! Verify the link information for first link in appropriate order - ! HDmemset(&linfo, 0, sizeof(linfo)); + ! memset(&linfo, 0, sizeof(linfo)); CALL H5Lget_info_by_idx_f(group_id, ".", idx_type, iorder, INT(0,HSIZE_T), & link_type, f_corder_valid, corder, cset, token, val_size, error) @@ -1441,7 +1441,7 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error) ! Verify the name for first link in appropriate order - ! HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE); + ! memset(tmpname, 0, (size_t)NAME_BUF_SIZE); !!$ size_tmp = 20 !!$ CALL H5Lget_name_by_idx_f(group_id, ".", idx_type, order, INT(0,HSIZE_T), size_tmp, tmpname, error) !!$ CALL check("delete_by_idx.H5Lget_name_by_idx_f", error, total_error) @@ -1530,14 +1530,14 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & valname = 'valn.'//chr2 ! Verify the link information for first link, in increasing creation order - ! HDmemset(&linfo, 0, sizeof(linfo)); + ! memset(&linfo, 0, sizeof(linfo)); CALL H5Lget_info_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(0,HSIZE_T), & link_type, f_corder_valid, corder, cset, token, val_size, error) CALL check("H5Lget_info_by_idx_f", error, total_error) CALL verify("H5Lget_info_by_idx_f", corder, 0, total_error) ! Verify the link information for new link, in increasing creation order - ! HDmemset(&linfo, 0, sizeof(linfo)); + ! memset(&linfo, 0, sizeof(linfo)); CALL H5Lget_info_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), & link_type, f_corder_valid, corder, cset, token, val_size, error) CALL check("H5Lget_info_by_idx_f", error, total_error) @@ -1545,16 +1545,16 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, & ! Verify value for new soft link, in increasing creation order !!$ IF(hard_link)THEN -!!$ ! HDmemset(tmpval, 0, (size_t)NAME_BUF_SIZE); +!!$ ! memset(tmpval, 0, (size_t)NAME_BUF_SIZE); !!$ !!$ CALL H5Lget_val_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, n, tmpval, INT(7,SIZE_T),error) !!$ CALL check("H5Lget_val_by_idx",error,total_error) !!$ -!!$! IF(HDstrcmp(valname, tmpval)) TEST_ERROR +!!$! IF(strcmp(valname, tmpval)) TEST_ERROR !!$ ENDIF ! Verify the name for new link, in increasing creation order - ! HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE); + ! memset(tmpname, 0, (size_t)NAME_BUF_SIZE); ! The actual size of tmpname should be 7 diff --git a/fortran/test/tH5Sselect.F90 b/fortran/test/tH5Sselect.F90 index f0b2c85..bf1658c 100644 --- a/fortran/test/tH5Sselect.F90 +++ b/fortran/test/tH5Sselect.F90 @@ -1086,8 +1086,8 @@ SUBROUTINE test_select_point(cleanup, total_error) ! MESSAGE(5, ("Testing Element Selection Functions\n")); ! Allocate write & read buffers -!!$ wbuf = HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); -!!$ rbuf = HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); +!!$ wbuf = malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); +!!$ rbuf = calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); !!$ ! Initialize WRITE buffer @@ -1204,7 +1204,7 @@ SUBROUTINE test_select_point(cleanup, total_error) !!$ Save points for later iteration !!$ (these are in the second half of the buffer, because we are prepending !!$ the next list of points to the beginning of the point selection list) -!!$ HDmemcpy(((char *)pi.coord)+sizeof(coord2),coord2,sizeof(coord2)); +!!$ memcpy(((char *)pi.coord)+sizeof(coord2),coord2,sizeof(coord2)); !!$ CALL H5Sget_select_npoints_f(sid2, npoints, error) @@ -1241,7 +1241,7 @@ SUBROUTINE test_select_point(cleanup, total_error) CALL verify("h5sget_select_npoints_f", INT(npoints), 20, total_error) !!$ Save points for later iteration -!!$ HDmemcpy(pi.coord,coord2,sizeof(coord2)); +!!$ memcpy(pi.coord,coord2,sizeof(coord2)); ! Create a dataset CALL h5dcreate_f(fid1, "Dataset1", H5T_NATIVE_CHARACTER, sid1, dataset, error) -- cgit v0.12