diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-05-07 21:05:14 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-05-07 21:05:14 (GMT) |
commit | 984ecb72c2fa62d233383b24047e04061754ae34 (patch) | |
tree | a0a1ce905153a08466dae1354e14d426c86b3849 /fortran/src | |
parent | ed599421c5ef01347368d50b1b7dbed3b323c43f (diff) | |
parent | 8f82c9b8be875cd28e18402e920f8e162d8f8d38 (diff) | |
download | hdf5-984ecb72c2fa62d233383b24047e04061754ae34.zip hdf5-984ecb72c2fa62d233383b24047e04061754ae34.tar.gz hdf5-984ecb72c2fa62d233383b24047e04061754ae34.tar.bz2 |
[svn-r27038] Merge of r26393-27031 from the trunk.
Tested on 64-bit linux VM w/ C++ and Fortran 2003
Diffstat (limited to 'fortran/src')
-rw-r--r-- | fortran/src/CMakeLists.txt | 143 | ||||
-rw-r--r-- | fortran/src/H5Df.c | 8 | ||||
-rw-r--r-- | fortran/src/H5Ff.c | 9 | ||||
-rw-r--r-- | fortran/src/H5Gf.c | 2 | ||||
-rw-r--r-- | fortran/src/H5Lf.c | 15 | ||||
-rw-r--r-- | fortran/src/H5Of.c | 7 | ||||
-rw-r--r-- | fortran/src/H5Pf.c | 27 | ||||
-rw-r--r-- | fortran/src/H5Pff.f90 | 116 | ||||
-rw-r--r-- | fortran/src/H5Rf.c | 4 | ||||
-rw-r--r-- | fortran/src/H5Rff_F03.f90 | 30 | ||||
-rw-r--r-- | fortran/src/H5Rff_F90.f90 | 24 | ||||
-rw-r--r-- | fortran/src/H5Sf.c | 21 | ||||
-rw-r--r-- | fortran/src/H5Tf.c | 331 | ||||
-rw-r--r-- | fortran/src/H5Zf.c | 2 | ||||
-rw-r--r-- | fortran/src/H5_f.c | 5 | ||||
-rw-r--r-- | fortran/src/H5f90global.f90 | 3 | ||||
-rw-r--r-- | fortran/src/H5f90proto.h | 2 | ||||
-rw-r--r-- | fortran/src/README | 1 |
18 files changed, 322 insertions, 428 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 22a091e..c015072 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -54,7 +54,10 @@ if (WIN32 AND MSVC) LINK_FLAGS "/SUBSYSTEM:CONSOLE" ) endif (WIN32 AND MSVC) -set_target_properties (H5test_FortranHavekind PROPERTIES LINKER_LANGUAGE Fortran) +set_target_properties (H5test_FortranHavekind PROPERTIES + LINKER_LANGUAGE Fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} +) set (CMD $<TARGET_FILE:H5test_FortranHavekind>) add_custom_command ( @@ -142,7 +145,7 @@ set (f90CStub_C_HDRS ) add_library (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} ${f90CStub_C_SRCS} ${f90CStub_C_HDRS}) -TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} " " " ") +TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} " " " ") target_link_libraries (${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_NAME} ${LIB_TYPE}) @@ -247,8 +250,7 @@ if (WIN32) HDF5F90_WINDOWS ) endif (WIN32) -TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIB_TARGET} " " ${SHARED_LINK_FLAGS}) -set_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran) +TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIB_TARGET} ${LIB_TYPE} " " ${SHARED_LINK_FLAGS}) target_link_libraries (${HDF5_F90_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET}) if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) target_link_libraries (${HDF5_F90_LIB_TARGET} ${MPI_Fortran_LIBRARIES}) @@ -259,6 +261,7 @@ set_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES FOLDER libraries/fortran LINKER_LANGUAGE Fortran INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} ) #----------------------------------------------------------------------------- @@ -278,100 +281,50 @@ install ( ) if (WIN32) - install ( - FILES - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5fortran_types.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/hdf5.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5global.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5a.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5d.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5e.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5f.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5g.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5i.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5l.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5lib.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5o.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5p.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5r.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5s.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5t.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5z.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5a_provisional.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5d_provisional.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5e_provisional.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5f_provisional.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5l_provisional.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5lib_provisional.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5o_provisional.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5p_provisional.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5r_provisional.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5t_provisional.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5_dble_interface.mod - DESTINATION - ${HDF5_INSTALL_INCLUDE_DIR} - COMPONENT - fortheaders - ) - if (H5_TEST_KIND_NAME) - install ( - FILES - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/${H5_TEST_KIND_NAME}.mod - DESTINATION - ${HDF5_INSTALL_INCLUDE_DIR} - COMPONENT - fortheaders - ) - endif (H5_TEST_KIND_NAME) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}) else (WIN32) - install ( - FILES - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5fortran_types.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/hdf5.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5global.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5f.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5a.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5d.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5e.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5f.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5g.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5i.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5l.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5lib.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5o.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5p.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5r.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5s.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5t.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5z.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5a_provisional.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5d_provisional.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5e_provisional.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5f_provisional.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5l_provisional.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5lib_provisional.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5o_provisional.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5p_provisional.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5r_provisional.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5t_provisional.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5_dble_interface.mod - DESTINATION - ${HDF5_INSTALL_INCLUDE_DIR} - COMPONENT - fortheaders - ) - if (H5_TEST_KIND_NAME) - install ( - FILES - ${CMAKE_Fortran_MODULE_DIRECTORY}/${H5_TEST_KIND_NAME}.mod - DESTINATION - ${HDF5_INSTALL_INCLUDE_DIR} - COMPONENT - fortheaders - ) - endif (H5_TEST_KIND_NAME) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}) endif (WIN32) +set (mod_files + ${MOD_BUILD_DIR}/h5fortran_types.mod + ${MOD_BUILD_DIR}/hdf5.mod + ${MOD_BUILD_DIR}/h5global.mod + ${MOD_BUILD_DIR}/h5a.mod + ${MOD_BUILD_DIR}/h5d.mod + ${MOD_BUILD_DIR}/h5e.mod + ${MOD_BUILD_DIR}/h5f.mod + ${MOD_BUILD_DIR}/h5g.mod + ${MOD_BUILD_DIR}/h5i.mod + ${MOD_BUILD_DIR}/h5l.mod + ${MOD_BUILD_DIR}/h5lib.mod + ${MOD_BUILD_DIR}/h5o.mod + ${MOD_BUILD_DIR}/h5p.mod + ${MOD_BUILD_DIR}/h5r.mod + ${MOD_BUILD_DIR}/h5s.mod + ${MOD_BUILD_DIR}/h5t.mod + ${MOD_BUILD_DIR}/h5z.mod + ${MOD_BUILD_DIR}/h5a_provisional.mod + ${MOD_BUILD_DIR}/h5d_provisional.mod + ${MOD_BUILD_DIR}/h5e_provisional.mod + ${MOD_BUILD_DIR}/h5f_provisional.mod + ${MOD_BUILD_DIR}/h5l_provisional.mod + ${MOD_BUILD_DIR}/h5lib_provisional.mod + ${MOD_BUILD_DIR}/h5o_provisional.mod + ${MOD_BUILD_DIR}/h5p_provisional.mod + ${MOD_BUILD_DIR}/h5r_provisional.mod + ${MOD_BUILD_DIR}/h5t_provisional.mod + ${MOD_BUILD_DIR}/h5_dble_interface.mod +) +install ( + FILES + ${mod_files} + DESTINATION + ${HDF5_INSTALL_INCLUDE_DIR} + COMPONENT + fortheaders +) + #----------------------------------------------------------------------------- # Add Target(s) to CMake Install for import into other projects #----------------------------------------------------------------------------- diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c index a108384..f4082a9 100644 --- a/fortran/src/H5Df.c +++ b/fortran/src/H5Df.c @@ -632,7 +632,7 @@ nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_ * Allocate temporary buffer and copy references from Fortran. */ n = (unsigned int)*dims; - buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*(n)); + buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*n); if ( buf_c != NULL ) { for (i = 0; i < n; i++) HDmemcpy(&buf_c[i], &buf[i], sizeof(haddr_t)); @@ -699,7 +699,7 @@ nh5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_ /* * Allocate temporary buffer and copy references from Fortran. */ - buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t)*(n)); + buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t)*n); if ( buf_c != NULL ) { for (i = 0; i < n; i++) { HDmemcpy(&buf_c[i], buf, H5R_DSET_REG_REF_BUF_SIZE); @@ -1722,7 +1722,7 @@ nh5dread_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_s max_len = (size_t)dims[0]; num_elem = H5Sget_select_npoints(c_mem_space_id); - if(num_elem != dims[1]) return ret_value; + if(num_elem != (hssize_t)dims[1]) return ret_value; c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t)); if (c_buf == NULL) return ret_value; @@ -2037,7 +2037,7 @@ nh5dread_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spac max_len = (size_t)dims[0]; num_elem = H5Sget_select_npoints(c_mem_space_id); - if(num_elem != dims[1]) return ret_value; + if(num_elem != (hssize_t)dims[1]) return ret_value; c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t)); if (c_buf == NULL) return ret_value; diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c index 7455fca..1696672 100644 --- a/fortran/src/H5Ff.c +++ b/fortran/src/H5Ff.c @@ -632,7 +632,7 @@ nh5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen) /* * Call H5Fget_name function */ - if ((size_c = (size_t_f)H5Fget_name((hid_t)*obj_id, c_buf, (size_t)*buflen)) < 0) + if ((size_c = H5Fget_name((hid_t)*obj_id, c_buf, (size_t)*buflen)) < 0) HGOTO_DONE(FAIL); /* @@ -703,13 +703,16 @@ h5fget_file_image_c(hid_t_f *file_id, void *buf_ptr, size_t_f *buf_len, size_t_f /******/ { herr_t ret_value=0; /* Return value */ - + ssize_t c_buf_req; /* * Call h5fget_file_image function */ - if ((*buf_req = (size_t_f)H5Fget_file_image((hid_t)*file_id, buf_ptr, (size_t)*buf_len)) < 0) + + if ( (c_buf_req = H5Fget_file_image((hid_t)*file_id, buf_ptr, (size_t)*buf_len)) < 0) HGOTO_DONE(FAIL); + *buf_req = (size_t_f)c_buf_req; + done: return ret_value; } diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c index ad3ea49..7f755b3 100644 --- a/fortran/src/H5Gf.c +++ b/fortran/src/H5Gf.c @@ -67,7 +67,7 @@ nh5gcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, /* * Call H5Gcreate function. */ - if(*size_hint == OBJECT_NAMELEN_DEFAULT_F ){ + if(*size_hint == (size_t_f)OBJECT_NAMELEN_DEFAULT_F ){ c_grp_id = H5Gcreate2((hid_t)*loc_id, c_name,(hid_t)*lcpl_id,(hid_t)*gcpl_id,(hid_t)*gapl_id);} else { /* Create the group creation property list */ diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c index 7efa10a..6523ab4 100644 --- a/fortran/src/H5Lf.c +++ b/fortran/src/H5Lf.c @@ -677,9 +677,9 @@ done: /****if* H5Lf/h5lget_name_by_idx_c * NAME - * h5lget_name_by_idx_c + * h5lget_name_by_idx_c * PURPOSE - * Call H5Lget_name_by_idx + * Call H5Lget_name_by_idx * INPUTS * * loc_id - File or group identifier specifying location of subject group @@ -694,10 +694,10 @@ done: * name - Buffer in which link value is returned * size - The size of the link name on success * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 10, 2008 + * March 10, 2008 * SOURCE */ int_f @@ -706,9 +706,10 @@ nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, size_t_f *size, _fcd name, hid_t_f *lapl_id) /******/ { - char *c_group_name = NULL; /* Buffer to hold C string */ + char *c_group_name = NULL; /* Buffer to hold C string */ char *c_name = NULL; /* Buffer to hold C string */ size_t c_size; + ssize_t c_size_link; int_f ret_value = 0; /* Return value */ /* @@ -725,10 +726,12 @@ nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, if(NULL == (c_name = (char *)HDmalloc(c_size))) HGOTO_DONE(FAIL) - if((*size = (size_t_f)H5Lget_name_by_idx((hid_t)*loc_id, c_group_name, (H5_index_t)*index_field, + if((c_size_link = H5Lget_name_by_idx((hid_t)*loc_id, c_group_name, (H5_index_t)*index_field, (H5_iter_order_t)*order, (hsize_t)*n,c_name, c_size, (hid_t)*lapl_id)) < 0) HGOTO_DONE(FAIL) + *size = (size_t_f)c_size_link; + /* * Convert C name to FORTRAN and place it in the given buffer */ diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c index ad8b7ed..ae344a5 100644 --- a/fortran/src/H5Of.c +++ b/fortran/src/H5Of.c @@ -23,6 +23,8 @@ #include "H5f90.h" #include "H5Eprivate.h" +int_f +fill_h5o_info_t_f(H5O_info_t Oinfo, H5O_info_t_f *object_info); int_f fill_h5o_info_t_f(H5O_info_t Oinfo, H5O_info_t_f *object_info) { @@ -874,6 +876,7 @@ nh5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size, char *c_comment = NULL; /* Buffer to hold C string */ char *c_name = NULL; /* Buffer to hold C string */ int_f ret_value = 0; /* Return value */ + ssize_t c_bufsize; size_t c_commentsize; /* @@ -895,9 +898,11 @@ nh5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size, * Call H5Oget_comment_by_name function. */ - if((*bufsize = (size_t_f)H5Oget_comment_by_name((hid_t)*loc_id, c_name, c_comment, (size_t)*commentsize,(hid_t)*lapl_id )) < 0) + if((c_bufsize = H5Oget_comment_by_name((hid_t)*loc_id, c_name, c_comment, (size_t)*commentsize,(hid_t)*lapl_id )) < 0) HGOTO_DONE(FAIL); + *bufsize = (size_t_f)c_bufsize; + /* * Convert C name to FORTRAN and place it in the given buffer */ diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index fa4dc5b..e9082d6 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -160,41 +160,32 @@ done: /****if* H5Pf/h5pget_class_c * NAME - * h5pget_class_c + * h5pget_class_c * PURPOSE - * Call H5Pget_class to determine property list class + * Call H5Pget_class to determine property list class * INPUTS - * prp_id - identifier of the dataspace + * prp_id - identifier of the dataspace * OUTPUTS - * classtype - class type; possible values are: - * H5P_ROOT_F -1 - * H5P_FILE_CREATE_F 0 - * H5P_FILE_ACCESS_F 1 - * H5P_DATASET_CREATE_F 2 - * H5P_DATASET_XFER_F 3 - * H5P_FILE_MOUNT_F 4 + * classtype - class type * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Saturday, August 14, 1999 + * Saturday, August 14, 1999 * SOURCE */ int_f -nh5pget_class_c ( hid_t_f *prp_id , int_f *classtype) +nh5pget_class_c ( hid_t_f *prp_id , hid_t_f *classtype) /******/ { hid_t c_classtype; int_f ret_value = 0; - c_classtype = H5Pget_class((hid_t)*prp_id); - if(c_classtype == H5P_ROOT) { - *classtype = H5P_ROOT; + if( (c_classtype = H5Pget_class((hid_t)*prp_id)) < 0) HGOTO_DONE(FAIL) - } - *classtype = (int_f)c_classtype; + *classtype = (hid_t_f)c_classtype; done: return ret_value; diff --git a/fortran/src/H5Pff.f90 b/fortran/src/H5Pff.f90 index 0d85252..3409f15 100644 --- a/fortran/src/H5Pff.f90 +++ b/fortran/src/H5Pff.f90 @@ -237,18 +237,10 @@ CONTAINS ! Returns the property list class for a property list. ! ! INPUTS -! ! prp_id - property list identifier +! ! OUTPUTS -! ! classtype - property list class -! Possible values are: -! H5P_ROOT_F -! H5P_FILE_CREATE_F -! H5P_FILE_ACCESS_F -! H5P_DATASET_CREATE_F -! H5P_DATASET_XFER_F -! H5P_FILE_MOUNT_F ! hdferr: - error code ! Success: 0 ! Failure: -1 @@ -265,30 +257,21 @@ CONTAINS ! Fortran90 Interface: SUBROUTINE h5pget_class_f(prp_id, classtype, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: classtype ! The type of the property list - ! to be created. Possible values are: - ! H5P_ROOT_F - ! H5P_FILE_CREATE_F - ! H5P_FILE_ACCESS_F - ! H5P_DATASET_CREATE_F - ! H5P_DATASET_XFER_F - ! H5P_FILE_MOUNT_F + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(OUT) :: classtype ! The type of the property list + ! to be created. INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** -! INTEGER, EXTERNAL :: h5pget_class_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE INTEGER FUNCTION h5pget_class_c(prp_id, classtype) USE H5GLOBAL !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_C'::h5pget_class_c !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: classtype + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(OUT) :: classtype END FUNCTION h5pget_class_c END INTERFACE @@ -1449,7 +1432,7 @@ CONTAINS !****s* H5P/h5pget_fapl_core_f ! NAME -! h5pget_fapl_core_f +! h5pget_fapl_core_f ! ! PURPOSE ! Queries core file driver properties. @@ -1487,9 +1470,6 @@ CONTAINS !***** INTEGER :: backing_store_flag -! INTEGER, EXTERNAL :: h5pget_fapl_core_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE INTEGER FUNCTION h5pget_fapl_core_c(prp_id, increment, backing_store_flag) USE H5GLOBAL @@ -3644,7 +3624,7 @@ CONTAINS ! size - Actual length of the class name ! NOTE: If provided buffer "name" is smaller, ! than name will be truncated to fit into -! provided user buffer +! provided user buffer. ! hdferr: - error code ! Success: 0 ! Failure: -1 @@ -4222,50 +4202,46 @@ CONTAINS ! Fortran90 Interface: SUBROUTINE h5pset_fapl_multi_l(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_map ! Mapping array - INTEGER(HID_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_fapl ! Property list for each memory usage type - CHARACTER(LEN=*), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_name ! Names of member file - REAL, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_addr - LOGICAL, INTENT(IN) :: relax ! Flag - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, DIMENSION(*), INTENT(IN) :: memb_map + INTEGER(HID_T), DIMENSION(*), INTENT(IN) :: memb_fapl + CHARACTER(LEN=*), DIMENSION(*), INTENT(IN) :: memb_name + REAL, DIMENSION(*), INTENT(IN) :: memb_addr + LOGICAL, INTENT(IN) :: relax + INTEGER, INTENT(OUT) :: hdferr !***** - INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: lenm + INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm INTEGER :: maxlen - INTEGER :: flag + INTEGER :: flag = 0 INTEGER :: i -! INTEGER, EXTERNAL :: h5pset_fapl_multi_c -! MS FORTRAN needs explicit interface for C functions called here. -! INTERFACE INTEGER FUNCTION h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, & maxlen, memb_addr, flag) USE H5GLOBAL + IMPLICIT NONE !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_MULTI_C'::h5pset_fapl_multi_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: memb_name INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_map - INTEGER(HID_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_fapl - CHARACTER(LEN=*), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_name - REAL, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_addr - !INTEGER(HADDR_T), DIMENSION(H5FD_MEM_NTYPES_F), INTENT(IN) :: memb_addr - INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: lenm + INTEGER, DIMENSION(*), INTENT(IN) :: memb_map + INTEGER(HID_T), DIMENSION(*), INTENT(IN) :: memb_fapl + CHARACTER(LEN=*), DIMENSION(*), INTENT(IN) :: memb_name + REAL, DIMENSION(*), INTENT(IN) :: memb_addr + INTEGER, DIMENSION(*) :: lenm INTEGER :: maxlen INTEGER, INTENT(IN) :: flag END FUNCTION h5pset_fapl_multi_c END INTERFACE + maxlen = LEN(memb_name(1)) - DO i=0, H5FD_MEM_NTYPES_F-1 + DO i=1, H5FD_MEM_NTYPES_F lenm(i) = LEN_TRIM(memb_name(i)) ENDDO - flag = 0 - IF (relax) flag = 1 - hdferr = h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag) - + IF(relax) flag = 1 + hdferr = h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag) + END SUBROUTINE h5pset_fapl_multi_l !****s* H5P/h5pset_fapl_multi_s ! NAME @@ -4303,6 +4279,7 @@ CONTAINS INTERFACE INTEGER FUNCTION h5pset_fapl_multi_sc(prp_id,flag) USE H5GLOBAL + IMPLICIT NONE !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_MULTI_SC'::h5pset_fapl_multi_sc !DEC$ENDIF @@ -4346,51 +4323,50 @@ CONTAINS SUBROUTINE h5pget_fapl_multi_f(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr, maxlen_out) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_map - INTEGER(HID_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_fapl - CHARACTER(LEN=*), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_name - !INTEGER(HADDR_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_addr - REAL, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_addr + INTEGER, DIMENSION(*), INTENT(OUT) :: memb_map + INTEGER(HID_T), DIMENSION(*), INTENT(OUT) :: memb_fapl + CHARACTER(LEN=*), DIMENSION(*), INTENT(OUT) :: memb_name + REAL, DIMENSION(*), INTENT(OUT) :: memb_addr INTEGER, OPTIONAL, INTENT(OUT) :: maxlen_out LOGICAL, INTENT(OUT) :: relax INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure !***** - INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: lenm + INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm INTEGER :: maxlen INTEGER :: c_maxlen_out INTEGER :: flag INTEGER :: i - -! INTEGER, EXTERNAL :: h5pget_fapl_multi_c -! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE INTEGER FUNCTION h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, & maxlen, memb_addr, flag, c_maxlen_out) USE H5GLOBAL + IMPLICIT NONE !DEC$IF DEFINED(HDF5F90_WINDOWS) !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_MULTI_C'::h5pget_fapl_multi_c !DEC$ENDIF !DEC$ATTRIBUTES reference :: memb_name INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, DIMENSION(H5FD_MEM_NTYPES_F), INTENT(OUT) :: memb_map - INTEGER(HID_T), DIMENSION(H5FD_MEM_NTYPES_F), INTENT(OUT) :: memb_fapl - CHARACTER(LEN=*), DIMENSION(H5FD_MEM_NTYPES_F), INTENT(OUT) :: memb_name - REAL, DIMENSION(H5FD_MEM_NTYPES_F), INTENT(OUT) :: memb_addr - INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: lenm + INTEGER, DIMENSION(*), INTENT(OUT) :: memb_map + INTEGER(HID_T), DIMENSION(*), INTENT(OUT) :: memb_fapl + CHARACTER(LEN=*), DIMENSION(*), INTENT(OUT) :: memb_name + REAL, DIMENSION(*), INTENT(OUT) :: memb_addr + INTEGER, DIMENSION(*) :: lenm INTEGER :: maxlen INTEGER :: c_maxlen_out INTEGER, INTENT(OUT) :: flag END FUNCTION h5pget_fapl_multi_c END INTERFACE - maxlen = LEN(memb_name(0)) - DO i=0, H5FD_MEM_NTYPES_F-1 + + maxlen = LEN(memb_name(1)) + DO i=1, H5FD_MEM_NTYPES_F lenm(i) = LEN_TRIM(memb_name(i)) ENDDO - hdferr = h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag, c_maxlen_out) + hdferr = h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag, c_maxlen_out) + relax = .TRUE. - IF(flag .EQ. 0) relax = .FALSE. + IF(flag .EQ. 0) relax = .FALSE. IF(PRESENT(maxlen_out)) maxlen_out = c_maxlen_out END SUBROUTINE h5pget_fapl_multi_f !****s* H5P/h5pset_szip_f diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c index 19fa6b1..068f24e 100644 --- a/fortran/src/H5Rf.c +++ b/fortran/src/H5Rf.c @@ -148,13 +148,11 @@ h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *r { int ret_value = -1; char *c_name; - size_t c_namelen; /* * Convert FORTRAN name to C name */ - c_namelen = (size_t)*namelen; - c_name = (char *)HD5f2cstring(name, c_namelen); + c_name = (char *)HD5f2cstring(name, (size_t)*namelen); if (c_name == NULL) return ret_value; /* diff --git a/fortran/src/H5Rff_F03.f90 b/fortran/src/H5Rff_F03.f90 index fc4b2f3..8f40607 100644 --- a/fortran/src/H5Rff_F03.f90 +++ b/fortran/src/H5Rff_F03.f90 @@ -14,18 +14,18 @@ ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! 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 * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! Copyright by The HDF Group. * +! 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 * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES @@ -551,7 +551,7 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: loc_id TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size - CHARACTER(LEN=*), INTENT(OUT) :: name + CHARACTER(LEN=*), INTENT(INOUT) :: name INTEGER, INTENT(OUT) :: hdferr !***** @@ -598,7 +598,7 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: loc_id TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size - CHARACTER(LEN=*), INTENT(OUT) :: name + CHARACTER(LEN=*), INTENT(INOUT) :: name INTEGER, INTENT(OUT) :: hdferr !***** INTEGER(SIZE_T) :: size_default @@ -647,7 +647,7 @@ CONTAINS INTEGER(HID_T), INTENT(IN) :: loc_id INTEGER, INTENT(IN) :: ref_type TYPE(C_PTR), INTENT(IN) :: ref - CHARACTER(LEN=*), INTENT(OUT) :: name + CHARACTER(LEN=*), INTENT(INOUT) :: name INTEGER, INTENT(OUT) :: hdferr INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size !***** diff --git a/fortran/src/H5Rff_F90.f90 b/fortran/src/H5Rff_F90.f90 index 3871d99..ac45857 100644 --- a/fortran/src/H5Rff_F90.f90 +++ b/fortran/src/H5Rff_F90.f90 @@ -14,18 +14,18 @@ ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! 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 * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * +! Copyright by The HDF Group. * +! 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 * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c index f6803ac..6947d64 100644 --- a/fortran/src/H5Sf.c +++ b/fortran/src/H5Sf.c @@ -298,7 +298,7 @@ nh5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f *startblock, if (rank < 0 ) return ret_value; c_startblock = (hsize_t)*startblock; - c_buf = (hsize_t*)HDmalloc(sizeof(hsize_t)*(size_t)(c_num_blocks*2*rank)); + c_buf = (hsize_t*)HDmalloc(sizeof(hsize_t)*(size_t)(c_num_blocks*2*(hsize_t)rank)); if (!c_buf) return ret_value; ret_value = H5Sget_select_hyper_blocklist(c_space_id, c_startblock, @@ -425,7 +425,7 @@ nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, if (rank < 0 ) return ret_value; c_startpoint = (hsize_t)*startpoint; - c_buf = (hsize_t*)HDmalloc(sizeof(hsize_t)*(size_t)(c_num_points*rank)); + c_buf = (hsize_t*)HDmalloc(sizeof(hsize_t)*(size_t)(c_num_points*(hsize_t)rank)); if (!c_buf) return ret_value; ret_value = H5Sget_select_elem_pointlist(c_space_id, c_startpoint, c_num_points, c_buf); @@ -434,7 +434,7 @@ nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, /* and add 1 to account for array's starting at one in Fortran */ i2 = 0; for( i = 0; i < c_num_points; i++) { - i1 = rank*(i+1); + i1 = (hsize_t)rank*(i+1); for(j = 0; j < rank; j++) { buf[i2] = (hsize_t_f)(c_buf[i1-1]+1); i2 = i2 + 1; @@ -442,10 +442,6 @@ nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, } } -/* for( i = 0; i < c_num_points*rank; i++) { */ -/* printf("%i \n", (int)c_buf[i]+1); */ -/* } */ - if (ret_value >= 0 ) ret_value = 0; HDfree(c_buf); @@ -453,8 +449,6 @@ nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, return ret_value; } - - /****if* H5Sf/h5sselect_all_c * NAME * h5sselect_all_c @@ -1230,7 +1224,8 @@ nh5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsi H5S_seloper_t c_op; herr_t status; int rank; - int i, j; + size_t i; + int j; hsize_t *c_coord; size_t c_nelements; @@ -1239,11 +1234,11 @@ nh5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsi c_space_id = *space_id; rank = H5Sget_simple_extent_ndims(c_space_id); - c_coord = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank*(*nelements)); + c_coord = (hsize_t *)HDmalloc(sizeof(hsize_t)*(size_t)rank*((size_t)*nelements)); if(!c_coord) return ret_value; - for (i=0; i< *nelements; i++) { + for (i=0; i< (size_t)*nelements; i++) { for (j = 0; j < rank; j++) { - c_coord[j+i*rank] = (hsize_t)coord[j + i*rank]; + c_coord[(size_t)j+i*(size_t)rank] = (hsize_t)coord[(size_t)j + i*(size_t)rank]; } } diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c index 878119f..7e1aa42 100644 --- a/fortran/src/H5Tf.c +++ b/fortran/src/H5Tf.c @@ -26,9 +26,9 @@ /****if* H5Tf/h5topen_c * NAME - * h5topen_c + * h5topen_c * PURPOSE - * Call H5Topen2 to open a datatype + * Call H5Topen2 to open a datatype * INPUTS * loc_id - file or group identifier * name - name of the datatype within file or group @@ -78,9 +78,9 @@ done: /****if* H5Tf/h5tcommit_c * NAME - * h5tcommit_c + * h5tcommit_c * PURPOSE - * Call H5Tcommit2 to commit a datatype + * Call H5Tcommit2 to commit a datatype * INPUTS * loc_id - file or group identifier * name - name of the datatype within file or group @@ -126,9 +126,9 @@ done: /****if* H5Tf/h5tclose_c * NAME - * h5tclose_c + * h5tclose_c * PURPOSE - * Call H5Tclose to close the datatype + * Call H5Tclose to close the datatype * INPUTS * type_id - identifier of the datatype to be closed * RETURNS @@ -156,9 +156,9 @@ nh5tclose_c ( hid_t_f *type_id ) /****if* H5Tf/h5tcopy_c * NAME - * h5tcopy_c + * h5tcopy_c * PURPOSE - * Call H5Tcopy to copy a datatype + * Call H5Tcopy to copy a datatype * INPUTS * type_id - identifier of the datatype to be copied * OUTPUTS @@ -190,9 +190,9 @@ nh5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id) /****if* H5Tf/h5tequal_c * NAME - * h5tequal_c + * h5tequal_c * PURPOSE - * Call H5Tequal to copy a datatype + * Call H5Tequal to copy a datatype * INPUTS * type1_id - datatype identifier * type2_id - datatype identifier @@ -289,9 +289,9 @@ nh5tget_class_c ( hid_t_f *type_id , int_f *classtype) /****if* H5Tf/h5tget_order_c * NAME - * h5tget_order_c + * h5tget_order_c * PURPOSE - * Call H5Tget_order to determine byte order + * Call H5Tget_order to determine byte order * INPUTS * type_id - identifier of the dataspace * OUTPUTS @@ -333,9 +333,9 @@ nh5tget_order_c ( hid_t_f *type_id , int_f *order) /****if* H5Tf/h5tset_order_c * NAME - * h5tset_order_c + * h5tset_order_c * PURPOSE - * Call H5Tset_order to set byte order + * Call H5Tset_order to set byte order * INPUTS * type_id - identifier of the dataspace * order; possible values are: @@ -374,9 +374,9 @@ nh5tset_order_c ( hid_t_f *type_id , int_f *order) /****if* H5Tf/h5tget_size_c * NAME - * h5tget_size_c + * h5tget_size_c * PURPOSE - * Call H5Tget_size to get size of the datatype + * Call H5Tget_size to get size of the datatype * INPUTS * type_id - identifier of the dataspace * OUTPUTS @@ -409,9 +409,9 @@ nh5tget_size_c ( hid_t_f *type_id , size_t_f *size) /****if* H5Tf/h5tset_size_c * NAME - * h5tset_size_c + * h5tset_size_c * PURPOSE - * Call H5Tget_size to get size of the datatype + * Call H5Tget_size to get size of the datatype * INPUTS * type_id - identifier of the dataspace * OUTPUTS @@ -445,9 +445,9 @@ nh5tset_size_c ( hid_t_f *type_id , size_t_f *size) /****if* H5Tf/h5tget_precision_c * NAME - * h5tget_precision_c + * h5tget_precision_c * PURPOSE - * Call H5Tget_precision to get precision of the datatype + * Call H5Tget_precision to get precision of the datatype * INPUTS * type_id - identifier of the dataspace * OUTPUTS @@ -480,9 +480,9 @@ nh5tget_precision_c ( hid_t_f *type_id , size_t_f *precision) /****if* H5Tf/h5tset_precision_c * NAME - * h5tset_precision_c + * h5tset_precision_c * PURPOSE - * Call H5Tset_precision to set precision of the datatype + * Call H5Tset_precision to set precision of the datatype * INPUTS * type_id - identifier of the dataspace * precision - number of significant bits @@ -515,9 +515,9 @@ nh5tset_precision_c ( hid_t_f *type_id , size_t_f *precision) /****if* H5Tf/h5tget_offset_c * NAME - * h5tget_offset_c + * h5tget_offset_c * PURPOSE - * Call H5Tget_offset to get bit offset of the first + * Call H5Tget_offset to get bit offset of the first * significant bit of the datatype * INPUTS * type_id - identifier of the dataspace @@ -552,9 +552,9 @@ nh5tget_offset_c ( hid_t_f *type_id , size_t_f *offset) /****if* H5Tf/h5tset_offset_c * NAME - * h5tset_offset_c + * h5tset_offset_c * PURPOSE - * Call H5Tset_offset to set bit offset of the first + * Call H5Tset_offset to set bit offset of the first * significant bit of the datatype * INPUTS * type_id - identifier of the dataspace @@ -588,9 +588,9 @@ nh5tset_offset_c ( hid_t_f *type_id , size_t_f *offset) /****if* H5Tf/h5tget_pad_c * NAME - * h5tget_pad_c + * h5tget_pad_c * PURPOSE - * Call H5Tget_pad to get the padding type of the least and + * Call H5Tget_pad to get the padding type of the least and * most-significant bit padding * * INPUTS @@ -629,11 +629,11 @@ nh5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad) /****if* H5Tf/h5tset_pad_c * NAME - * h5tset_pad_c + * h5tset_pad_c * INPUTS * type_id - identifier of the dataspace * PURPOSE - * Call H5Tset_pad to set the padding type of the least and + * Call H5Tset_pad to set the padding type of the least and * most-significant bit padding * * INPUTS @@ -670,9 +670,9 @@ nh5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f* msbpad ) /****if* H5Tf/h5tget_sign_c * NAME - * h5tget_sign_c + * h5tget_sign_c * PURPOSE - * Call H5Tget_sign to get sign type for an integer type + * Call H5Tget_sign to get sign type for an integer type * INPUTS * type_id - identifier of the dataspace * OUTPUTS @@ -705,9 +705,9 @@ nh5tget_sign_c ( hid_t_f *type_id , int_f *sign) /****if* H5Tf/h5tset_sign_c * NAME - * h5tset_sign_c + * h5tset_sign_c * PURPOSE - * Call H5Tset_sign to set sign type for an integer type + * Call H5Tset_sign to set sign type for an integer type * INPUTS * type_id - identifier of the dataspace * sign - sign type for an integer typ @@ -741,9 +741,9 @@ nh5tset_sign_c ( hid_t_f *type_id , int_f* sign) /****if* H5Tf/h5tget_fields_c * NAME - * h5tget_fields_c + * h5tget_fields_c * PURPOSE - * Call H5Tget_fields to get floating point datatype + * Call H5Tget_fields to get floating point datatype * bit field information * INPUTS * type_id - identifier of the dataspace @@ -785,9 +785,9 @@ nh5tget_fields_c ( hid_t_f *type_id , size_t_f *spos, size_t_f *epos, size_t_f* /****if* H5Tf/h5tset_fields_c * NAME - * h5tset_fields_c + * h5tset_fields_c * PURPOSE - * Call H5Tset_fields to set floating point datatype + * Call H5Tset_fields to set floating point datatype * bit field information * INPUTS * type_id - identifier of the dataspace @@ -829,9 +829,9 @@ nh5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* e /****if* H5Tf/h5tget_ebias_c * NAME - * h5tget_ebias_c + * h5tget_ebias_c * PURPOSE - * Call H5Tget_ebias to get exponent bias of a + * Call H5Tget_ebias to get exponent bias of a * floating-point type of the datatype * INPUTS * type_id - identifier of the dataspace @@ -866,9 +866,9 @@ nh5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias) /****if* H5Tf/h5tset_ebias_c * NAME - * h5tset_ebias_c + * h5tset_ebias_c * PURPOSE - * Call H5Tset_ebias to set exponent bias of a + * Call H5Tset_ebias to set exponent bias of a * floating-point type of the datatype * INPUTS * type_id - identifier of the dataspace @@ -903,9 +903,9 @@ nh5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias) /****if* H5Tf/h5tget_norm_c * NAME - * h5tget_norm_c + * h5tget_norm_c * PURPOSE - * Call H5Tget_norm to get mantissa normalization + * Call H5Tget_norm to get mantissa normalization * of a floating-point datatype * INPUTS * type_id - identifier of the dataspace @@ -940,9 +940,9 @@ nh5tget_norm_c ( hid_t_f *type_id , int_f *norm) /****if* H5Tf/h5tset_norm_c * NAME - * h5tset_norm_c + * h5tset_norm_c * PURPOSE - * Call H5Tset_norm to set mantissa normalization of + * Call H5Tset_norm to set mantissa normalization of * floating-point type of the datatype * INPUTS * type_id - identifier of the dataspace @@ -977,9 +977,9 @@ nh5tset_norm_c ( hid_t_f *type_id , int_f *norm) /****if* H5Tf/h5tget_inpad_c * NAME - * h5tget_inpad_c + * h5tget_inpad_c * PURPOSE - * Call H5Tget_inpad to get the padding type for + * Call H5Tget_inpad to get the padding type for * unused bits in floating-point datatypes * * INPUTS @@ -1016,11 +1016,11 @@ nh5tget_inpad_c ( hid_t_f *type_id , int_f * padtype) /****if* H5Tf/h5tset_inpad_c * NAME - * h5tset_inpad_c + * h5tset_inpad_c * INPUTS * type_id - identifier of the dataspace * PURPOSE - * Call H5Tset_inpad to set the padding type + * Call H5Tset_inpad to set the padding type * unused bits in floating-point datatype * * INPUTS @@ -1057,9 +1057,9 @@ nh5tset_inpad_c ( hid_t_f *type_id, int_f * padtype) /****if* H5Tf/h5tget_cset_c * NAME - * h5tget_cset_c + * h5tget_cset_c * PURPOSE - * Call H5Tget_cset to get character set + * Call H5Tget_cset to get character set * type of a string datatype * * INPUTS @@ -1095,11 +1095,11 @@ nh5tget_cset_c ( hid_t_f *type_id , int_f * cset) /****if* H5Tf/h5tset_cset_c * NAME - * h5tset_cset_c + * h5tset_cset_c * INPUTS * type_id - identifier of the dataspace * PURPOSE - * Call H5Tset_cset to set character set + * Call H5Tset_cset to set character set * type of a string datatype * * INPUTS @@ -1135,9 +1135,9 @@ nh5tset_cset_c ( hid_t_f *type_id, int_f * cset) /****if* H5Tf/h5tget_strpad_c * NAME - * h5tget_strpad_c + * h5tget_strpad_c * PURPOSE - * Call H5Tget_strpad to get string padding method + * Call H5Tget_strpad to get string padding method * for a string datatype * INPUTS * type_id - identifier of the dataspace @@ -1171,11 +1171,11 @@ nh5tget_strpad_c ( hid_t_f *type_id , int_f * strpad) /****if* H5Tf/h5tset_strpad_c * NAME - * h5tset_strpad_c + * h5tset_strpad_c * INPUTS * type_id - identifier of the dataspace * PURPOSE - * Call H5Tset_strpad to set string padding method + * Call H5Tset_strpad to set string padding method * for a string datatype * * INPUTS @@ -1211,9 +1211,9 @@ nh5tset_strpad_c ( hid_t_f *type_id, int_f * strpad) /****if* H5Tf/h5tget_nmembers_c * NAME - * h5tget_nmembers_c + * h5tget_nmembers_c * PURPOSE - * Call H5Tget_nmembers to get number of fields + * Call H5Tget_nmembers to get number of fields * in a compound datatype * INPUTS * type_id - identifier of the dataspace @@ -1246,9 +1246,9 @@ nh5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members) /****if* H5Tf/h5tget_member_name_c * NAME - * h5tget_member_name_c + * h5tget_member_name_c * PURPOSE - * Call H5Tget_member_name to get name + * Call H5Tget_member_name to get name * of a compound datatype * INPUTS * type_id - identifier of the dataspace @@ -1287,9 +1287,9 @@ nh5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *n } /****if* H5Tf/h5tget_member_index_c * NAME - * h5tget_member_index_c + * h5tget_member_index_c * PURPOSE - * Call H5Tget_member_index to get an index of + * Call H5Tget_member_index to get an index of * the specified datatype filed or member. * INPUTS * type_id - datatype identifier @@ -1301,7 +1301,7 @@ nh5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *n * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, September 26, 2002 + * Thursday, September 26, 2002 * HISTORY * * SOURCE @@ -1312,15 +1312,13 @@ nh5tget_member_index_c (hid_t_f *type_id, _fcd name, int_f *namelen, int_f *idx) { int ret_value = -1; char *c_name; - size_t c_namelen; hid_t c_type_id; int c_index; /* * Convert FORTRAN name to C name */ - c_namelen = *namelen; - c_name = (char *)HD5f2cstring(name, c_namelen); + c_name = (char *)HD5f2cstring(name, (size_t)*namelen); if (c_name == NULL) return ret_value; /* @@ -1340,9 +1338,9 @@ DONE: /****if* H5Tf/h5tget_member_offset_c * NAME - * h5tget_member_offset_c + * h5tget_member_offset_c * PURPOSE - * Call H5Tget_member_offset to get byte offset of the + * Call H5Tget_member_offset to get byte offset of the * beginning of a field within a compound datatype with * respect to the beginning of the compound data type datum * INPUTS @@ -1367,12 +1365,8 @@ nh5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f * offset) { int ret_value = -1; size_t c_offset; - hid_t c_type_id; - unsigned c_member_no; - c_type_id = *type_id; - c_member_no = *member_no; - c_offset = H5Tget_member_offset(c_type_id, c_member_no); + c_offset = H5Tget_member_offset((hid_t)*type_id, (unsigned)*member_no); *offset = (size_t_f)c_offset; ret_value = 0; return ret_value; @@ -1380,9 +1374,9 @@ nh5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f * offset) /****if* H5Tf/h5tget_array_dims_c * NAME - * h5tget_array_dims_c + * h5tget_array_dims_c * PURPOSE - * Call H5Tget_array_dims2 to get + * Call H5Tget_array_dims2 to get * dimensions of array datatype * INPUTS * type_id - identifier of the array datatype @@ -1423,9 +1417,9 @@ DONE: /****if* H5Tf/h5tget_array_ndims_c * NAME - * h5tget_array_ndims_c + * h5tget_array_ndims_c * PURPOSE - * Call H5Tget_array_ndims to get number + * Call H5Tget_array_ndims to get number * of dimensions of array datatype * INPUTS * type_id - identifier of the array datatype @@ -1460,9 +1454,9 @@ nh5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims) /****if* H5Tf/h5tget_super_c * NAME - * h5tget_super_c + * h5tget_super_c * PURPOSE - * Call H5Tget_super to get base datatype from which + * Call H5Tget_super to get base datatype from which * datatype was derived * INPUTS * type_id - identifier of the array datatype @@ -1498,9 +1492,9 @@ nh5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id) /****if* H5Tf/h5tget_member_type_c * NAME - * h5tget_member_type_c + * h5tget_member_type_c * PURPOSE - * Call H5Tget_member_type to get the identifier of a copy of + * Call H5Tget_member_type to get the identifier of a copy of * the datatype of the field * INPUTS * type_id - identifier of the datatype @@ -1511,7 +1505,7 @@ nh5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id) * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY * * SOURCE @@ -1522,12 +1516,8 @@ nh5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype) /******/ { int ret_value = -1; - hid_t c_type_id; - unsigned c_field_idx; - c_type_id = *type_id; - c_field_idx = *field_idx; - *datatype = (hid_t_f)H5Tget_member_type(c_type_id, c_field_idx); + *datatype = (hid_t_f)H5Tget_member_type((hid_t)*type_id, (unsigned)*field_idx); if(*datatype < 0) return ret_value; ret_value = 0; @@ -1537,9 +1527,9 @@ nh5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype) /****if* H5Tf/h5tcreate_c * NAME - * h5tcreate_c + * h5tcreate_c * PURPOSE - * Call H5Tcreate to create a datatype + * Call H5Tcreate to create a datatype * INPUTS * cls - class type * size - size of the class memeber @@ -1573,20 +1563,20 @@ nh5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id) /****if* H5Tf/h5tinsert_c * NAME - * h5tinsert_c + * h5tinsert_c * PURPOSE - * Call H5Tinsert to adds another member to the compound datatype + * Call H5Tinsert to adds another member to the compound datatype * INPUTS - * type_id - identifier of the datatype - * name - Name of the field to insert - * namelen - length of the name - * offset - Offset in memory structure of the field to insert - * field_id - datatype identifier of the new member + * type_id - identifier of the datatype + * name - Name of the field to insert + * namelen - length of the name + * offset - Offset in memory structure of the field to insert + * field_id - datatype identifier of the new member * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY * * SOURCE @@ -1597,21 +1587,14 @@ nh5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_ /******/ { int ret_value = -1; - hid_t c_type_id; - hid_t c_field_id; char* c_name; - size_t c_namelen; - size_t c_offset; herr_t error; - c_offset =(size_t) *offset; - c_namelen = *namelen; - c_name = (char *)HD5f2cstring(name, c_namelen); + c_name = (char *)HD5f2cstring(name, (size_t)*namelen); if (c_name == NULL) return ret_value; - c_type_id = *type_id; - c_field_id = *field_id; - error = H5Tinsert(c_type_id, c_name, c_offset, c_field_id); + error = H5Tinsert((hid_t)*type_id, c_name, (size_t)*offset, (hid_t)*field_id); + HDfree(c_name); if(error < 0) return ret_value; ret_value = 0; @@ -1621,18 +1604,18 @@ nh5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_ /****if* H5Tf/h5tpack_c * NAME - * h5tpack_c + * h5tpack_c * PURPOSE - * Call H5Tpack tor ecursively remove padding from - * within a compound datatype to make it more efficient - * (space-wise) to store that data + * Call H5Tpack tor ecursively remove padding from + * within a compound datatype to make it more efficient + * (space-wise) to store that data * INPUTS - * type_id - identifier of the datatype + * type_id - identifier of the datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * XIANGYANG SU - * Thursday, February 3, 2000 + * Thursday, February 3, 2000 * HISTORY * * SOURCE @@ -1656,9 +1639,9 @@ nh5tpack_c(hid_t_f * type_id) /****if* H5Tf/h5tarray_create_c * NAME - * h5tarray_create_c + * h5tarray_create_c * PURPOSE - * Call H5Tarray_create2 to create array datatype + * Call H5Tarray_create2 to create array datatype * INPUTS * base_id - identifier of array base datatype * rank - array's rank @@ -1668,7 +1651,7 @@ nh5tpack_c(hid_t_f * type_id) * 0 on success, -1 on failure * AUTHOR * Elena Pourmal - * Thursday, November 16, 2000 + * Thursday, November 16, 2000 * HISTORY * * SOURCE @@ -1687,7 +1670,7 @@ nh5tarray_create_c(hid_t_f * base_id, int_f *rank, hsize_t_f* dims, hid_t_f* typ * Transpose dimension arrays because of C-FORTRAN storage order */ for(u = 0; u < (unsigned)*rank ; u++) - c_dims[u] = (hsize_t)dims[(*rank - u) - 1]; + c_dims[u] = (hsize_t)dims[((unsigned)*rank - u) - 1]; if((c_type_id = H5Tarray_create2((hid_t)*base_id, (unsigned)*rank, c_dims)) < 0) goto DONE; @@ -1702,19 +1685,19 @@ DONE: /****if* H5Tf/h5tenum_create_c * NAME - * h5tenum_create_c + * h5tenum_create_c * PURPOSE - * Call H5Tenum_create to create a new enumeration datatype + * Call H5Tenum_create to create a new enumeration datatype * INPUTS - * parent_id - Datatype identifier for the base datatype + * parent_id - Datatype identifier for the base datatype * OUTPUTS - * new_type_id - datatype identifier for the new - * enumeration datatype + * new_type_id - datatype identifier for the new + * enumeration datatype * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * Xiangyang Su - * Tuesday, February 15, 1999 + * Tuesday, February 15, 1999 * HISTORY * * SOURCE @@ -1725,11 +1708,9 @@ nh5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id) /******/ { int ret_value = 0; - hid_t c_parent_id; hid_t c_new_type_id; - c_parent_id = *parent_id; - c_new_type_id = H5Tenum_create(c_parent_id); + c_new_type_id = H5Tenum_create((hid_t)*parent_id); if ( c_new_type_id < 0 ) ret_value = -1; *new_type_id = (hid_t_f)c_new_type_id; @@ -1764,12 +1745,10 @@ nh5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) { int ret_value = -1; char* c_name; - size_t c_namelen; herr_t error; int_f c_value; - c_namelen = *namelen; - c_name = (char *)HD5f2cstring(name, c_namelen); + c_name = (char *)HD5f2cstring(name, (size_t)*namelen); if (c_name == NULL) return ret_value; c_value = *value; @@ -1785,9 +1764,9 @@ nh5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) /****if* H5Tf/h5tenum_nameof_c * NAME - * h5tenum_nameof_c + * h5tenum_nameof_c * PURPOSE - * Call H5Tenum_nameof to find the symbol name that corresponds to + * Call H5Tenum_nameof to find the symbol name that corresponds to * the specified value of the enumeration datatype type * INPUTS * type_id - identifier of the datatype @@ -1829,9 +1808,9 @@ nh5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen) /****if* H5Tf/h5tenum_valueof_c * NAME - * h5tenum_valueof_c + * h5tenum_valueof_c * PURPOSE - * Call H5Tenum_valueof to find the value of that corresponds to + * Call H5Tenum_valueof to find the value of that corresponds to * the specified name of the enumeration datatype type * INPUTS * type_id - identifier of the datatype @@ -1853,16 +1832,12 @@ nh5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) /******/ { int ret_value = -1; - hid_t c_type_id; char* c_name; - size_t c_namelen; herr_t error; - c_namelen = *namelen; - c_name = (char *)HD5f2cstring(name, c_namelen); + c_name = (char *)HD5f2cstring(name, (size_t)*namelen); if (c_name == NULL) return ret_value; - c_type_id = *type_id; - error = H5Tenum_valueof(c_type_id, c_name, value); + error = H5Tenum_valueof((hid_t)*type_id, c_name, value); HDfree(c_name); if(error < 0) return ret_value; @@ -1873,9 +1848,9 @@ nh5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value) /****if* H5Tf/h5tget_member_value_c * NAME - * h5tget_member_value_c + * h5tget_member_value_c * PURPOSE - * Call H5Tget_member_value to get the value of an + * Call H5Tget_member_value to get the value of an * enumeration datatype member * INPUTS * type_id - identifier of the datatype @@ -1896,14 +1871,10 @@ nh5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value) /******/ { int ret_value = -1; - hid_t c_type_id; - unsigned c_member_no; int c_value; herr_t error; - c_type_id = *type_id; - c_member_no = *member_no; - error = H5Tget_member_value(c_type_id, c_member_no, &c_value); + error = H5Tget_member_value((hid_t)*type_id, (unsigned)*member_no, &c_value); if(error < 0) return ret_value; *value = (int_f)c_value; @@ -1913,11 +1884,11 @@ nh5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value) /****if* H5Tf/h5tset_tag_c * NAME - * h5tset_tag_c + * h5tset_tag_c * INPUTS * type_id - identifier of the dataspace * PURPOSE - * Call H5Tset_tag to set an opaque datatype tag + * Call H5Tset_tag to set an opaque datatype tag * INPUTS * type_id - identifier of the dataspace * tag - Unique ASCII string with which the opaque @@ -1937,16 +1908,12 @@ nh5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen) /******/ { int ret_value = -1; - hid_t c_type_id; herr_t status; char* c_tag; - size_t c_namelen; - c_namelen = *namelen; - c_tag = (char *)HD5f2cstring(tag, c_namelen); + c_tag = (char *)HD5f2cstring(tag, (size_t)*namelen); - c_type_id = *type_id; - status = H5Tset_tag(c_type_id, c_tag); + status = H5Tset_tag((hid_t)*type_id, c_tag); HDfree(c_tag); if ( status < 0 ) return ret_value; @@ -1956,7 +1923,7 @@ nh5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen) /****if* H5Tf/h5tget_tag_c * NAME - * h5tget_tag_c + * h5tget_tag_c * PURPOSE * Call H5Tset_tag to set an opaque datatype tag * INPUTS @@ -1994,9 +1961,9 @@ nh5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* taglen) } /****if* H5Tf/h5tvlen_create_c * NAME - * h5tvlen_create_c + * h5tvlen_create_c * PURPOSE - * Call H5Tvlen_create to create VL dtatype + * Call H5Tvlen_create to create VL dtatype * INPUTS * type_id - identifier of the base datatype * OUTPUTS @@ -2027,9 +1994,9 @@ nh5tvlen_create_c(hid_t_f* type_id, hid_t_f *vltype_id) } /****if* H5Tf/h5tis_variable_str_c * NAME - * h5tis_variable_str_c + * h5tis_variable_str_c * PURPOSE - * Call H5Tis_variable_str to detrmine if the datatype + * Call H5Tis_variable_str to detrmine if the datatype * is a variable string. * INPUTS * type_id - identifier of the dataspace @@ -2062,9 +2029,9 @@ nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ) } /****if* H5Tf/h5tget_member_class_c * NAME - * h5tget_member_class_c + * h5tget_member_class_c * PURPOSE - * Call H5Tget_member_class to detrmine ithe class of the compound + * Call H5Tget_member_class to detrmine ithe class of the compound * datatype member * INPUTS * type_id - identifier of the dataspace @@ -2102,9 +2069,9 @@ nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls ) /****if* H5Tf/h5tcommit_anon_c * NAME - * h5tcommit_anon_c + * h5tcommit_anon_c * PURPOSE - * Call H5Tcommit_anon + * Call H5Tcommit_anon * INPUTS * loc_id - file or group identifier * dtype_id - dataset identifier @@ -2138,9 +2105,9 @@ nh5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, /****if* H5Tf/h5tcommitted_c * NAME - * h5tcommitted_c + * h5tcommitted_c * PURPOSE - * Call H5Tcommitted + * Call H5Tcommitted * dtype_id - dataset identifier * RETURNS * a positive value, for TRUE, if the datatype has been committed, @@ -2169,9 +2136,9 @@ nh5tcommitted_c(hid_t_f *dtype_id) /****if* H5Tf/h5tdecode_c * NAME - * h5tdecode_c + * h5tdecode_c * PURPOSE - * Call H5Tdecode + * Call H5Tdecode * INPUTS * * buf - Buffer for the data space object to be decoded. @@ -2215,9 +2182,9 @@ nh5tdecode_c ( _fcd buf, hid_t_f *obj_id ) /****if* H5Tf/h5tencode_c * NAME - * h5tencode_c + * h5tencode_c * PURPOSE - * Call H5Tencode + * Call H5Tencode * INPUTS * * obj_id - Identifier of the object to be encoded. @@ -2285,9 +2252,9 @@ nh5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) /****if* H5Tf/h5tget_create_plist_c * NAME - * h5tget_create_plist_c + * h5tget_create_plist_c * PURPOSE - * Call H5Tget_create_plist + * Call H5Tget_create_plist * INPUTS * dtype_id - Datatype identifier * OUTPUTS @@ -2317,9 +2284,9 @@ nh5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id) /****if* H5Tf/h5tcompiler_conv_c * NAME - * h5tcompiler_conv_c + * h5tcompiler_conv_c * PURPOSE - * Call H5Tcompiler_conv + * Call H5Tcompiler_conv * INPUTS * * src_id - Identifier for the source datatype. @@ -2351,9 +2318,9 @@ nh5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag) } /****if* H5Tf/h5tget_native_type_c * NAME - * h5tget_native_type_c + * h5tget_native_type_c * PURPOSE - * Call H5Tget_native_type + * Call H5Tget_native_type * INPUTS * * dtype_id - Datatype identifier for the dataset datatype. @@ -2449,13 +2416,11 @@ h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f* namelen, void *value) int ret_value = -1; hid_t status; char *c_name; - size_t c_namelen; /* * Convert FORTRAN name to C name */ - c_namelen = *namelen; - c_name = (char *)HD5f2cstring(name, c_namelen); + c_name = (char *)HD5f2cstring(name, (size_t)*namelen); if (c_name == NULL) return ret_value; status = H5Tenum_insert( (hid_t)*type_id, c_name, value); diff --git a/fortran/src/H5Zf.c b/fortran/src/H5Zf.c index 0427c23..169e018 100644 --- a/fortran/src/H5Zf.c +++ b/fortran/src/H5Zf.c @@ -51,9 +51,7 @@ nh5zunregister_c (int_f *filter) * Call H5Zunregister function. */ c_filter = (H5Z_filter_t)*filter; - printf(" filter # %d \n", (int)c_filter); status = H5Zunregister(c_filter); - printf("From C zunregister %d \n", status); if (status < 0) return ret_value; ret_value = 0; return ret_value; diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index a149109..1641989 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -421,12 +421,17 @@ nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, /* * H5F flags + * + * Note that H5F_ACC_DEBUG is deprecated (nonfunctional) but retained + * for backward compatibility since it's in the public API. */ h5f_flags[0] = (int_f)H5F_ACC_RDWR; h5f_flags[1] = (int_f)H5F_ACC_RDONLY; h5f_flags[2] = (int_f)H5F_ACC_TRUNC; h5f_flags[3] = (int_f)H5F_ACC_EXCL; +#ifndef H5_NO_DEPRECATED_SYMBOLS h5f_flags[4] = (int_f)H5F_ACC_DEBUG; +#endif /* H5_NO_DEPRECATED_SYMBOLS */ h5f_flags[5] = (int_f)H5F_SCOPE_LOCAL; h5f_flags[6] = (int_f)H5F_SCOPE_GLOBAL; h5f_flags[7] = (int_f)H5F_CLOSE_DEFAULT; diff --git a/fortran/src/H5f90global.f90 b/fortran/src/H5f90global.f90 index ca50e20..0e371f5 100644 --- a/fortran/src/H5f90global.f90 +++ b/fortran/src/H5f90global.f90 @@ -234,6 +234,9 @@ MODULE H5GLOBAL ! ! H5F flags (DO NOT FORGET TO UPDATE WHEN NEW FLAGS ARE ADDED !) ! + ! NOTE: H5F_ACC_DEBUG is deprecated (nonfunctional) but retained for + ! backward compatibility since it's in the public API. + ! ! H5F flags declaration ! INTEGER, PARAMETER :: H5F_FLAGS_LEN = 19 diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index b5e40a8..6bde877 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -995,7 +995,7 @@ H5_FCDLL int_f nh5pcreate_c ( hid_t_f *cls, hid_t_f *prp_id ); H5_FCDLL int_f nh5pclose_c ( hid_t_f *prp_id ); H5_FCDLL int_f nh5pcopy_c ( hid_t_f *prp_id , hid_t_f *new_prp_id); H5_FCDLL int_f nh5pequal_c ( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f *c_flag); -H5_FCDLL int_f nh5pget_class_c ( hid_t_f *prp_id , int_f *classtype); +H5_FCDLL int_f nh5pget_class_c ( hid_t_f *prp_id , hid_t_f *classtype); H5_FCDLL int_f nh5pset_deflate_c ( hid_t_f *prp_id , int_f *level); H5_FCDLL int_f nh5pset_chunk_c ( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims ); H5_FCDLL int_f nh5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims ); diff --git a/fortran/src/README b/fortran/src/README index c877050..7af5df3 100644 --- a/fortran/src/README +++ b/fortran/src/README @@ -88,7 +88,6 @@ Compilation grpdsetexample - creates datasets in the groups hyperslabexample - writes and reads a hyperslab selectele - writes element selections - grpit - iterates through the members of the group attrexample - creates and writes a dataset attribute compound - creates, writes and reads one dim array of structures mountexample - shows how to use mounting files to access a dataset |