summaryrefslogtreecommitdiffstats
path: root/fortran/src
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2015-04-20 16:03:54 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2015-04-20 16:03:54 (GMT)
commita58b2dbb7ef88b8376d2a02076b000e012214e99 (patch)
tree000727e943473fd9a661a65f89e008b0191a809f /fortran/src
parentbaa46f9e4351f2d8b21cf150873d3972d3f77bf9 (diff)
downloadhdf5-a58b2dbb7ef88b8376d2a02076b000e012214e99.zip
hdf5-a58b2dbb7ef88b8376d2a02076b000e012214e99.tar.gz
hdf5-a58b2dbb7ef88b8376d2a02076b000e012214e99.tar.bz2
[svn-r26846] BIND(C) added to H5 general functions
Diffstat (limited to 'fortran/src')
-rw-r--r--fortran/src/H5_f.c20
-rw-r--r--fortran/src/H5_ff.F9080
-rw-r--r--fortran/src/H5f90proto.h32
3 files changed, 55 insertions, 77 deletions
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index e4aadb6..8df4b36 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -49,7 +49,7 @@
* SOURCE
*/
int_f
-nh5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes )
+h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes )
/******/
{
int ret_value = -1;
@@ -300,7 +300,7 @@ nh5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertype
* SOURCE
*/
int_f
-nh5close_types_c( hid_t_f * types, int_f *lentypes,
+h5close_types_c( hid_t_f * types, int_f *lentypes,
hid_t_f * floatingtypes, int_f* floatinglen,
hid_t_f * integertypes, int_f * integerlen )
/******/
@@ -368,7 +368,7 @@ nh5close_types_c( hid_t_f * types, int_f *lentypes,
* SOURCE
*/
int_f
-nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
+h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags,
int_f *h5fd_flags, hid_t_f *h5fd_hid_flags,
int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags,
@@ -708,7 +708,7 @@ nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
}
int_f
-nh5init1_flags_c(int_f *h5lib_flags)
+h5init1_flags_c(int_f *h5lib_flags)
/******/
{
int ret_value = -1;
@@ -734,7 +734,7 @@ nh5init1_flags_c(int_f *h5lib_flags)
* SOURCE
*/
int_f
-nh5open_c(void)
+h5open_c(void)
/******/
{
int ret_value = -1;
@@ -755,7 +755,7 @@ nh5open_c(void)
* SOURCE
*/
int_f
-nh5close_c(void)
+h5close_c(void)
/******/
{
int ret_value = -1;
@@ -788,7 +788,7 @@ nh5close_c(void)
*
*/
int_f
-nh5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum)
+h5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum)
/******/
{
@@ -826,7 +826,7 @@ nh5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum)
* SOURCE
*/
int_f
-nh5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum)
+h5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum)
/******/
{
int ret_value = -1;
@@ -855,7 +855,7 @@ nh5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum)
* SOURCE
*/
int_f
-nh5garbage_collect_c(void)
+h5garbage_collect_c(void)
/******/
{
int ret_value = -1;
@@ -878,7 +878,7 @@ nh5garbage_collect_c(void)
* SOURCE
*/
int_f
-nh5dont_atexit_c(void)
+h5dont_atexit_c(void)
/******/
{
int ret_value = -1;
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
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index 002004e..4da66fb 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -708,32 +708,20 @@ H5_FCDLL int_f h5eset_auto2_c(int_f* printflag, hid_t_f *estack_id, H5E_auto2_t
/*
* Functions from H5f.c
*/
-#define nh5open_c H5_FC_FUNC_(h5open_c, H5OPEN_C)
-#define nh5close_c H5_FC_FUNC_(h5close_c, H5CLOSE_C)
-#define nh5init_types_c H5_FC_FUNC_(h5init_types_c, H5INIT_TYPES_C)
-#define nh5close_types_c H5_FC_FUNC_(h5close_types_c, H5CLOSE_TYPES_C)
-#define nh5init_flags_c H5_FC_FUNC_(h5init_flags_c, H5INIT_FLAGS_C)
-#define nh5init1_flags_c H5_FC_FUNC_(h5init1_flags_c, H5INIT1_FLAGS_C)
-#define nh5get_libversion_c H5_FC_FUNC_(h5get_libversion_c, H5GET_LIBVERSION_C)
-#define nh5check_version_c H5_FC_FUNC_(h5check_version_c, H5CHECK_VERSION_C)
-#define nh5garbage_collect_c H5_FC_FUNC_(h5garbage_collect_c, H5GARBAGE_COLLECT_C)
-#define nh5dont_atexit_c H5_FC_FUNC_(h5dont_atexit_c, H5DONT_ATEXIT_C)
-
-
-H5_FCDLL int_f nh5open_c(void);
-H5_FCDLL int_f nh5close_c(void);
-H5_FCDLL int_f nh5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes);
-H5_FCDLL int_f nh5close_types_c(hid_t_f *types, int_f *lentypes, hid_t_f *floatingtypes, int_f *floatinglen, hid_t_f *integertypes, int_f *integerlen);
-H5_FCDLL int_f nh5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags,
+H5_FCDLL int_f h5open_c(void);
+H5_FCDLL int_f h5close_c(void);
+H5_FCDLL int_f h5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes);
+H5_FCDLL int_f h5close_types_c(hid_t_f *types, int_f *lentypes, hid_t_f *floatingtypes, int_f *floatinglen, hid_t_f *integertypes, int_f *integerlen);
+H5_FCDLL int_f h5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags,
int_f *h5fd_flags, hid_t_f *h5fd_hid_flags,
int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags,
hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags, int_f *h5s_flags,
hsize_t_f *h5s_hsize_flags, int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags);
-H5_FCDLL int_f nh5init1_flags_c(int_f *h5lib_flags);
-H5_FCDLL int_f nh5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum);
-H5_FCDLL int_f nh5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum);
-H5_FCDLL int_f nh5garbage_collect_c(void);
-H5_FCDLL int_f nh5dont_atexit_c(void);
+H5_FCDLL int_f h5init1_flags_c(int_f *h5lib_flags);
+H5_FCDLL int_f h5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum);
+H5_FCDLL int_f h5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum);
+H5_FCDLL int_f h5garbage_collect_c(void);
+H5_FCDLL int_f h5dont_atexit_c(void);
/*
* Functions from H5Zf.c