summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fortran/src/H5If.c14
-rw-r--r--fortran/src/H5Iff.F9065
-rw-r--r--fortran/src/H5f90proto.h22
3 files changed, 40 insertions, 61 deletions
diff --git a/fortran/src/H5If.c b/fortran/src/H5If.c
index 55868dd..da8b482 100644
--- a/fortran/src/H5If.c
+++ b/fortran/src/H5If.c
@@ -42,7 +42,7 @@
* SOURCE
*/
int_f
-nh5iget_type_c (hid_t_f *obj_id, int_f *type)
+h5iget_type_c (hid_t_f *obj_id, int_f *type)
/******/
{
int ret_value = -1;
@@ -83,7 +83,7 @@ nh5iget_type_c (hid_t_f *obj_id, int_f *type)
* SOURCE
*/
int_f
-nh5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size)
+h5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size)
/******/
{
int ret_value = -1;
@@ -135,7 +135,7 @@ DONE:
* SOURCE
*/
int_f
-nh5iinc_ref_c(hid_t_f *obj_id, int_f *ref_count)
+h5iinc_ref_c(hid_t_f *obj_id, int_f *ref_count)
/******/
{
int ret_value;
@@ -171,7 +171,7 @@ done:
* SOURCE
*/
int_f
-nh5idec_ref_c(hid_t_f *obj_id, int_f *ref_count)
+h5idec_ref_c(hid_t_f *obj_id, int_f *ref_count)
/******/
{
int ret_value;
@@ -208,7 +208,7 @@ done:
* SOURCE
*/
int_f
-nh5iget_ref_c(hid_t_f *obj_id, int_f *ref_count)
+h5iget_ref_c(hid_t_f *obj_id, int_f *ref_count)
/******/
{
int ret_value;
@@ -245,7 +245,7 @@ done:
* SOURCE
*/
int_f
-nh5iget_file_id_c(hid_t_f *obj_id, hid_t_f *file_id)
+h5iget_file_id_c(hid_t_f *obj_id, hid_t_f *file_id)
/******/
{
int ret_value;
@@ -276,7 +276,7 @@ done:
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5iis_valid_c(hid_t_f *obj_id, int_f *c_valid)
+h5iis_valid_c(hid_t_f *obj_id, int_f *c_valid)
{
int ret_value;
htri_t c_ret_value;
diff --git a/fortran/src/H5Iff.F90 b/fortran/src/H5Iff.F90
index 7c9a843..4699404 100644
--- a/fortran/src/H5Iff.F90
+++ b/fortran/src/H5Iff.F90
@@ -4,7 +4,7 @@
! MODULE H5I
!
! FILE
-! fortran/src/H5Iff.f90
+! fortran/src/H5Iff.F90
!
! PURPOSE
! This file contains Fortran interfaces for H5I functions.
@@ -34,7 +34,8 @@
!*****
MODULE H5I
-
+
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR
USE H5GLOBAL
CONTAINS
@@ -87,11 +88,9 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
INTERFACE
- INTEGER FUNCTION h5iget_type_c(obj_id, TYPE)
- USE H5GLOBAL
- !DEC$IF DEFINED(HDF5F90_WINDOWS)
- !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_TYPE_C':: h5iget_type_c
- !DEC$ENDIF
+ INTEGER FUNCTION h5iget_type_c(obj_id, TYPE) BIND(C, NAME='h5iget_type_c')
+ IMPORT :: HID_T
+ IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id
INTEGER, INTENT(OUT) :: TYPE
END FUNCTION h5iget_type_c
@@ -133,14 +132,12 @@ CONTAINS
! -1 if fail
!*****
INTERFACE
- INTEGER FUNCTION h5iget_name_c(obj_id, buf, buf_size, name_size)
- USE H5GLOBAL
- !DEC$IF DEFINED(HDF5F90_WINDOWS)
- !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_NAME_C'::h5iget_name_c
- !DEC$ENDIF
- !DEC$ATTRIBUTES reference :: buf
+ INTEGER FUNCTION h5iget_name_c(obj_id, buf, buf_size, name_size) BIND(C, NAME='h5iget_name_c')
+ IMPORT :: C_CHAR
+ IMPORT :: HID_T, SIZE_T
+ IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id
- CHARACTER(LEN=*), INTENT(OUT) :: buf
+ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buf
INTEGER(SIZE_T), INTENT(IN) :: buf_size
INTEGER(SIZE_T), INTENT(OUT) :: name_size
END FUNCTION h5iget_name_c
@@ -176,11 +173,9 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
INTERFACE
- INTEGER FUNCTION h5iinc_ref_c(obj_id, ref_count)
- USE H5GLOBAL
- !DEC$IF DEFINED(HDF5F90_WINDOWS)
- !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IINC_REF_C':: h5iinc_ref_c
- !DEC$ENDIF
+ INTEGER FUNCTION h5iinc_ref_c(obj_id, ref_count) BIND(C, NAME='h5iinc_ref_c')
+ IMPORT :: HID_T
+ IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id
INTEGER, INTENT(OUT) :: ref_count
END FUNCTION h5iinc_ref_c
@@ -215,11 +210,9 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
INTERFACE
- INTEGER FUNCTION h5idec_ref_c(obj_id, ref_count)
- USE H5GLOBAL
- !DEC$IF DEFINED(HDF5F90_WINDOWS)
- !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IDEC_REF_C':: h5idec_ref_c
- !DEC$ENDIF
+ INTEGER FUNCTION h5idec_ref_c(obj_id, ref_count) BIND(C, NAME='h5idec_ref_c')
+ IMPORT :: HID_T
+ IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id
INTEGER, INTENT(OUT) :: ref_count
END FUNCTION h5idec_ref_c
@@ -254,11 +247,9 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
INTERFACE
- INTEGER FUNCTION h5iget_ref_c(obj_id, ref_count)
- USE H5GLOBAL
- !DEC$IF DEFINED(HDF5F90_WINDOWS)
- !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_REF_C':: h5iget_ref_c
- !DEC$ENDIF
+ INTEGER FUNCTION h5iget_ref_c(obj_id, ref_count) BIND(C, NAME='h5iget_ref_c')
+ IMPORT :: HID_T
+ IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id
INTEGER, INTENT(OUT) :: ref_count
END FUNCTION h5iget_ref_c
@@ -292,11 +283,9 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
INTERFACE
- INTEGER FUNCTION h5iget_file_id_c(obj_id, file_id)
- USE H5GLOBAL
- !DEC$IF DEFINED(HDF5F90_WINDOWS)
- !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_FILE_ID_C':: h5iget_file_id_c
- !DEC$ENDIF
+ INTEGER FUNCTION h5iget_file_id_c(obj_id, file_id) BIND(C, NAME='h5iget_file_id_c')
+ IMPORT :: HID_T
+ IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id
INTEGER(HID_T), INTENT(OUT) :: file_id
END FUNCTION h5iget_file_id_c
@@ -332,11 +321,9 @@ CONTAINS
INTEGER :: c_valid ! 0 = .false, 1 = .true.
INTERFACE
- INTEGER FUNCTION h5iis_valid_c(id, c_valid)
- USE H5GLOBAL
- !DEC$IF DEFINED(HDF5F90_WINDOWS)
- !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IIS_VALID_C':: h5iis_valid_c
- !DEC$ENDIF
+ INTEGER FUNCTION h5iis_valid_c(id, c_valid) BIND(C, NAME='h5iis_valid_c')
+ IMPORT :: HID_T
+ IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: id ! Identifier
INTEGER :: c_valid
END FUNCTION h5iis_valid_c
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index 341985e..f51136e 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -1037,21 +1037,13 @@ H5_FCDLL int_f h5rget_obj_type_c (hid_t_f *loc_id, int_f *ref_type, void *ref, i
/*
* Functions from H5If.c
*/
-#define nh5iget_type_c H5_FC_FUNC_(h5iget_type_c, H5IGET_TYPE_C)
-#define nh5iget_name_c H5_FC_FUNC_(h5iget_name_c, H5IGET_NAME_C)
-#define nh5iinc_ref_c H5_FC_FUNC_(h5iinc_ref_c, H5IINC_REF_C)
-#define nh5idec_ref_c H5_FC_FUNC_(h5idec_ref_c, H5IDEC_REF_C)
-#define nh5iget_ref_c H5_FC_FUNC_(h5iget_ref_c, H5IGET_REF_C)
-#define nh5iget_file_id_c H5_FC_FUNC_(h5iget_file_id_c, H5IGET_FILE_ID_C)
-#define nh5iis_valid_c H5_FC_FUNC_(h5iis_valid_c, H5IIS_VALID_C)
-
-H5_FCDLL int_f nh5iget_type_c(hid_t_f *obj_id, int_f *type);
-H5_FCDLL int_f nh5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size);
-H5_FCDLL int_f nh5iinc_ref_c(hid_t_f *obj_id, int_f *ref_count);
-H5_FCDLL int_f nh5idec_ref_c(hid_t_f *obj_id, int_f *ref_count);
-H5_FCDLL int_f nh5iget_ref_c(hid_t_f *obj_id, int_f *ref_count);
-H5_FCDLL int_f nh5iget_file_id_c(hid_t_f *obj_id, hid_t_f *file_id);
-H5_FCDLL int_f nh5iis_valid_c(hid_t_f *obj_id, int_f *c_valid);
+H5_FCDLL int_f h5iget_type_c(hid_t_f *obj_id, int_f *type);
+H5_FCDLL int_f h5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size);
+H5_FCDLL int_f h5iinc_ref_c(hid_t_f *obj_id, int_f *ref_count);
+H5_FCDLL int_f h5idec_ref_c(hid_t_f *obj_id, int_f *ref_count);
+H5_FCDLL int_f h5iget_ref_c(hid_t_f *obj_id, int_f *ref_count);
+H5_FCDLL int_f h5iget_file_id_c(hid_t_f *obj_id, hid_t_f *file_id);
+H5_FCDLL int_f h5iis_valid_c(hid_t_f *obj_id, int_f *c_valid);
/*
* Functions from H5Ef.c