diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-06-18 20:52:54 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-06-18 20:52:54 (GMT) |
commit | 1aeaa7fbb1072d18a533b7bbf8f996f6b194de73 (patch) | |
tree | 989cbf236bb9ed1bde75baa631a803eb75f7ee4e /fortran | |
parent | b6fca58d925dd2e8287b746b3deb81f71fc6e75f (diff) | |
download | hdf5-1aeaa7fbb1072d18a533b7bbf8f996f6b194de73.zip hdf5-1aeaa7fbb1072d18a533b7bbf8f996f6b194de73.tar.gz hdf5-1aeaa7fbb1072d18a533b7bbf8f996f6b194de73.tar.bz2 |
[svn-r7059] Purpose:
Refactoring
Description:
Track changes to H5Fget_obj_<foo> API functions.
Platforms tested:
FreeBSD 4.8 (sleipnir)
h5committest
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/src/H5Ff.c | 10 | ||||
-rw-r--r-- | fortran/src/H5Fff.f90 | 8 | ||||
-rw-r--r-- | fortran/src/H5f90proto.h | 2 | ||||
-rw-r--r-- | fortran/test/tH5F.f90 | 2 |
4 files changed, 13 insertions, 9 deletions
diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c index 2d8e5ef..5d3af5c 100644 --- a/fortran/src/H5Ff.c +++ b/fortran/src/H5Ff.c @@ -417,12 +417,12 @@ nh5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, int_f * obj_count) int ret_value = 0; hid_t c_file_id; unsigned c_obj_type; - unsigned c_obj_count; + int c_obj_count; c_file_id = (hid_t)*file_id; c_obj_type = (unsigned) *obj_type; - if ( H5Fget_obj_count(c_file_id, c_obj_type, &c_obj_count) < 0 ) ret_value = -1; + if ( (c_obj_count=H5Fget_obj_count(c_file_id, c_obj_type)) < 0 ) ret_value = -1; *obj_count = (int_f)c_obj_count; return ret_value; } @@ -439,14 +439,16 @@ nh5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, int_f * obj_count) *---------------------------------------------------------------------------*/ int_f -nh5fget_obj_ids_c ( hid_t_f *file_id , int_f *obj_type, hid_t_f *obj_ids) +nh5fget_obj_ids_c ( hid_t_f *file_id , int_f *obj_type, int_f *max_objs, hid_t_f *obj_ids) { int ret_value = 0; hid_t c_file_id; unsigned c_obj_type; + int c_max_objs; c_file_id = (hid_t)*file_id; c_obj_type = (unsigned) *obj_type; - if ( H5Fget_obj_ids(c_file_id, c_obj_type, (hid_t *)obj_ids) < 0 ) ret_value = -1; + c_max_objs = (int)*max_objs; + if ( H5Fget_obj_ids(c_file_id, c_obj_type, c_max_objs, (hid_t *)obj_ids) < 0 ) ret_value = -1; return ret_value; } diff --git a/fortran/src/H5Fff.f90 b/fortran/src/H5Fff.f90 index af40d88..725c824 100644 --- a/fortran/src/H5Fff.f90 +++ b/fortran/src/H5Fff.f90 @@ -771,7 +771,7 @@ ! Comment: !---------------------------------------------------------------------- - SUBROUTINE h5fget_obj_ids_f(file_id, obj_type, obj_ids, hdferr) + SUBROUTINE h5fget_obj_ids_f(file_id, obj_type, max_objs, obj_ids, hdferr) ! !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_DLL) @@ -782,23 +782,25 @@ IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier INTEGER, INTENT(IN) :: obj_type ! Object type + INTEGER, INTENT(IN) :: max_objs ! Maximum # of objects to retrieve INTEGER(HID_T), DIMENSION(*), INTENT(INOUT) :: obj_ids ! Array of open objects iidentifiers INTEGER, INTENT(OUT) :: hdferr ! Error code INTERFACE - INTEGER FUNCTION h5fget_obj_ids_c(file_id, obj_type, obj_ids) + INTEGER FUNCTION h5fget_obj_ids_c(file_id, obj_type, max_objs, obj_ids) USE H5GLOBAL !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5FGET_OBJ_IDS_C':: h5fget_obj_ids_c !DEC$ ENDIF INTEGER(HID_T), INTENT(IN) :: file_id INTEGER, INTENT(IN) :: obj_type + INTEGER, INTENT(IN) :: max_objs INTEGER(HID_T), DIMENSION(*), INTENT(INOUT) :: obj_ids END FUNCTION h5fget_obj_ids_c END INTERFACE - hdferr = h5fget_obj_ids_c(file_id, obj_type, obj_ids) + hdferr = h5fget_obj_ids_c(file_id, obj_type, max_objs, obj_ids) END SUBROUTINE h5fget_obj_ids_f END MODULE H5F diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index eb36088..a684644 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -77,7 +77,7 @@ H5_DLL int_f nh5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id); H5_DLL int_f nh5fget_obj_count_c (hid_t_f *file_id, int_f *obj_type, int_f *obj_count); -H5_DLL int_f nh5fget_obj_ids_c (hid_t_f *file_id, int_f *obj_type, int_f *obj_ids); +H5_DLL int_f nh5fget_obj_ids_c (hid_t_f *file_id, int_f *obj_type, int_f *max_objs, int_f *obj_ids); H5_DLL int_f nh5fflush_c (hid_t_f *obj_id, int_f *scope); /* diff --git a/fortran/test/tH5F.f90 b/fortran/test/tH5F.f90 index 6aa796d..e8f933a 100644 --- a/fortran/test/tH5F.f90 +++ b/fortran/test/tH5F.f90 @@ -638,7 +638,7 @@ write(*,*) "Wrong number of open objects reported, error" endif allocate(obj_ids(obj_countf), stat = error) - CALL h5fget_obj_ids_f(fid, H5F_OBJ_FILE_F, obj_ids, error) + CALL h5fget_obj_ids_f(fid, H5F_OBJ_FILE_F, -1, obj_ids, error) CALL check("h5fget_obj_ids_f",error,total_error) if(error .eq. 0) then do i = 1, obj_countf |