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/H5TBfc.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/H5TBfc.c')
-rw-r--r-- | hl/fortran/src/H5TBfc.c | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/hl/fortran/src/H5TBfc.c b/hl/fortran/src/H5TBfc.c index 588638c..5d4212d 100644 --- a/hl/fortran/src/H5TBfc.c +++ b/hl/fortran/src/H5TBfc.c @@ -61,9 +61,9 @@ h5tbmake_table_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *name HGOTO_DONE(FAIL) if (NULL == (c_name1 = (char *)HD5f2cstring(name1, (size_t)*namelen1))) HGOTO_DONE(FAIL) - if (NULL == (c_field_offset = (size_t *)HDmalloc(sizeof(size_t) * (size_t)c_nfields))) + if (NULL == (c_field_offset = (size_t *)malloc(sizeof(size_t) * (size_t)c_nfields))) HGOTO_DONE(FAIL) - if (NULL == (c_field_types = (hid_t *)HDmalloc(sizeof(hid_t) * (size_t)c_nfields))) + if (NULL == (c_field_types = (hid_t *)malloc(sizeof(hid_t) * (size_t)c_nfields))) HGOTO_DONE(FAIL) for (i = 0; i < num_elem; i++) { @@ -74,7 +74,7 @@ h5tbmake_table_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *name /* * allocate array of character pointers */ - if (NULL == (c_field_names = (char **)HDcalloc((size_t)num_elem, sizeof(char *)))) + if (NULL == (c_field_names = (char **)calloc((size_t)num_elem, sizeof(char *)))) HGOTO_DONE(FAIL) /* copy data to long C string */ @@ -86,9 +86,9 @@ h5tbmake_table_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *name */ tmp_p = tmp; for (i = 0; i < num_elem; i++) { - if (NULL == (c_field_names[i] = (char *)HDmalloc((size_t)char_len_field_names[i] + 1))) + if (NULL == (c_field_names[i] = (char *)malloc((size_t)char_len_field_names[i] + 1))) HGOTO_DONE(FAIL) - HDmemcpy(c_field_names[i], tmp_p, (size_t)char_len_field_names[i]); + memcpy(c_field_names[i], tmp_p, (size_t)char_len_field_names[i]); c_field_names[i][char_len_field_names[i]] = '\0'; tmp_p = tmp_p + *max_char_size_field_names; } /* end for */ @@ -103,22 +103,22 @@ h5tbmake_table_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *name done: if (c_name) - HDfree(c_name); + free(c_name); if (c_name1) - HDfree(c_name1); + free(c_name1); if (c_field_names) { for (i = 0; i < num_elem; i++) { if (c_field_names[i]) - HDfree(c_field_names[i]); + free(c_field_names[i]); } /* end for */ - HDfree(c_field_names); + free(c_field_names); } /* end if */ if (tmp) - HDfree(tmp); + free(tmp); if (c_field_offset) - HDfree(c_field_offset); + free(c_field_offset); if (c_field_types) - HDfree(c_field_types); + free(c_field_types); return ret_value; } /* end h5tbmake_table_c() */ @@ -166,9 +166,9 @@ h5tbmake_table_ptr_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f * HGOTO_DONE(FAIL) if (NULL == (c_name1 = (char *)HD5f2cstring(name1, (size_t)*namelen1))) HGOTO_DONE(FAIL) - if (NULL == (c_field_offset = (size_t *)HDmalloc(sizeof(size_t) * (size_t)c_nfields))) + if (NULL == (c_field_offset = (size_t *)malloc(sizeof(size_t) * (size_t)c_nfields))) HGOTO_DONE(FAIL) - if (NULL == (c_field_types = (hid_t *)HDmalloc(sizeof(hid_t) * (size_t)c_nfields))) + if (NULL == (c_field_types = (hid_t *)malloc(sizeof(hid_t) * (size_t)c_nfields))) HGOTO_DONE(FAIL) for (i = 0; i < num_elem; i++) { @@ -179,7 +179,7 @@ h5tbmake_table_ptr_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f * /* * allocate array of character pointers */ - if (NULL == (c_field_names = (char **)HDcalloc((size_t)num_elem, sizeof(char *)))) + if (NULL == (c_field_names = (char **)calloc((size_t)num_elem, sizeof(char *)))) HGOTO_DONE(FAIL) /* copy data to long C string */ @@ -191,9 +191,9 @@ h5tbmake_table_ptr_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f * */ tmp_p = tmp; for (i = 0; i < num_elem; i++) { - if (NULL == (c_field_names[i] = (char *)HDmalloc((size_t)char_len_field_names[i] + 1))) + if (NULL == (c_field_names[i] = (char *)malloc((size_t)char_len_field_names[i] + 1))) HGOTO_DONE(FAIL) - HDmemcpy(c_field_names[i], tmp_p, (size_t)char_len_field_names[i]); + memcpy(c_field_names[i], tmp_p, (size_t)char_len_field_names[i]); c_field_names[i][char_len_field_names[i]] = '\0'; tmp_p = tmp_p + *max_char_size_field_names; } /* end for */ @@ -208,22 +208,22 @@ h5tbmake_table_ptr_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f * done: if (c_name) - HDfree(c_name); + free(c_name); if (c_name1) - HDfree(c_name1); + free(c_name1); if (c_field_names) { for (i = 0; i < num_elem; i++) { if (c_field_names[i]) - HDfree(c_field_names[i]); + free(c_field_names[i]); } /* end for */ - HDfree(c_field_names); + free(c_field_names); } /* end if */ if (tmp) - HDfree(tmp); + free(tmp); if (c_field_offset) - HDfree(c_field_offset); + free(c_field_offset); if (c_field_types) - HDfree(c_field_types); + free(c_field_types); return ret_value; } /* end h5tbmake_table_c() */ @@ -260,9 +260,9 @@ h5tbread_table_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hsize_t_f *nfiel if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen))) HGOTO_DONE(FAIL) - if (NULL == (c_dst_offset = (size_t *)HDmalloc(sizeof(size_t) * (size_t)c_nfields))) + if (NULL == (c_dst_offset = (size_t *)malloc(sizeof(size_t) * (size_t)c_nfields))) HGOTO_DONE(FAIL) - if (NULL == (c_dst_sizes = (size_t *)HDmalloc(sizeof(size_t) * (size_t)c_nfields))) + if (NULL == (c_dst_sizes = (size_t *)malloc(sizeof(size_t) * (size_t)c_nfields))) HGOTO_DONE(FAIL) for (i = 0; i < c_nfields; i++) { @@ -278,12 +278,12 @@ h5tbread_table_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hsize_t_f *nfiel done: if (c_name) - HDfree(c_name); + free(c_name); if (c_dst_offset) - HDfree(c_dst_offset); + free(c_dst_offset); if (c_dst_sizes) - HDfree(c_dst_sizes); + free(c_dst_sizes); return ret_value; } /* end h5tbmake_table_c() */ @@ -329,9 +329,9 @@ h5tbwrite_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f * done: if (c_name) - HDfree(c_name); + free(c_name); if (c_name1) - HDfree(c_name1); + free(c_name1); return ret_value; } @@ -377,9 +377,9 @@ h5tbread_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *n done: if (c_name) - HDfree(c_name); + free(c_name); if (c_name1) - HDfree(c_name1); + free(c_name1); return ret_value; } @@ -423,7 +423,7 @@ h5tbwrite_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *fi done: if (c_name) - HDfree(c_name); + free(c_name); return ret_value; } @@ -467,7 +467,7 @@ h5tbread_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *fie done: if (c_name) - HDfree(c_name); + free(c_name); return ret_value; } @@ -512,9 +512,9 @@ h5tbinsert_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *name done: if (c_name) - HDfree(c_name); + free(c_name); if (c_name1) - HDfree(c_name1); + free(c_name1); return ret_value; } @@ -557,9 +557,9 @@ h5tbdelete_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *name done: if (c_name) - HDfree(c_name); + free(c_name); if (c_name1) - HDfree(c_name1); + free(c_name1); return ret_value; } @@ -604,7 +604,7 @@ h5tbget_table_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *n done: if (c_name) - HDfree(c_name); + free(c_name); return ret_value; } @@ -655,15 +655,15 @@ h5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *n */ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen))) HGOTO_DONE(FAIL) - if (NULL == (c_field_offsets = (size_t *)HDmalloc(sizeof(size_t) * (size_t)c_nfields))) + if (NULL == (c_field_offsets = (size_t *)malloc(sizeof(size_t) * (size_t)c_nfields))) HGOTO_DONE(FAIL) - if (NULL == (c_field_sizes = (size_t *)HDmalloc(sizeof(size_t) * (size_t)c_nfields))) + if (NULL == (c_field_sizes = (size_t *)malloc(sizeof(size_t) * (size_t)c_nfields))) HGOTO_DONE(FAIL) - if (NULL == (c_field_names = (char **)HDcalloc((size_t)c_nfields, sizeof(char *)))) + if (NULL == (c_field_names = (char **)calloc((size_t)c_nfields, sizeof(char *)))) HGOTO_DONE(FAIL) for (i = 0; i < c_nfields; i++) - if (NULL == (c_field_names[i] = (char *)HDmalloc(sizeof(char) * HLTB_MAX_FIELD_LEN))) + if (NULL == (c_field_names[i] = (char *)malloc(sizeof(char) * HLTB_MAX_FIELD_LEN))) HGOTO_DONE(FAIL) /* @@ -676,15 +676,15 @@ h5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *n /* return values */ /* names array */ - if (NULL == (tmp = (char *)HDmalloc((c_lenmax * (size_t)c_nfields) + 1))) + if (NULL == (tmp = (char *)malloc((c_lenmax * (size_t)c_nfields) + 1))) HGOTO_DONE(FAIL) tmp_p = tmp; - HDmemset(tmp, ' ', c_lenmax * (size_t)c_nfields); + memset(tmp, ' ', c_lenmax * (size_t)c_nfields); tmp[c_lenmax * c_nfields] = '\0'; for (i = 0; i < c_nfields; i++) { - size_t field_name_len = HDstrlen(c_field_names[i]); + size_t field_name_len = strlen(c_field_names[i]); - HDmemcpy(tmp_p, c_field_names[i], field_name_len); + memcpy(tmp_p, c_field_names[i], field_name_len); namelen2[i] = (size_t_f)field_name_len; length = MAX(length, strlen((c_field_names[i]))); tmp_p = tmp_p + c_lenmax; @@ -702,19 +702,19 @@ h5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *n done: if (c_name) - HDfree(c_name); + free(c_name); if (c_field_names) { for (i = 0; i < num_elem; i++) if (c_field_names[i]) - HDfree(c_field_names[i]); - HDfree(c_field_names); + free(c_field_names[i]); + free(c_field_names); } /* end if */ if (tmp) - HDfree(tmp); + free(tmp); if (c_field_offsets) - HDfree(c_field_offsets); + free(c_field_offsets); if (c_field_sizes) - HDfree(c_field_sizes); + free(c_field_sizes); return ret_value; } |