diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-28 00:42:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 00:42:29 (GMT) |
commit | 942739e6fbea0ebf736c35f461e1386396b54e11 (patch) | |
tree | ad98c75926ac1862cae0258ecd5d14f803060112 /fortran/test | |
parent | 636b5d073b273b277d0c2988f33dc1b8eec7a97e (diff) | |
download | hdf5-942739e6fbea0ebf736c35f461e1386396b54e11.zip hdf5-942739e6fbea0ebf736c35f461e1386396b54e11.tar.gz hdf5-942739e6fbea0ebf736c35f461e1386396b54e11.tar.bz2 |
Remove HD/hbool_t from fortran (#3182)
Diffstat (limited to 'fortran/test')
-rw-r--r-- | fortran/test/t.c | 12 | ||||
-rw-r--r-- | fortran/test/tH5A_1_8.F90 | 12 | ||||
-rw-r--r-- | fortran/test/tH5G_1_8.F90 | 18 | ||||
-rw-r--r-- | fortran/test/tH5Sselect.F90 | 8 |
4 files changed, 25 insertions, 25 deletions
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) |