diff options
author | Elena Pourmal <epourmal@hdfgroup.org> | 2003-03-19 16:13:35 (GMT) |
---|---|---|
committer | Elena Pourmal <epourmal@hdfgroup.org> | 2003-03-19 16:13:35 (GMT) |
commit | 65f5514a4ff647cff51c37e3af30d5e138733d06 (patch) | |
tree | 4d1a0934ee57c44e3703b4388dcb67a0c6c063ad /fortran/src/H5Iff.f90 | |
parent | da4bf69db756aabb448bead90a0d85d7348ff04e (diff) | |
download | hdf5-65f5514a4ff647cff51c37e3af30d5e138733d06.zip hdf5-65f5514a4ff647cff51c37e3af30d5e138733d06.tar.gz hdf5-65f5514a4ff647cff51c37e3af30d5e138733d06.tar.bz2 |
[svn-r6494]
Purpose: Catching up with the C library
Description: Added the follwoing new fortran functions
h5iget_name_f
h5tis_variavle_str_f
h5zunregister_f
h5zfilter_avail_f
h5pset_shuffle_f
h5pset_fletcher32
h5pset_edc_check_f
h5pget_edc_check_f
h5dfill_f
Solution:
Platforms tested: arabica(C and F90), burrwhite (pgcc and pgf90), modi4 (F90 and parallel)
Misc. update:
Diffstat (limited to 'fortran/src/H5Iff.f90')
-rw-r--r-- | fortran/src/H5Iff.f90 | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/fortran/src/H5Iff.f90 b/fortran/src/H5Iff.f90 index f0ac299..690d9fd 100644 --- a/fortran/src/H5Iff.f90 +++ b/fortran/src/H5Iff.f90 @@ -72,6 +72,65 @@ END INTERFACE hdferr = h5iget_type_c(obj_id, type) END SUBROUTINE h5iget_type_f +!---------------------------------------------------------------------- +! Name: h5iget_name_f +! +! Purpose: Gets a name of an object specified by its idetifier. +! +! Inputs: +! obj_id - attribute identifier +! buf_size - size of a buffer to read name in +! Outputs: +! buf - buffer to read name in, name will be truncated if +! buffer is not big enough +! name_size - name size +! hdferr: - error code +! Success: 0 +! Failure: -1 +! Optional parameters: +! NONE +! +! Programmer: Elena Pourmal +! March 12, 2003 +! +! Modifications: +! +!---------------------------------------------------------------------- + + + SUBROUTINE h5iget_name_f(obj_id, buf, buf_size, name_size, hdferr) +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5iget_name_f +!DEC$endif + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER(SIZE_T), INTENT(IN) :: buf_size ! Buffer size + CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer to hold object name + INTEGER(SIZE_T), INTENT(OUT) :: name_size ! Actual name size + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 if successful, + ! -1 if fail +! INTEGER, EXTERNAL :: h5iget_name_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5iget_name_c(obj_id, buf, buf_size, name_size) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5IGET_NAME_C'::h5iget_name_c + !DEC$ ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(OUT) :: buf + INTEGER(SIZE_T), INTENT(IN) :: buf_size + INTEGER(SIZE_T), INTENT(OUT) :: name_size + END FUNCTION h5iget_name_c + END INTERFACE + + hdferr = h5iget_name_c(obj_id, buf, buf_size, name_size) + END SUBROUTINE h5iget_name_f + END MODULE H5I |