summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2008-05-16 15:10:36 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2008-05-16 15:10:36 (GMT)
commit968552fbc80f4d88a6ea54b0b9a20892f461e167 (patch)
tree2e65d94f5026bdbf5fba48200f6ce3c5e1c0684d /fortran
parentc23c6b939229efde53e105008d29b8bf441f5d99 (diff)
downloadhdf5-968552fbc80f4d88a6ea54b0b9a20892f461e167.zip
hdf5-968552fbc80f4d88a6ea54b0b9a20892f461e167.tar.gz
hdf5-968552fbc80f4d88a6ea54b0b9a20892f461e167.tar.bz2
[svn-r15018] Maintenance: Brought changes from th etrunk to 1.8 branch.
Platforms tested: kagiso with g95, Intel and PGI compilers and with -i8 flag smirom with g95 and -i8 flag, duty with gfortran42
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/H5Af.c6
-rw-r--r--fortran/src/H5Aff.f9023
-rw-r--r--fortran/src/H5Dff.f9050
-rw-r--r--fortran/src/H5Lff.f9044
-rw-r--r--fortran/src/H5Pff.f9042
-rw-r--r--fortran/test/tH5A_1_8.f9020
-rw-r--r--fortran/test/tH5G_1_8.f9010
7 files changed, 98 insertions, 97 deletions
diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c
index 4eab9c9..271cc87 100644
--- a/fortran/src/H5Af.c
+++ b/fortran/src/H5Af.c
@@ -1285,21 +1285,17 @@ nh5aget_name_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
c_buf_size = (size_t)*size + 1;
c_buf = (char *)HDmalloc(c_buf_size);
if (c_buf == NULL) return ret_value;
-
/*
* Call H5Aget_name_by_idx function.
*/
c_size = H5Aget_name_by_idx((hid_t)*loc_id, c_obj_name, c_idx_type, c_order, (hsize_t)*n, c_buf, c_buf_size,(hid_t)*lapl_id);
-
-/* printf( "In C routine, The attr name is %s %i \n ", c_buf, c_buf_size ); */
-/* printf( "In C routine, The c_size is %i \n ", c_size ); */
if (c_size < 0) goto done;
/*
* Convert C name to FORTRAN and place it in the given buffer
*/
- HD5packFstring(c_buf, _fcdtocp(name), c_buf_size);
+ HD5packFstring(c_buf, _fcdtocp(name), c_buf_size-1);
*size = (size_t_f)c_size;
ret_value = 0;
diff --git a/fortran/src/H5Aff.f90 b/fortran/src/H5Aff.f90
index cad5231..9834914 100644
--- a/fortran/src/H5Aff.f90
+++ b/fortran/src/H5Aff.f90
@@ -2785,7 +2785,7 @@ CONTAINS
! H5_INDEX_UNKNOWN_F = -1 - Unknown index type
! H5_INDEX_NAME_F - Index on names
! H5_INDEX_CRT_ORDER_F - Index on creation order
-! H5_INDEX_N _F - Number of indices defined
+! H5_INDEX_N_F - Number of indices defined
!
! order - Order in which to iterate over index; Possible values are:
!
@@ -2797,16 +2797,15 @@ CONTAINS
!
! order - Index traversal order
! n - Attribute’s position in index
-! size - Size, in bytes, of attribute name
!
! Outputs:
! name - Attribute name
-! name_size_out - Size of Attribute name returned from function
! hdferr: - error code
! Success: 0
! Failure: -1
! Optional parameters:
! lapl_id - Link access property list
+! size - Size, in bytes, of attribute name
!
! Programmer: M.S. Breitenfeld
! January, 2008
@@ -2815,7 +2814,7 @@ CONTAINS
!----------------------------------------------------------------------
SUBROUTINE h5aget_name_by_idx_f(loc_id, obj_name, idx_type, order, &
- n, name, size, hdferr, lapl_id)
+ n, name, hdferr, size, lapl_id)
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$attributes dllexport :: h5aget_name_by_idx_f
@@ -2839,9 +2838,8 @@ CONTAINS
INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index
- CHARACTER(LEN=*), INTENT(OUT) :: name ! Attribute name
+ CHARACTER(LEN=*), INTENT(OUT) :: name ! Attribute name
- INTEGER(SIZE_T), INTENT(INOUT) :: size ! Buffer size ! *TEST* check for 0 value *CHECK* should this return the correct value
INTEGER, INTENT(OUT) :: hdferr ! Error code:
! Returns attribute name size,
@@ -2849,12 +2847,14 @@ CONTAINS
INTEGER(SIZE_T) :: obj_namelen
INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list
INTEGER(HID_T) :: lapl_id_default
+ INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, of the attribute
+ INTEGER(SIZE_T) :: size_default
!
! MS FORTRAN needs explicit interface for C functions called here.
!
INTERFACE
INTEGER FUNCTION h5aget_name_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, &
- n, name, size, lapl_id_default)
+ n, name, size_default, lapl_id_default)
USE H5GLOBAL
!DEC$ IF DEFINED(HDF5F90_WINDOWS)
!DEC$ ATTRIBUTES C,reference,decorate,alias:'H5AGET_NAME_BY_IDX_C'::h5aget_name_by_idx_c
@@ -2867,7 +2867,7 @@ CONTAINS
INTEGER(HSIZE_T), INTENT(IN) :: n
CHARACTER(LEN=*), INTENT(OUT) :: name
- INTEGER(SIZE_T), INTENT(INOUT) :: size
+ INTEGER(SIZE_T) :: size_default
INTEGER(HID_T) :: lapl_id_default
INTEGER(SIZE_T) :: obj_namelen
END FUNCTION h5aget_name_by_idx_c
@@ -2877,8 +2877,13 @@ CONTAINS
lapl_id_default = H5P_DEFAULT_F
IF(PRESENT(lapl_id)) lapl_id_default = lapl_id
+ size_default = LEN(name)
+
hdferr = h5aget_name_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, &
- n, name, size, lapl_id_default)
+ n, name, size_default, lapl_id_default)
+
+ IF(PRESENT(size)) size = size_default
+
END SUBROUTINE h5aget_name_by_idx_f
diff --git a/fortran/src/H5Dff.f90 b/fortran/src/H5Dff.f90
index 4dfad01..757e1e2 100644
--- a/fortran/src/H5Dff.f90
+++ b/fortran/src/H5Dff.f90
@@ -4771,34 +4771,34 @@ CONTAINS
!----------------------------------------------------------------------
- SUBROUTINE H5Dset_extent_f(dataset_id, size, hdferr)
+ SUBROUTINE h5dset_extent_f(dataset_id, size, hdferr)
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
-!DEC$attributes dllexport :: H5Dset_extent_f
+!DEC$attributes dllexport :: h5dset_extent_f
!DEC$endif
- IMPLICIT NONE
- INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier
- INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size
- ! Array containing
- ! dimensions' sizes
- INTEGER, INTENT(OUT) :: hdferr ! Error code
-
-! INTEGER, EXTERNAL :: H5Dset_extent_c
-! MS FORTRAN needs explicit interface for C functions called here.
-!
- INTERFACE
- INTEGER FUNCTION H5Dset_extent_c(dataset_id, size)
- USE H5GLOBAL
- !DEC$ IF DEFINED(HDF5F90_WINDOWS)
- !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5DSET_EXTENT_C'::H5Dset_extent_c
- !DEC$ ENDIF
- INTEGER(HID_T), INTENT(IN) :: dataset_id
- INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size
- END FUNCTION H5Dset_extent_c
- END INTERFACE
-
- hdferr = H5Dset_extent_c(dataset_id, size)
- END SUBROUTINE H5Dset_extent_f
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier
+ INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size
+ ! Array containing
+ ! dimensions' sizes
+ INTEGER, INTENT(OUT) :: hdferr ! Error code
+
+ !
+ ! MS FORTRAN needs explicit interface for C functions called here.
+ !
+ INTERFACE
+ INTEGER FUNCTION h5dset_extent_c(dataset_id, size)
+ USE H5GLOBAL
+ !DEC$ IF DEFINED(HDF5F90_WINDOWS)
+ !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5DSET_EXTENT_C'::h5dset_extent_c
+ !DEC$ ENDIF
+ INTEGER(HID_T), INTENT(IN) :: dataset_id
+ INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size
+ END FUNCTION h5dset_extent_c
+ END INTERFACE
+
+ hdferr = H5Dset_extent_c(dataset_id, size)
+ END SUBROUTINE h5dset_extent_f
!----------------------------------------------------------------------
diff --git a/fortran/src/H5Lff.f90 b/fortran/src/H5Lff.f90
index 98d7729..10c8e35 100644
--- a/fortran/src/H5Lff.f90
+++ b/fortran/src/H5Lff.f90
@@ -795,7 +795,7 @@ CONTAINS
END SUBROUTINE h5lget_info_by_idx_f
!----------------------------------------------------------------------
-! Name: H5Lis_registered_f
+! Name: h5lis_registered_f
!
! Purpose: Determines whether a class of user-defined links is registered.
!
@@ -817,10 +817,10 @@ CONTAINS
! Modifications: N/A
!
!----------------------------------------------------------------------
- SUBROUTINE H5Lis_registered_f(link_cls_id, registered, hdferr)
+ SUBROUTINE h5lis_registered_f(link_cls_id, registered, hdferr)
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
-!DEC$attributes dllexport :: H5Lis_registered_f
+!DEC$attributes dllexport :: h5lis_registered_f
!DEC$endif
IMPLICIT NONE
INTEGER, INTENT(IN) :: link_cls_id ! User-defined link class identifier
@@ -832,16 +832,16 @@ CONTAINS
! MS FORTRAN needs explicit interface for C functions called here.
!
INTERFACE
- INTEGER FUNCTION H5Lis_registered_c(link_cls_id)
+ INTEGER FUNCTION h5lis_registered_c(link_cls_id)
USE H5GLOBAL
!DEC$ IF DEFINED(HDF5F90_WINDOWS)
!DEC$ ATTRIBUTES C,reference,decorate,alias:'H5LIS_REGISTERED_C'::h5lis_registered_c
!DEC$ ENDIF
INTEGER, INTENT(IN) :: link_cls_id ! User-defined link class identifier
- END FUNCTION H5Lis_registered_c
+ END FUNCTION h5lis_registered_c
END INTERFACE
- hdferr = H5Lis_registered_c(link_cls_id)
+ hdferr = h5lis_registered_c(link_cls_id)
IF(hdferr.GT.0)THEN
registered = .TRUE.
@@ -849,10 +849,10 @@ CONTAINS
registered = .FALSE.
ENDIF
- END SUBROUTINE H5Lis_registered_f
+ END SUBROUTINE h5lis_registered_f
!----------------------------------------------------------------------
-! Name: H5Lmove_f
+! Name: h5lmove_f
!
! Purpose: Renames a link within an HDF5 file.
!
@@ -879,7 +879,7 @@ CONTAINS
SUBROUTINE h5lmove_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, lcpl_id, lapl_id)
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
-!DEC$attributes dllexport :: H5Lmove_f
+!DEC$attributes dllexport :: h5lmove_f
!DEC$endif
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: src_loc_id ! Original file or group identifier.
@@ -903,7 +903,7 @@ CONTAINS
! MS FORTRAN needs explicit interface for C functions called here.
!
INTERFACE
- INTEGER FUNCTION H5Lmove_c(src_loc_id, src_name, src_namelen, dest_loc_id, &
+ INTEGER FUNCTION h5lmove_c(src_loc_id, src_name, src_namelen, dest_loc_id, &
dest_name, dest_namelen, lcpl_id_default, lapl_id_default)
USE H5GLOBAL
!DEC$ IF DEFINED(HDF5F90_WINDOWS)
@@ -920,7 +920,7 @@ CONTAINS
INTEGER(HID_T) :: lcpl_id_default
INTEGER(HID_T) :: lapl_id_default
- END FUNCTION H5Lmove_c
+ END FUNCTION h5lmove_c
END INTERFACE
lcpl_id_default = H5P_DEFAULT_F
@@ -934,7 +934,7 @@ CONTAINS
hdferr = H5Lmove_c(src_loc_id, src_name, src_namelen, dest_loc_id, &
dest_name, dest_namelen, lcpl_id_default, lapl_id_default)
- END SUBROUTINE H5Lmove_f
+ END SUBROUTINE h5lmove_f
!----------------------------------------------------------------------
! Name: h5lget_name_by_idx_f
@@ -950,13 +950,13 @@ CONTAINS
!
! Outputs:
! name - Buffer in which link value is returned
-! size - Maximum number of characters of link value to be returned.
! hdferr - error code
! Success: 0
! Failure: -1
!
! Optional parameters:
! lapl_id - List access property list identifier.
+! size - Maximum number of characters of link value to be returned.
!
! Programmer: M. S. Breitenfeld
! March 10, 2008
@@ -965,7 +965,7 @@ CONTAINS
!
!----------------------------------------------------------------------
SUBROUTINE h5lget_name_by_idx_f(loc_id, group_name, index_field, order, n, &
- size, name, hdferr, lapl_id)
+ name, hdferr, size, lapl_id)
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$attributes dllexport :: h5lget_name_by_idx_f
@@ -984,8 +984,6 @@ CONTAINS
! H5_ITER_DEC_F - Decreasing order
! H5_ITER_NATIVE_F - No particular order, whatever is fastest
INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index
- INTEGER(SIZE_T), INTENT(INOUT) :: size ! Indicates the size, in the number of characters, of the attribute
- ! returns correct size
CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer in which link value is returned
INTEGER, INTENT(OUT) :: hdferr ! Error code:
! 0 on success and -1 on failure
@@ -993,12 +991,15 @@ CONTAINS
INTEGER(SIZE_T) :: group_namelen
INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list
INTEGER(HID_T) :: lapl_id_default
+ INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, of the link
+ INTEGER(SIZE_T) :: size_default
+
! MS FORTRAN needs explicit interface for C functions called here.
!
INTERFACE
INTEGER FUNCTION h5lget_name_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, &
- size, name, lapl_id_default)
+ size_default, name, lapl_id_default)
USE H5GLOBAL
!DEC$ IF DEFINED(HDF5F90_WINDOWS)
!DEC$ ATTRIBUTES C,reference,decorate,alias:'H5LGET_NAME_BY_IDX_C'::h5lget_name_by_idx_c
@@ -1009,7 +1010,7 @@ CONTAINS
INTEGER, INTENT(IN) :: index_field
INTEGER, INTENT(IN) :: order
INTEGER(HSIZE_T), INTENT(IN) :: n
- INTEGER(SIZE_T), INTENT(INOUT) :: size
+ INTEGER(SIZE_T) :: size_default
CHARACTER(LEN=*), INTENT(OUT) :: name
INTEGER(HID_T) :: lapl_id_default
END FUNCTION h5lget_name_by_idx_c
@@ -1020,8 +1021,13 @@ CONTAINS
lapl_id_default = H5P_DEFAULT_F
IF(PRESENT(lapl_id)) lapl_id_default = lapl_id
+ size_default = LEN(name)
+
hdferr = h5lget_name_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, &
- size, name, lapl_id_default)
+ size_default, name, lapl_id_default)
+
+ IF(PRESENT(size)) size = size_default
+
END SUBROUTINE h5lget_name_by_idx_f
diff --git a/fortran/src/H5Pff.f90 b/fortran/src/H5Pff.f90
index d24f79d..98fdc81 100644
--- a/fortran/src/H5Pff.f90
+++ b/fortran/src/H5Pff.f90
@@ -7605,7 +7605,7 @@
END SUBROUTINE h5pset_local_heap_size_hint_f
!----------------------------------------------------------------------
-! Name: H5Pset_est_link_info_f
+! Name: h5pset_est_link_info_f
!
! Purpose: Sets estimated number of links and length of link names in a group.
!
@@ -7628,7 +7628,7 @@
! Comment:
!----------------------------------------------------------------------
- SUBROUTINE H5Pset_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr)
+ SUBROUTINE h5pset_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr)
!
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
@@ -7644,7 +7644,7 @@
! MS FORTRAN needs explicit interface for C functions called here.
!
INTERFACE
- INTEGER FUNCTION H5Pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len)
+ INTEGER FUNCTION h5pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len)
USE H5GLOBAL
!DEC$ IF DEFINED(HDF5F90_WINDOWS)
!DEC$ ATTRIBUTES C,reference,decorate,alias:'H5PSET_EST_LINK_INFO_C'::h5pset_est_link_info_c
@@ -7652,15 +7652,15 @@
INTEGER(HID_T), INTENT(IN) :: gcpl_id
INTEGER, INTENT(IN) :: est_num_entries
INTEGER, INTENT(IN) :: est_name_len
- END FUNCTION H5Pset_est_link_info_c
+ END FUNCTION h5pset_est_link_info_c
END INTERFACE
hdferr = H5Pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len)
- END SUBROUTINE H5Pset_est_link_info_f
+ END SUBROUTINE h5pset_est_link_info_f
!----------------------------------------------------------------------
-! Name: H5Pset_link_phase_change_f
+! Name: h5pset_link_phase_change_f
!
! Purpose: Sets the parameters for conversion between compact and dense groups.
!
@@ -7715,7 +7715,7 @@
END SUBROUTINE h5pset_link_phase_change_f
!----------------------------------------------------------------------
-! Name: H5Pset_fapl_direct_f
+! Name: h5pset_fapl_direct_f
!
! Purpose: Sets up use of the direct I/O driver.
!
@@ -7739,7 +7739,7 @@
! Comment:
!----------------------------------------------------------------------
- SUBROUTINE H5Pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr)
+ SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr)
!
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
@@ -7756,7 +7756,7 @@
! MS FORTRAN needs explicit interface for C functions called here.
!
INTERFACE
- INTEGER FUNCTION H5Pset_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size)
+ INTEGER FUNCTION h5pset_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size)
USE H5GLOBAL
!DEC$ IF DEFINED(HDF5F90_WINDOWS)
!DEC$ ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_DIRECT_C'::h5pset_fapl_direct_c
@@ -7765,14 +7765,14 @@
INTEGER(SIZE_T), INTENT(IN) :: alignment
INTEGER(SIZE_T), INTENT(IN) :: block_size
INTEGER(SIZE_T), INTENT(IN) :: cbuf_size
- END FUNCTION H5Pset_fapl_direct_c
+ END FUNCTION h5pset_fapl_direct_c
END INTERFACE
hdferr = H5Pset_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size)
- END SUBROUTINE H5Pset_fapl_direct_f
+ END SUBROUTINE h5pset_fapl_direct_f
!----------------------------------------------------------------------
-! Name: H5Pget_fapl_direct_f
+! Name: h5pget_fapl_direct_f
!
! Purpose: Gets up use of the direct I/O driver.
!
@@ -7796,7 +7796,7 @@
! Comment:
!----------------------------------------------------------------------
- SUBROUTINE H5Pget_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr)
+ SUBROUTINE h5pget_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr)
!
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
@@ -7813,7 +7813,7 @@
! MS FORTRAN needs explicit interface for C functions called here.
!
INTERFACE
- INTEGER FUNCTION H5Pget_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size)
+ INTEGER FUNCTION h5pget_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size)
USE H5GLOBAL
!DEC$ IF DEFINED(HDF5F90_WINDOWS)
!DEC$ ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_DIRECT_C'::h5pget_fapl_direct_c
@@ -7822,11 +7822,11 @@
INTEGER(SIZE_T), INTENT(OUT) :: alignment
INTEGER(SIZE_T), INTENT(OUT) :: block_size
INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size
- END FUNCTION H5Pget_fapl_direct_c
+ END FUNCTION h5pget_fapl_direct_c
END INTERFACE
hdferr = H5Pget_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size)
- END SUBROUTINE H5Pget_fapl_direct_f
+ END SUBROUTINE h5pget_fapl_direct_f
!----------------------------------------------------------------------
! Name: H5Pset_attr_phase_change_f
@@ -7939,7 +7939,7 @@
END SUBROUTINE h5pset_nbit_f
!----------------------------------------------------------------------
-! Name: H5Pset_scaleoffset_f
+! Name: h5pset_scaleoffset_f
!
! Purpose: Sets up the use of the Scale-Offset filter.
!
@@ -7962,7 +7962,7 @@
! Comment:
!----------------------------------------------------------------------
- SUBROUTINE H5Pset_scaleoffset_f(plist_id, scale_type, scale_factor, hdferr)
+ SUBROUTINE h5pset_scaleoffset_f(plist_id, scale_type, scale_factor, hdferr)
!
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
@@ -7978,7 +7978,7 @@
! MS FORTRAN needs explicit interface for C functions called here.
!
INTERFACE
- INTEGER FUNCTION H5Pset_scaleoffset_c(plist_id, scale_type, scale_factor)
+ INTEGER FUNCTION h5pset_scaleoffset_c(plist_id, scale_type, scale_factor)
USE H5GLOBAL
!DEC$ IF DEFINED(HDF5F90_WINDOWS)
!DEC$ ATTRIBUTES C,reference,decorate,alias:'H5PSET_SCALEOFFSET_C'::h5pset_scaleoffset_c
@@ -7986,12 +7986,12 @@
INTEGER(HID_T), INTENT(IN) :: plist_id
INTEGER, INTENT(IN) :: scale_type
INTEGER, INTENT(IN) :: scale_factor
- END FUNCTION H5Pset_scaleoffset_c
+ END FUNCTION h5pset_scaleoffset_c
END INTERFACE
hdferr = H5Pset_scaleoffset_c(plist_id, scale_type, scale_factor)
- END SUBROUTINE H5Pset_scaleoffset_f
+ END SUBROUTINE h5pset_scaleoffset_f
!----------------------------------------------------------------------
! Name: h5pset_nlinks_f
diff --git a/fortran/test/tH5A_1_8.f90 b/fortran/test/tH5A_1_8.f90
index 040d4ed..be78d9e 100644
--- a/fortran/test/tH5A_1_8.f90
+++ b/fortran/test/tH5A_1_8.f90
@@ -1014,10 +1014,8 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error)
f_corder_valid, corder, cset, data_size, error, lapl_id=H5P_DEFAULT_F)
CALL VERIFY("h5aget_info_by_idx_f",error,minusone,total_error)
- size = 0
CALL h5aget_name_by_idx_f(my_dataset, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, &
-!EP 0_HSIZE_T, tmpname, size, error, lapl_id=H5P_DEFAULT_F)
- hzero, tmpname, size, error, lapl_id=H5P_DEFAULT_F)
+ hzero, tmpname, error, size, lapl_id=H5P_DEFAULT_F)
CALL VERIFY("h5aget_name_by_idx_f",error,minusone,total_error)
@@ -1204,17 +1202,18 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error )
! /* Verify the name for new link, in increasing creation order */
-!!$ CALL HDmemset(tmpname, 0, (size_t))
+ ! Try with the correct buffer size
CALL h5aget_name_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, &
- n, tmpname, NAME_BUF_SIZE, error)
+ n, tmpname, error, NAME_BUF_SIZE)
CALL check("h5aget_name_by_idx_f",error,total_error)
+ CALL VERIFY("h5aget_name_by_idx_f", INT(NAME_BUF_SIZE), 7, error)
- IF(TRIM(attrname).NE.TRIM(tmpname))THEN
+ IF(attrname.NE.tmpname)THEN
error = -1
ENDIF
CALL VERIFY("h5aget_name_by_idx_f",error,0,total_error)
-
+
! /* Don't test "native" order if there is no creation order index, since
! * there's not a good way to easily predict the attribute's order in the name
! * index.
@@ -1238,7 +1237,7 @@ SUBROUTINE attr_info_by_idx_check(obj_id, attrname, n, use_index, total_error )
! /* Verify the name for new link, in increasing native order */
! CALL HDmemset(tmpname, 0, (size_t))
CALL h5aget_name_by_idx_f(obj_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_NATIVE_F, &
- n, tmpname, NAME_BUF_SIZE, error)
+ n, tmpname, error) ! check with no optional parameters
CALL check("h5aget_name_by_idx_f",error,total_error)
IF(TRIM(attrname).NE.TRIM(tmpname))THEN
WRITE(*,*) "ERROR: attribute name size wrong!"
@@ -2105,7 +2104,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error)
size = 7 ! *CHECK* IF NOT THE SAME SIZE
CALL h5aget_name_by_idx_f(my_dataset, ".", idx_type, order,INT(0,hsize_t), &
- tmpname, size, error, lapl_id=H5P_DEFAULT_F)
+ tmpname, error, lapl_id=H5P_DEFAULT_F, size=size)
CALL check('h5aget_name_by_idx_f',error,total_error)
IF(order .EQ. H5_ITER_INC_F)THEN
WRITE(chr2,'(I2.2)') u + 1
@@ -2245,7 +2244,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error)
size = 7 ! *CHECK* if not the correct size
CALL h5aget_name_by_idx_f(my_dataset, ".", idx_type, order,INT(0,hsize_t), &
- tmpname, size, error)
+ tmpname, error, size)
IF(order .EQ. H5_ITER_INC_F)THEN
WRITE(chr2,'(I2.2)') u + 1
@@ -2978,7 +2977,6 @@ SUBROUTINE test_attr_dense_open( fcpl, fapl, total_error)
! /* Add attributes, until just before converting to dense storage */
- write(*,*) max_compact
DO u = 0, max_compact - 1
! /* Create attribute */
WRITE(chr2,'(I2.2)') u
diff --git a/fortran/test/tH5G_1_8.f90 b/fortran/test/tH5G_1_8.f90
index 092d90d..cc1ab67 100644
--- a/fortran/test/tH5G_1_8.f90
+++ b/fortran/test/tH5G_1_8.f90
@@ -2036,23 +2036,19 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
! The actual size of tmpname should be 7
- size_tmp = INT(3,SIZE_T)
- CALL H5Lget_name_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), size_tmp, tmpname_small, error)
+ CALL H5Lget_name_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), tmpname_small, error, size_tmp)
CALL check("link_info_by_idx_check.H5Lget_name_by_idx_f", error, total_error)
CALL verifyString("link_info_by_idx_check.H5Lget_name_by_idx_f", &
linkname(1:LEN(tmpname_small)), tmpname_small(1:LEN(tmpname_small)), total_error)
CALL VERIFY("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error)
-
! try it with the correct size
- size_tmp = INT(LEN(tmpname),SIZE_T)
- CALL H5Lget_name_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), size_tmp, tmpname, error)
+ CALL H5Lget_name_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), tmpname, error, size=size_tmp)
CALL check("link_info_by_idx_check.H5Lget_name_by_idx_f", error, total_error)
CALL verifyString("link_info_by_idx_check.H5Lget_name_by_idx_f", &
linkname(1:LEN(tmpname)), tmpname(1:LEN(tmpname)), total_error)
CALL VERIFY("link_info_by_idx_check.H5Lget_name_by_idx_f", INT(size_tmp), 7, total_error)
- size_tmp = INT(LEN(tmpname_big),SIZE_T)
- CALL H5Lget_name_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), size_tmp, tmpname_big, error)
+ CALL H5Lget_name_by_idx_f(group_id, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, INT(n,HSIZE_T), tmpname_big, error, size_tmp)
CALL check("link_info_by_idx_check.H5Lget_name_by_idx_f", error, total_error)
CALL verifyString("link_info_by_idx_check.H5Lget_name_by_idx_f", &
linkname(1:7), tmpname_big(1:7), total_error)