diff options
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/test/t.c | 19 | ||||
-rw-r--r-- | fortran/test/t.h | 2 | ||||
-rw-r--r-- | fortran/test/tH5F.f90 | 11 | ||||
-rw-r--r-- | fortran/test/tf.f90 | 36 |
4 files changed, 67 insertions, 1 deletions
diff --git a/fortran/test/t.c b/fortran/test/t.c index cb71fd2..9eede1a 100644 --- a/fortran/test/t.c +++ b/fortran/test/t.c @@ -128,3 +128,22 @@ nh5_exit_c(int_f *status) HDexit((int)*status); } /* h5_exit_c */ + +/*---------------------------------------------------------------------------- + * Name: h5_group_revision_c + * Purpose: Checks if H5_GROUP_REVISION variable defined + * Inputs: + * Returns: 1 if defines, 0 otherwise + * Programmer: Elena Pourmal + * Saturday, May 13, 2006 + * Modifications: + *---------------------------------------------------------------------------*/ +int_f +nh5_group_revision_c() +{ + int_f ret =0; +#ifdef H5_GROUP_REVISION + ret = 1; +#endif + return ret; +} /* h5_group_revision_c */ diff --git a/fortran/test/t.h b/fortran/test/t.h index 79c6d4b..47062ac 100644 --- a/fortran/test/t.h +++ b/fortran/test/t.h @@ -25,6 +25,7 @@ char *h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size) # define nh5_fixname_c H5_FC_FUNC_(h5_fixname_c, H5_FIXNAME_C) # define nh5_cleanup_c H5_FC_FUNC_(h5_cleanup_c, H5_CLEANUP_C) # define nh5_exit_c H5_FC_FUNC_(h5_exit_c, H5_EXIT_C) +# define nh5_group_revision_c H5_FC_FUNC_(h5_group_revision_c, H5_GROUP_REVISION_C) H5_FCTESTDLL int_f nh5_fixname_c (_fcd base_name, size_t_f *base_namelen, hid_t_f *fapl, _fcd full_name, size_t_f *full_namelen); @@ -35,3 +36,4 @@ H5_FCTESTDLL int_f nh5_cleanup_c H5_FCTESTDLL void nh5_exit_c (int_f *status); +H5_FCTESTDLL int_f nh5_group_revision_c(); diff --git a/fortran/test/tH5F.f90 b/fortran/test/tH5F.f90 index f85d3e9..2cc4766 100644 --- a/fortran/test/tH5F.f90 +++ b/fortran/test/tH5F.f90 @@ -696,6 +696,8 @@ LOGICAL, INTENT(IN) :: cleanup INTEGER, INTENT(OUT) :: total_error INTEGER :: error + INTEGER flag + INTEGER :: free_space_out ! CHARACTER(LEN=10), PARAMETER :: filename = "file_space" @@ -745,9 +747,16 @@ ! Check the free space now CALL h5fget_freespace_f(fid, free_space, error) + CALL h5_group_revision_f(flag) CALL check("h5fget_freespace_f",error,total_error) + if(flag .eq. 1) then + free_space_out = 232 + else + free_space_out = 1024 + endif + if(error .eq.0 .and. free_space .ne. free_space_out) then ! if(error .eq.0 .and. free_space .ne. 232) then - if(error .eq.0 .and. free_space .ne. 1024) then +! if(error .eq.0 .and. free_space .ne. 1024) then total_error = total_error + 1 write(*,*) "3: Wrong amount of free space reported, ", free_space endif diff --git a/fortran/test/tf.f90 b/fortran/test/tf.f90 index f62c3d5..6dc3c02 100644 --- a/fortran/test/tf.f90 +++ b/fortran/test/tf.f90 @@ -200,3 +200,39 @@ CALL h5_exit_c(status) END SUBROUTINE h5_exit_f + +!---------------------------------------------------------------------- +! Name: h5_group_revision_f +! +! Purpose: Checks if group revisions are defined +! +! Inputs: +! +! Outputs: +! flag +! +! Programmer: Elena Pourmal +! May 13, 2006 +! +! +!---------------------------------------------------------------------- + SUBROUTINE h5_group_revision_f(flag) +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5_group_revision_f +!DEC$endif + IMPLICIT NONE + INTEGER, INTENT(OUT) :: flag ! Return code + INTEGER :: flag1 + INTERFACE + INTEGER FUNCTION h5_group_revision_c() + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5_GROUP_REVISION_C':: h5_group_revision_c + !DEC$ ENDIF + END FUNCTION h5_group_revision_c + END INTERFACE + + flag = h5_group_revision_c() + + END SUBROUTINE h5_group_revision_f |