summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Df.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-06-28 00:42:29 (GMT)
committerGitHub <noreply@github.com>2023-06-28 00:42:29 (GMT)
commit942739e6fbea0ebf736c35f461e1386396b54e11 (patch)
treead98c75926ac1862cae0258ecd5d14f803060112 /fortran/src/H5Df.c
parent636b5d073b273b277d0c2988f33dc1b8eec7a97e (diff)
downloadhdf5-942739e6fbea0ebf736c35f461e1386396b54e11.zip
hdf5-942739e6fbea0ebf736c35f461e1386396b54e11.tar.gz
hdf5-942739e6fbea0ebf736c35f461e1386396b54e11.tar.bz2
Remove HD/hbool_t from fortran (#3182)
Diffstat (limited to 'fortran/src/H5Df.c')
-rw-r--r--fortran/src/H5Df.c52
1 files changed, 26 insertions, 26 deletions
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;
}