summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/H5Pff.F9021
-rw-r--r--fortran/test/vol_connector.F9012
2 files changed, 19 insertions, 14 deletions
diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90
index 8ad3573..0c0500d 100644
--- a/fortran/src/H5Pff.F90
+++ b/fortran/src/H5Pff.F90
@@ -9,7 +9,7 @@
! COPYRIGHT
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *S
+! Copyright by the Board of Trustees of the University of Illinois. *
! All rights reserved. *
! *
! This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -8125,25 +8125,29 @@ END SUBROUTINE h5pget_virtual_dsetname_f
! INPUTS
! plist_id - access property list identifier.
! new_vol_id - VOL connector id.
-! new_vol_info - VOL connector info.
!
! OUTPUTS
-! hdferr - error code:
-! 0 on success and -1 on failure
+! hdferr - error code:
+! 0 on success and -1 on failure
+!
+! OPTIONAL
+! new_vol_info - VOL connector info.
!
! AUTHOR
! M.S. Breitenfeld
! May 2019
!
! Fortran Interface:
- SUBROUTINE h5pset_vol_f(plist_id, new_vol_id, new_vol_info, hdferr)
+ SUBROUTINE h5pset_vol_f(plist_id, new_vol_id, hdferr, new_vol_info)
IMPLICIT NONE
INTEGER(HID_T) , INTENT(IN) :: plist_id
INTEGER(HID_T) , INTENT(IN) :: new_vol_id
- TYPE(C_PTR) , INTENT(IN) :: new_vol_info
INTEGER , INTENT(OUT) :: hdferr
+ TYPE(C_PTR) , OPTIONAL :: new_vol_info
!*****
+ TYPE(C_PTR) :: new_vol_info_default
+
INTERFACE
INTEGER FUNCTION h5pset_vol(plist_id, new_vol_id, new_vol_info) BIND(C, NAME='H5Pset_vol')
IMPORT :: HID_T, C_PTR
@@ -8154,7 +8158,10 @@ END SUBROUTINE h5pget_virtual_dsetname_f
END FUNCTION h5pset_vol
END INTERFACE
- hdferr = INT(h5pset_vol(plist_id, new_vol_id, new_vol_info))
+ new_vol_info_default = C_NULL_PTR
+ IF(PRESENT(new_vol_info)) new_vol_info_default=new_vol_info
+
+ hdferr = INT(h5pset_vol(plist_id, new_vol_id, new_vol_info_default))
END SUBROUTINE h5pset_vol_f
diff --git a/fortran/test/vol_connector.F90 b/fortran/test/vol_connector.F90
index c2ee6dd..62e3f8d 100644
--- a/fortran/test/vol_connector.F90
+++ b/fortran/test/vol_connector.F90
@@ -188,23 +188,21 @@ CONTAINS
CALL check("H5Pcreate_f",error,total_error)
f_ptr = C_NULL_PTR
- CALL H5Pset_vol_f(fapl_id, vol_id, f_ptr, error)
+ CALL H5Pset_vol_f(fapl_id, vol_id, error)
CALL check("H5Pset_vol_f",error,total_error)
CALL H5Pget_vol_id_f(fapl_id, vol_id_out, error)
CALL check("H5Pget_vol_id_f",error,total_error)
CALL VERIFY("H5Pget_vol_id_f", vol_id_out, vol_id, total_error)
-#if 0
- CALL H5Pcreate_f(H5P_FILE_ACCESS_F, under_fapl, error)
- CALL check("H5Pcreate_f",error,total_error)
- f_ptr = C_LOC(under_fapl)
- CALL H5Pset_vol_f(fapl_id, vol_id, f_ptr, error)
+
+ f_ptr = C_NULL_PTR
+ CALL H5Pset_vol_f(fapl_id, vol_id, error, f_ptr)
CALL check("H5Pset_vol_f",error,total_error)
CALL H5Pget_vol_id_f(fapl_id, vol_id_out, error)
CALL check("H5Pget_vol_id_f",error,total_error)
CALL VERIFY("H5Pget_vol_id_f", vol_id_out, vol_id, total_error)
-#endif
+
CALL H5VLget_connector_id_f(NATIVE_VOL_CONNECTOR_NAME, vol_id_out, error)
CALL check("H5VLget_connector_id_f",error,total_error)
CALL VERIFY("H5VLget_connector_id_f", vol_id_out, vol_id, total_error)