diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-28 00:42:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 00:42:48 (GMT) |
commit | d278ce1f21903c33c6b28e8acb827e94275d4421 (patch) | |
tree | d52c322015ac8ce3b8fb992958ab8be1f13d4886 /hl/fortran/src/H5LTfc.c | |
parent | 942739e6fbea0ebf736c35f461e1386396b54e11 (diff) | |
download | hdf5-d278ce1f21903c33c6b28e8acb827e94275d4421.zip hdf5-d278ce1f21903c33c6b28e8acb827e94275d4421.tar.gz hdf5-d278ce1f21903c33c6b28e8acb827e94275d4421.tar.bz2 |
Remove HD/hbool_t from high-level lib (#3183)
Diffstat (limited to 'hl/fortran/src/H5LTfc.c')
-rw-r--r-- | hl/fortran/src/H5LTfc.c | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/hl/fortran/src/H5LTfc.c b/hl/fortran/src/H5LTfc.c index c888eec..e6d7b3a 100644 --- a/hl/fortran/src/H5LTfc.c +++ b/hl/fortran/src/H5LTfc.c @@ -49,7 +49,7 @@ h5ltmake_dataset_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, h if (c_name == NULL) goto done; - c_dims = (hsize_t *)HDmalloc(sizeof(hsize_t) * ((size_t)*rank)); + c_dims = (hsize_t *)malloc(sizeof(hsize_t) * ((size_t)*rank)); if (c_dims == NULL) goto done; /* @@ -71,9 +71,9 @@ h5ltmake_dataset_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *rank, h done: if (c_name != NULL) - HDfree(c_name); + free(c_name); if (c_dims != NULL) - HDfree(c_dims); + free(c_dims); return ret_value; } @@ -124,7 +124,7 @@ h5ltread_dataset_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_ done: if (c_name != NULL) - HDfree(c_name); + free(c_name); return ret_value; } @@ -179,9 +179,9 @@ h5ltmake_dataset_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_ done: if (c_name != NULL) - HDfree(c_name); + free(c_name); if (c_buf != NULL) - HDfree(c_buf); + free(c_buf); return ret_value; } @@ -231,7 +231,7 @@ h5ltread_dataset_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, char *b done: if (c_name != NULL) - HDfree(c_name); + free(c_name); return ret_value; } @@ -281,7 +281,7 @@ h5ltset_attribute_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f c_loc_id = (hid_t)*loc_id; c_size = (size_t)*size; - if (HDstrncmp(dtype, "I", 1) == 0) { + if (strncmp(dtype, "I", 1) == 0) { if ((size_t)*sizeof_val == sizeof(int)) ret = H5LT_set_attribute_numerical(c_loc_id, c_name, c_attrname, c_size, H5T_NATIVE_INT, (const int *)buf); @@ -296,7 +296,7 @@ h5ltset_attribute_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f else goto done; } - else if (HDstrncmp(dtype, "R", 1) == 0) { + else if (strncmp(dtype, "R", 1) == 0) { if ((size_t)*sizeof_val == sizeof(float)) ret = H5LT_set_attribute_numerical(c_loc_id, c_name, c_attrname, c_size, H5T_NATIVE_FLOAT, (const float *)buf); @@ -309,7 +309,7 @@ h5ltset_attribute_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f else goto done; } - else if (HDstrncmp(dtype, "C", 1) == 0) { + else if (strncmp(dtype, "C", 1) == 0) { c_buf = (char *)HD5f2cstring((_fcd)buf, c_size); if (c_buf == NULL) @@ -324,11 +324,11 @@ h5ltset_attribute_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f done: if (c_name != NULL) - HDfree(c_name); + free(c_name); if (c_attrname != NULL) - HDfree(c_attrname); + free(c_attrname); if (c_buf != NULL) - HDfree(c_buf); + free(c_buf); return ret_value; } @@ -375,7 +375,7 @@ h5ltget_attribute_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f */ c_loc_id = (hid_t)*loc_id; - if (HDstrncmp(dtype, "I", 1) == 0) { + if (strncmp(dtype, "I", 1) == 0) { if ((size_t)*sizeof_val == sizeof(int)) ret = H5LTget_attribute(c_loc_id, c_name, c_attrname, H5T_NATIVE_INT, buf); else if ((size_t)*sizeof_val == sizeof(long)) @@ -387,7 +387,7 @@ h5ltget_attribute_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f else goto done; } - else if (HDstrncmp(dtype, "R", 1) == 0) { + else if (strncmp(dtype, "R", 1) == 0) { if ((size_t)*sizeof_val == sizeof(float)) ret = H5LTget_attribute(c_loc_id, c_name, c_attrname, H5T_NATIVE_FLOAT, buf); else if ((size_t)*sizeof_val == sizeof(double)) @@ -405,9 +405,9 @@ h5ltget_attribute_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f done: if (c_name != NULL) - HDfree(c_name); + free(c_name); if (c_attrname != NULL) - HDfree(c_attrname); + free(c_attrname); return ret_value; } @@ -451,7 +451,7 @@ h5ltget_attribute_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, si /* * Allocate buffer to hold C attribute string */ - if ((c_buf = (char *)HDmalloc((size_t)*buf_size + 1)) == NULL) + if ((c_buf = (char *)malloc((size_t)*buf_size + 1)) == NULL) goto done; /* @@ -470,11 +470,11 @@ h5ltget_attribute_string_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, si done: if (c_name != NULL) - HDfree(c_name); + free(c_name); if (c_attrname != NULL) - HDfree(c_attrname); + free(c_attrname); if (c_buf != NULL) - HDfree(c_buf); + free(c_buf); return ret_value; } @@ -526,7 +526,7 @@ h5ltget_dataset_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *ra done: if (c_name != NULL) - HDfree(c_name); + free(c_name); return ret_value; } @@ -569,7 +569,7 @@ h5ltfind_dataset_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name) ret = H5LTfind_dataset(c_loc_id, c_name); if (c_name != NULL) - HDfree(c_name); + free(c_name); return ret; } @@ -639,7 +639,7 @@ h5ltget_dataset_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f done: if (c_name != NULL) - HDfree(c_name); + free(c_name); return ret_value; } @@ -697,9 +697,9 @@ h5ltget_attribute_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, siz done: if (c_name != NULL) - HDfree(c_name); + free(c_name); if (c_attrname != NULL) - HDfree(c_attrname); + free(c_attrname); return ret_value; } @@ -774,9 +774,9 @@ h5ltget_attribute_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f done: if (c_name != NULL) - HDfree(c_name); + free(c_name); if (c_attrname != NULL) - HDfree(c_attrname); + free(c_attrname); return ret_value; } @@ -800,9 +800,9 @@ done: int_f h5ltpath_valid_c(hid_t_f *loc_id, _fcd path, size_t_f *pathlen, int_f *check_object_valid_c) { - htri_t ret = -1; - char *c_path = NULL; - hbool_t check_object_valid; + htri_t ret = -1; + char *c_path = NULL; + bool check_object_valid; /* * convert FORTRAN name to C name @@ -810,9 +810,9 @@ h5ltpath_valid_c(hid_t_f *loc_id, _fcd path, size_t_f *pathlen, int_f *check_obj if (NULL == (c_path = (char *)HD5f2cstring(path, (size_t)*pathlen))) goto done; - check_object_valid = FALSE; + check_object_valid = false; if (*check_object_valid_c == 1) - check_object_valid = TRUE; + check_object_valid = true; /* * call H5LTpath_valid function. @@ -821,7 +821,7 @@ h5ltpath_valid_c(hid_t_f *loc_id, _fcd path, size_t_f *pathlen, int_f *check_obj done: if (c_path != NULL) - HDfree(c_path); + free(c_path); return (int_f)ret; } |