summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Aff.F90
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2015-04-21 18:33:25 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2015-04-21 18:33:25 (GMT)
commit5e6d18e5be17b43ba446acbbc11d0fbe583abc47 (patch)
tree5f9c9b5a16f95bcfa55bcef8bb597847d255b92e /fortran/src/H5Aff.F90
parent11b19627b9ac9a97af2970dac92e378baeb9fc1e (diff)
downloadhdf5-5e6d18e5be17b43ba446acbbc11d0fbe583abc47.zip
hdf5-5e6d18e5be17b43ba446acbbc11d0fbe583abc47.tar.gz
hdf5-5e6d18e5be17b43ba446acbbc11d0fbe583abc47.tar.bz2
[svn-r26869] removed the --enable-fortran2003 option, it is now just --enable-fortran
Diffstat (limited to 'fortran/src/H5Aff.F90')
-rw-r--r--fortran/src/H5Aff.F9018
1 files changed, 11 insertions, 7 deletions
diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90
index 0c209fa..a827738 100644
--- a/fortran/src/H5Aff.F90
+++ b/fortran/src/H5Aff.F90
@@ -494,7 +494,7 @@ CONTAINS
hdferr = h5aget_name_c(attr_id, size, buf)
END SUBROUTINE h5aget_name_f
-
+!!$
!!$ SUBROUTINE H5Aget_name_f(attr_id, size, buf, hdferr)
!!$ IMPLICIT NONE
!!$ INTEGER(HID_T), INTENT(IN) :: attr_id
@@ -503,9 +503,10 @@ CONTAINS
!!$ INTEGER, INTENT(OUT) :: hdferr
!!$!*****
!!$ CHARACTER(KIND=C_CHAR, LEN=LEN(buf)+1) :: c_buf
+!!$ INTEGER(SIZE_T) :: size_out
!!$
!!$ INTERFACE
-!!$ INTEGER FUNCTION H5Aget_name(attr_id, size, buf) BIND(C, NAME='H5Aget_name')
+!!$ INTEGER(SIZE_T) FUNCTION H5Aget_name(attr_id, size, buf) BIND(C, NAME='H5Aget_name')
!!$ IMPORT :: C_CHAR
!!$ IMPORT :: HID_T, SIZE_T
!!$ INTEGER(HID_T), INTENT(IN), VALUE :: attr_id
@@ -515,11 +516,14 @@ CONTAINS
!!$ END INTERFACE
!!$
!!$ ! add 1 for the null char
-!!$ PRINT*,H5Aget_name(attr_id, size + 1_SIZE_T, c_buf)
-!!$ hdferr = INT(H5Aget_name(attr_id, size + 1_SIZE_T, c_buf))
-!!$
-!!$ CALL H5_Fortran_string_c2f(c_buf, buf)
-!!$
+!!$ size_out = H5Aget_name(attr_id, size + 1_SIZE_T, c_buf)
+!!$
+!!$ hdferr = 0
+!!$ IF(size_out.LT.0)THEN
+!!$ hdferr = -1
+!!$ ELSE
+!!$ CALL H5_Fortran_string_c2f(c_buf, buf)
+!!$ ENDIF
!!$
!!$ END SUBROUTINE H5Aget_name_f