diff options
Diffstat (limited to 'fortran/src/H5_ff.F90')
-rw-r--r-- | fortran/src/H5_ff.F90 | 80 |
1 files changed, 35 insertions, 45 deletions
diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index 3ca3979..d807d6e 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -32,7 +32,9 @@ MODULE H5LIB + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, C_INTPTR_T USE H5GLOBAL + IMPLICIT NONE CONTAINS !****s* H5LIB/h5open_f @@ -60,21 +62,20 @@ CONTAINS ! October 13, 2011 ! Fortran90 Interface: SUBROUTINE h5open_f(error) - USE H5GLOBAL IMPLICIT NONE INTEGER, INTENT(OUT) :: error !***** INTEGER :: error_1, error_2, error_3 INTERFACE - INTEGER FUNCTION h5init_types_c(p_types, f_types, i_types) - USE H5GLOBAL + INTEGER FUNCTION h5init_types_c(p_types, f_types, i_types) & + BIND(C,NAME='h5init_types_c') + IMPORT :: HID_T + IMPORT :: PREDEF_TYPES_LEN, FLOATING_TYPES_LEN, INTEGER_TYPES_LEN + IMPLICIT NONE INTEGER(HID_T), DIMENSION(PREDEF_TYPES_LEN) :: p_types INTEGER(HID_T), DIMENSION(FLOATING_TYPES_LEN) :: f_types INTEGER(HID_T), DIMENSION(INTEGER_TYPES_LEN) :: i_types - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT_TYPES_C'::h5init_types_c - !DEC$ENDIF END FUNCTION h5init_types_c END INTERFACE INTERFACE @@ -96,8 +97,17 @@ CONTAINS i_H5S_hsize_flags, & i_H5T_flags, & i_H5Z_flags, & - i_H5generic_flags) - USE H5GLOBAL + i_H5generic_flags) & + BIND(C,NAME='h5init_flags_c') + IMPORT :: HID_T, SIZE_T, HSIZE_T + IMPORT :: H5D_FLAGS_LEN, H5D_SIZE_FLAGS_LEN, & + H5E_FLAGS_LEN, H5E_HID_FLAGS_LEN, & + H5F_FLAGS_LEN, H5G_FLAGS_LEN, H5FD_FLAGS_LEN, & + H5FD_HID_FLAGS_LEN, H5I_FLAGS_LEN, H5L_FLAGS_LEN, & + H5O_FLAGS_LEN, H5P_FLAGS_LEN, H5P_FLAGS_INT_LEN, & + H5R_FLAGS_LEN, H5S_FLAGS_LEN, H5S_HSIZE_FLAGS_LEN, & + H5T_FLAGS_LEN, H5Z_FLAGS_LEN, H5generic_FLAGS_LEN + IMPLICIT NONE INTEGER i_H5D_flags(H5D_FLAGS_LEN) INTEGER(SIZE_T) i_H5D_size_flags(H5D_SIZE_FLAGS_LEN) INTEGER i_H5E_flags(H5E_FLAGS_LEN) @@ -117,18 +127,14 @@ CONTAINS INTEGER i_H5T_flags(H5T_FLAGS_LEN) INTEGER i_H5Z_flags(H5Z_FLAGS_LEN) INTEGER i_H5generic_flags(H5generic_FLAGS_LEN) - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT_FLAGS_C'::h5init_flags_c - !DEC$ENDIF END FUNCTION h5init_flags_c END INTERFACE INTERFACE - INTEGER FUNCTION h5init1_flags_c( i_H5LIB_flags ) - USE H5GLOBAL + INTEGER FUNCTION h5init1_flags_c( i_H5LIB_flags ) & + BIND(C,NAME='h5init1_flags_c') + IMPORT :: H5LIB_FLAGS_LEN + IMPLICIT NONE INTEGER i_H5LIB_flags(H5LIB_FLAGS_LEN) - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT1_FLAGS_C'::h5init1_flags_c - !DEC$ENDIF END FUNCTION h5init1_flags_c END INTERFACE error_1 = h5init_types_c(predef_types, floating_types, integer_types) @@ -180,7 +186,6 @@ CONTAINS ! October 13, 2011 ! Fortran90 Interface: SUBROUTINE h5close_f(error) - USE H5GLOBAL IMPLICIT NONE INTEGER, INTENT(OUT) :: error !***** @@ -188,17 +193,15 @@ CONTAINS INTERFACE INTEGER FUNCTION h5close_types_c(p_types, P_TYPES_LEN, & f_types, F_TYPES_LEN, & - i_types, I_TYPES_LEN ) - USE H5GLOBAL + i_types, I_TYPES_LEN ) & + BIND(C,NAME='h5close_types_c') + IMPORT :: HID_T INTEGER P_TYPES_LEN INTEGER F_TYPES_LEN INTEGER I_TYPES_LEN INTEGER(HID_T), DIMENSION(P_TYPES_LEN) :: p_types INTEGER(HID_T), DIMENSION(F_TYPES_LEN) :: f_types INTEGER(HID_T), DIMENSION(I_TYPES_LEN) :: i_types - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5CLOSE_TYPES_C'::h5close_types_c - !DEC$ENDIF END FUNCTION h5close_types_c END INTERFACE error_1 = h5close_types_c(predef_types, PREDEF_TYPES_LEN, & @@ -228,15 +231,13 @@ CONTAINS ! ! Fortran90 Interface: SUBROUTINE h5get_libversion_f(majnum, minnum, relnum, error) - USE H5GLOBAL IMPLICIT NONE INTEGER, INTENT(OUT) :: majnum, minnum, relnum, error !***** INTERFACE - INTEGER FUNCTION h5get_libversion_c(majnum, minnum, relnum) - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GET_LIBVERSION_C'::h5get_libversion_c - !DEC$ENDIF + INTEGER FUNCTION h5get_libversion_c(majnum, minnum, relnum) & + BIND(C,NAME='h5get_libversion_c') + IMPLICIT NONE INTEGER, INTENT(OUT) :: majnum, minnum, relnum END FUNCTION h5get_libversion_c END INTERFACE @@ -267,16 +268,14 @@ CONTAINS ! ! Fortran90 Interface: SUBROUTINE h5check_version_f(majnum, minnum, relnum, error) - USE H5GLOBAL IMPLICIT NONE INTEGER, INTENT(IN) :: majnum, minnum, relnum INTEGER, INTENT(OUT) :: error !***** INTERFACE - INTEGER FUNCTION h5check_version_c(majnum, minnum, relnum) - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5CHECK_VERSION_C'::h5check_version_c - !DEC$ENDIF + INTEGER FUNCTION h5check_version_c(majnum, minnum, relnum) & + BIND(C,NAME='h5check_version_c') + IMPLICIT NONE INTEGER, INTENT(IN) :: majnum, minnum, relnum END FUNCTION h5check_version_c END INTERFACE @@ -301,15 +300,12 @@ CONTAINS ! ! Fortran90 Interface: SUBROUTINE h5garbage_collect_f(error) - USE H5GLOBAL IMPLICIT NONE INTEGER, INTENT(OUT) :: error !***** INTERFACE - INTEGER FUNCTION h5garbage_collect_c() - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GARBAGE_COLLECT_C'::h5garbage_collect_c - !DEC$ENDIF + INTEGER FUNCTION h5garbage_collect_c() & + BIND(C,NAME='h5garbage_collect_c') END FUNCTION h5garbage_collect_c END INTERFACE @@ -333,15 +329,12 @@ CONTAINS ! ! Fortran90 Interface: SUBROUTINE h5dont_atexit_f(error) - USE H5GLOBAL IMPLICIT NONE INTEGER, INTENT(OUT) :: error !***** INTERFACE - INTEGER FUNCTION h5dont_atexit_c() - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DONT_ATEXIT_C'::h5dont_atexit_c - !DEC$ENDIF + INTEGER FUNCTION h5dont_atexit_c() & + BIND(C,NAME='h5dont_atexit_c') END FUNCTION h5dont_atexit_c END INTERFACE @@ -371,7 +364,6 @@ CONTAINS ! ! Fortran90 Interface: INTEGER(HID_T) FUNCTION h5kind_to_type(kind, flag) RESULT(h5_type) - USE H5GLOBAL IMPLICIT NONE INTEGER, INTENT(IN) :: kind INTEGER, INTENT(IN) :: flag @@ -422,8 +414,6 @@ CONTAINS ! ! Fortran2003 Interface: FUNCTION h5offsetof(start,end) RESULT(offset) - USE, INTRINSIC :: ISO_C_BINDING - USE H5GLOBAL IMPLICIT NONE INTEGER(SIZE_T) :: offset TYPE(C_PTR), VALUE, INTENT(IN) :: start, end |