From 6dc618cb011a54c8a10c5b9a57a0ea04273e782d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 15 Dec 2020 12:01:35 -0600 Subject: [PATCH 01/25] OESS-98 fix tools test for plugins --- CMakeLists.txt | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f86832bc0f..530710bae25 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -937,21 +937,6 @@ if (BUILD_TESTING) endif () endif () -#----------------------------------------------------------------------------- -# Include filter plugins -#----------------------------------------------------------------------------- -include (CMakePlugins.cmake) - -if (HDF5_PACKAGE_EXTLIBS AND NOT HDF5_NO_PACKAGES) - if (HDF5_ENABLE_PLUGIN_SUPPORT AND PLUGIN_FOUND) - PACKAGE_PLUGIN_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT}) -# option (HDF5_TEST_PLUGIN "Execute plugin tests" ON) -# mark_as_advanced (HDF5_TEST_PLUGIN) - -# TEST_PLUGIN_LIBRARY () - endif () -endif () - #----------------------------------------------------------------------------- # Option to build HDF5 Utilities #----------------------------------------------------------------------------- From 1682bdf8b57faffba32e6a4675d95a83182d4d12 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 11 Jan 2021 07:21:42 -0600 Subject: [PATCH 02/25] sync fork --- CMakeLists.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 530710bae25..4f86832bc0f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -937,6 +937,21 @@ if (BUILD_TESTING) endif () endif () +#----------------------------------------------------------------------------- +# Include filter plugins +#----------------------------------------------------------------------------- +include (CMakePlugins.cmake) + +if (HDF5_PACKAGE_EXTLIBS AND NOT HDF5_NO_PACKAGES) + if (HDF5_ENABLE_PLUGIN_SUPPORT AND PLUGIN_FOUND) + PACKAGE_PLUGIN_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT}) +# option (HDF5_TEST_PLUGIN "Execute plugin tests" ON) +# mark_as_advanced (HDF5_TEST_PLUGIN) + +# TEST_PLUGIN_LIBRARY () + endif () +endif () + #----------------------------------------------------------------------------- # Option to build HDF5 Utilities #----------------------------------------------------------------------------- From f856d771436d9b4bd6e27b9966d6861ea915ca3e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 15 Jan 2021 09:13:57 -0600 Subject: [PATCH 03/25] Merge of changes from dev --- CMakeFilters.cmake | 28 +++- CMakeLists.txt | 87 +++++++----- MANIFEST | 2 +- c++/src/CMakeLists.txt | 2 +- config/cmake/ConfigureChecks.cmake | 25 ++-- config/cmake/HDF5PluginMacros.cmake | 10 +- config/cmake/HDF5UseFortran.cmake | 44 ++++-- config/cmake/HDFCXXCompilerFlags.cmake | 8 +- config/cmake/HDFCompilerFlags.cmake | 9 +- config/cmake/HDFFortranCompilerFlags.cmake | 8 +- config/cmake/fileCompareTest.cmake | 27 ++-- config/cmake_ext_mod/ConfigureChecks.cmake | 60 ++++++-- config/cmake_ext_mod/FindSZIP.cmake | 4 +- config/cmake_ext_mod/HDFMacros.cmake | 14 +- config/cmake_ext_mod/HDFUseCXX.cmake | 12 +- config/cmake_ext_mod/HDFUseFortran.cmake | 16 ++- config/cmake_ext_mod/grepTest.cmake | 10 +- config/{cmake => }/libhdf5.pc.in | 0 fortran/src/CMakeLists.txt | 2 +- hl/c++/src/CMakeLists.txt | 2 +- hl/fortran/src/CMakeLists.txt | 2 +- hl/src/CMakeLists.txt | 2 +- java/CMakeLists.txt | 10 +- release_docs/RELEASE.txt | 22 ++- src/CMakeLists.txt | 5 +- tools/src/h5dump/h5dump.c | 132 +++++++++--------- tools/src/h5dump/h5dump.h | 2 +- tools/src/h5dump/h5dump_extern.h | 2 +- tools/src/h5repack/h5repack_main.c | 1 + tools/src/misc/h5debug.c | 3 - tools/test/h5jam/getub.c | 5 +- .../test/h5repack/testfiles/h5repack-help.txt | 1 + tools/test/perform/chunk_cache.c | 8 +- 33 files changed, 358 insertions(+), 207 deletions(-) rename config/{cmake => }/libhdf5.pc.in (100%) diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index 9a0719f1dc9..26900a08511 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -32,7 +32,9 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME}) if (NOT EXISTS "${ZLIB_URL}") set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE) - message (STATUS "Filter ZLIB file ${ZLIB_URL} not found") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Filter ZLIB file ${ZLIB_URL} not found") + endif () endif () set (SZIP_URL ${TGZPATH}/${SZIP_TGZ_NAME}) if (USE_LIBAEC) @@ -40,7 +42,9 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT endif () if (NOT EXISTS "${SZIP_URL}") set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE) - message (STATUS "Filter SZIP file ${SZIP_URL} not found") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Filter SZIP file ${SZIP_URL} not found") + endif () endif () else () set (ZLIB_USE_EXTERNAL 0) @@ -76,7 +80,9 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT) set (H5_HAVE_FILTER_DEFLATE 1) set (H5_HAVE_ZLIB_H 1) set (H5_HAVE_LIBZ 1) - message (STATUS "Filter ZLIB is built") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Filter ZLIB is built") + endif () else () message (FATAL_ERROR " ZLib is Required for ZLib support in HDF5") endif () @@ -92,7 +98,9 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT) endif () set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_STATIC_LIBRARY}) INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS}) - message (STATUS "Filter ZLIB is ON") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Filter ZLIB is ON") + endif () endif () #----------------------------------------------------------------------------- @@ -122,9 +130,13 @@ if (HDF5_ENABLE_SZIP_SUPPORT) set (H5_HAVE_FILTER_SZIP 1) set (H5_HAVE_SZLIB_H 1) set (H5_HAVE_LIBSZ 1) - message (STATUS "Filter SZIP is built") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Filter SZIP is built") + endif () if (USE_LIBAEC) - message (STATUS "... with library AEC") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "... with library AEC") + endif () set (SZ_PACKAGE_NAME ${LIBAEC_PACKAGE_NAME}) else () set (SZ_PACKAGE_NAME ${SZIP_PACKAGE_NAME}) @@ -135,7 +147,9 @@ if (HDF5_ENABLE_SZIP_SUPPORT) endif () set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_STATIC_LIBRARY}) INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS}) - message (STATUS "Filter SZIP is ON") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Filter SZIP is ON") + endif () if (H5_HAVE_FILTER_SZIP) set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE") endif () diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f86832bc0f..3626a2013e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,7 +44,6 @@ if (CMAKE_VERSION VERSION_LESS "3.14.0") if (WIN32) message (FATAL_ERROR "Windows builds requires a minimum of CMake 3.14") endif() -else () endif () #----------------------------------------------------------------------------- @@ -204,6 +203,7 @@ set (HDF5_HL_F90_C_LIBSH_TARGET "${HDF5_HL_F90_C_LIB_CORENAME}-shared") #----------------------------------------------------------------------------- # Define some CMake variables for use later in the project #----------------------------------------------------------------------------- +set (HDF_CONFIG_DIR ${HDF5_SOURCE_DIR}/config) set (HDF_RESOURCES_DIR ${HDF5_SOURCE_DIR}/config/cmake) set (HDF_RESOURCES_EXT_DIR ${HDF5_SOURCE_DIR}/config/cmake_ext_mod) set (HDF5_SRC_DIR ${HDF5_SOURCE_DIR}/src) @@ -239,7 +239,9 @@ string (REGEX REPLACE ".*#define[ \t]+H5_VERS_RELEASE[ \t]+([0-9]*).*$" "\\1" H5_VERS_RELEASE ${_h5public_h_contents}) string (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z._\-]*)\".*$" "\\1" H5_VERS_SUBRELEASE ${_h5public_h_contents}) -#message (STATUS "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (TRACE "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}") +endif () #----------------------------------------------------------------------------- # parse the full soversion number from config/lt_vers.am and include in H5_SOVERS_INFO @@ -252,7 +254,9 @@ string (REGEX REPLACE ".*LT_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$" string (REGEX REPLACE ".*LT_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_LIB_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_LIB_SOVERS_MAJOR ${H5_LIB_SOVERS_INTERFACE}-${H5_LIB_SOVERS_RELEASE}) -message (STATUS "SOVERSION: ${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION: ${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}") +endif () string (REGEX MATCH ".*LT_TOOLS_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_TOOLS_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_TOOLS_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_TOOLS_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" @@ -262,7 +266,9 @@ if (H5_TOOLS_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_TOOLS_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_TOOLS_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_TOOLS_SOVERS_MAJOR ${H5_TOOLS_SOVERS_INTERFACE}-${H5_TOOLS_SOVERS_RELEASE}) - message (STATUS "SOVERSION_TOOLS: ${H5_TOOLS_SOVERS_MAJOR}.${H5_TOOLS_SOVERS_RELEASE}.${H5_TOOLS_SOVERS_MINOR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION_TOOLS: ${H5_TOOLS_SOVERS_MAJOR}.${H5_TOOLS_SOVERS_RELEASE}.${H5_TOOLS_SOVERS_MINOR}") + endif () endif () string (REGEX MATCH ".*LT_CXX_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_CXX_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_CXX_SOVERS_EXISTS) @@ -273,7 +279,9 @@ if (H5_CXX_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_CXX_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_CXX_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_CXX_SOVERS_MAJOR ${H5_CXX_SOVERS_INTERFACE}-${H5_CXX_SOVERS_RELEASE}) - message (STATUS "SOVERSION_CXX: ${H5_CXX_SOVERS_MAJOR}.${H5_CXX_SOVERS_RELEASE}.${H5_CXX_SOVERS_MINOR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION_CXX: ${H5_CXX_SOVERS_MAJOR}.${H5_CXX_SOVERS_RELEASE}.${H5_CXX_SOVERS_MINOR}") + endif () endif () string (REGEX MATCH ".*LT_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_F_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_F_SOVERS_EXISTS) @@ -284,7 +292,9 @@ if (H5_F_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_F_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_F_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_F_SOVERS_MAJOR ${H5_F_SOVERS_INTERFACE}-${H5_F_SOVERS_RELEASE}) - message (STATUS "SOVERSION_F: ${H5_F_SOVERS_MAJOR}.${H5_F_SOVERS_RELEASE}.${H5_F_SOVERS_MINOR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION_F: ${H5_F_SOVERS_MAJOR}.${H5_F_SOVERS_RELEASE}.${H5_F_SOVERS_MINOR}") + endif () endif () string (REGEX MATCH ".*LT_HL_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_HL_SOVERS_EXISTS) @@ -295,7 +305,9 @@ if (H5_HL_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_HL_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_HL_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_HL_SOVERS_MAJOR ${H5_HL_SOVERS_INTERFACE}-${H5_HL_SOVERS_RELEASE}) - message (STATUS "SOVERSION_HL: ${H5_HL_SOVERS_MAJOR}.${H5_HL_SOVERS_RELEASE}.${H5_HL_SOVERS_MINOR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION_HL: ${H5_HL_SOVERS_MAJOR}.${H5_HL_SOVERS_RELEASE}.${H5_HL_SOVERS_MINOR}") + endif () endif () string (REGEX MATCH ".*LT_HL_CXX_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_CXX_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_HL_CXX_SOVERS_EXISTS) @@ -306,7 +318,9 @@ if (H5_HL_CXX_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_HL_CXX_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_HL_CXX_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_HL_CXX_SOVERS_MAJOR ${H5_HL_CXX_SOVERS_INTERFACE}-${H5_HL_CXX_SOVERS_RELEASE}) - message (STATUS "SOVERSION_HL_CXX: ${H5_HL_CXX_SOVERS_MAJOR}.${H5_HL_CXX_SOVERS_RELEASE}.${H5_HL_CXX_SOVERS_MINOR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION_HL_CXX: ${H5_HL_CXX_SOVERS_MAJOR}.${H5_HL_CXX_SOVERS_RELEASE}.${H5_HL_CXX_SOVERS_MINOR}") + endif () endif () string (REGEX MATCH ".*LT_HL_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_F_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_HL_F_SOVERS_EXISTS) @@ -317,7 +331,9 @@ if (H5_HL_F_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_HL_F_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_HL_F_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_HL_F_SOVERS_MAJOR ${H5_HL_F_SOVERS_INTERFACE}-${H5_HL_F_SOVERS_RELEASE}) - message (STATUS "SOVERSION_HL_F: ${H5_HL_F_SOVERS_MAJOR}.${H5_HL_F_SOVERS_RELEASE}.${H5_HL_F_SOVERS_MINOR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION_HL_F: ${H5_HL_F_SOVERS_MAJOR}.${H5_HL_F_SOVERS_RELEASE}.${H5_HL_F_SOVERS_MINOR}") + endif () endif () string (REGEX MATCH ".*LT_JAVA_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_JAVA_SOVERS_EXISTS ${_lt_vers_am_contents}) if(H5_JAVA_SOVERS_EXISTS) @@ -328,7 +344,9 @@ if(H5_JAVA_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_JAVA_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_JAVA_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_JAVA_SOVERS_MAJOR ${H5_JAVA_SOVERS_INTERFACE}-${H5_JAVA_SOVERS_RELEASE}) - message (STATUS "SOVERSION_JAVA: ${H5_JAVA_SOVERS_MAJOR}.${H5_JAVA_SOVERS_RELEASE}.${H5_JAVA_SOVERS_MINOR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION_JAVA: ${H5_JAVA_SOVERS_MAJOR}.${H5_JAVA_SOVERS_RELEASE}.${H5_JAVA_SOVERS_MINOR}") + endif () endif () #----------------------------------------------------------------------------- @@ -785,39 +803,51 @@ option (HDF5_ENABLE_THREADSAFE "Enable thread-safety" OFF) if (HDF5_ENABLE_THREADSAFE) # check for unsupported options if (WIN32) - message (STATUS " **** thread-safety option not supported with static library **** ") - message (STATUS " **** thread-safety option will not be used building static library **** ") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE " **** thread-safety option not supported with static library **** ") + message (VERBOSE " **** thread-safety option will not be used building static library **** ") + endif () endif () if (HDF5_ENABLE_PARALLEL) if (NOT ALLOW_UNSUPPORTED) message (FATAL_ERROR " **** parallel and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ") else () - message (STATUS " **** Allowing unsupported parallel and thread-safety options **** ") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE " **** Allowing unsupported parallel and thread-safety options **** ") + endif () endif () endif () if (HDF5_BUILD_FORTRAN) if (NOT ALLOW_UNSUPPORTED) message (FATAL_ERROR " **** Fortran and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ") else () - message (STATUS " **** Allowing unsupported Fortran and thread-safety options **** ") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE " **** Allowing unsupported Fortran and thread-safety options **** ") + endif () endif () endif () if (HDF5_BUILD_CPP_LIB) if (NOT ALLOW_UNSUPPORTED) message (FATAL_ERROR " **** C++ and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ") else () - message (STATUS " **** Allowing unsupported C++ and thread-safety options **** ") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE " **** Allowing unsupported C++ and thread-safety options **** ") + endif () endif () endif () if (HDF5_BUILD_HL_LIB) if (NOT ALLOW_UNSUPPORTED) message (FATAL_ERROR " **** HL and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ") else () - message (STATUS " **** Allowing unsupported HL and thread-safety options **** ") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE " **** Allowing unsupported HL and thread-safety options **** ") + endif () endif () endif () if (H5_HAVE_IOEO) - message (STATUS " **** Win32 threads requires WINVER>=0x600 (Windows Vista/7/8) **** ") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE " **** Win32 threads requires WINVER>=0x600 (Windows Vista/7/8) **** ") + endif () set (H5_HAVE_WIN_THREADS 1) else () if (NOT H5_HAVE_PTHREAD_H) @@ -937,21 +967,6 @@ if (BUILD_TESTING) endif () endif () -#----------------------------------------------------------------------------- -# Include filter plugins -#----------------------------------------------------------------------------- -include (CMakePlugins.cmake) - -if (HDF5_PACKAGE_EXTLIBS AND NOT HDF5_NO_PACKAGES) - if (HDF5_ENABLE_PLUGIN_SUPPORT AND PLUGIN_FOUND) - PACKAGE_PLUGIN_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT}) -# option (HDF5_TEST_PLUGIN "Execute plugin tests" ON) -# mark_as_advanced (HDF5_TEST_PLUGIN) - -# TEST_PLUGIN_LIBRARY () - endif () -endif () - #----------------------------------------------------------------------------- # Option to build HDF5 Utilities #----------------------------------------------------------------------------- @@ -1021,7 +1036,9 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for if (HDF5_BUILD_FORTRAN) include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake) - message (STATUS "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}") + endif () include (${HDF_RESOURCES_DIR}/HDFFortranCompilerFlags.cmake) include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake) set (LINK_Fortran_LIBS ${LINK_LIBS}) @@ -1070,7 +1087,9 @@ if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++") if (NOT ALLOW_UNSUPPORTED) message (FATAL_ERROR " **** Parallel and C++ options are mutually exclusive, override with ALLOW_UNSUPPORTED option **** ") else () - message (STATUS " **** Allowing unsupported Parallel and C++ options **** ") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE " **** Allowing unsupported Parallel and C++ options **** ") + endif () endif () endif () diff --git a/MANIFEST b/MANIFEST index e12b66e9c0c..8f0f0a8090a 100644 --- a/MANIFEST +++ b/MANIFEST @@ -139,6 +139,7 @@ ./config/ibm-flags ./config/intel-fflags ./config/intel-flags +./config/libhdf5.pc.in ./config/linux-gnu ./config/linux-gnuaout ./config/linux-gnueabihf @@ -3493,7 +3494,6 @@ ./config/cmake/jrunTest.cmake ./config/cmake/jvolTest.cmake ./config/cmake/libh5cc.in -./config/cmake/libhdf5.pc.in ./config/cmake/libhdf5.settings.cmake.in ./config/cmake/mccacheinit.cmake ./config/cmake/patch.xml diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index 13eb7953694..8608c678062 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -198,7 +198,7 @@ set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") configure_file ( - ${HDF_RESOURCES_DIR}/libhdf5.pc.in + ${HDF_CONFIG_DIR}/libhdf5.pc.in ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_CPP_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc @ONLY ) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index ab121e9c581..abdde7026f1 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -165,14 +165,18 @@ if (NOT WINDOWS) add_definitions ("-D_GNU_SOURCE") else () set (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg}) - message (STATUS "${msg}... no") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... no") + endif () file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test TEST_DIRECT_VFD_WORKS Run failed with the following output and exit code:\n ${OUTPUT}\n" ) endif () else () set (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg}) - message (STATUS "${msg}... no") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... no") + endif () file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test TEST_DIRECT_VFD_WORKS Compile failed with the following output:\n ${OUTPUT}\n" ) @@ -192,7 +196,7 @@ option (HDF5_ENABLE_ROS3_VFD "Build the ROS3 Virtual File Driver" OFF) list (APPEND LINK_LIBS ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES}) INCLUDE_DIRECTORIES (${CURL_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR}) else () - message (STATUS "The Read-Only S3 VFD was requested but cannot be built.\nPlease check that openssl and cURL are available on your\nsystem, and/or re-configure without option HDF5_ENABLE_ROS3_VFD.") + message (WARNING "The Read-Only S3 VFD was requested but cannot be built.\nPlease check that openssl and cURL are available on your\nsystem, and/or re-configure without option HDF5_ENABLE_ROS3_VFD.") endif () endif () @@ -209,7 +213,7 @@ if (H5FD_ENABLE_MIRROR_VFD) ${HDF_PREFIX}_HAVE_FORK) set (${HDF_PREFIX}_HAVE_MIRROR_VFD 1) else() - message(STATUS "The socket-based Mirror VFD was requested but cannot be built. System prerequisites are not met.") + message(WARNING "The socket-based Mirror VFD was requested but cannot be built. System prerequisites are not met.") endif() endif() @@ -235,7 +239,6 @@ endif () #----------------------------------------------------------------------------- macro (H5ConversionTests TEST msg) if (NOT DEFINED ${TEST}) - # message (STATUS "===> ${TEST}") TRY_RUN (${TEST}_RUN ${TEST}_COMPILE ${CMAKE_BINARY_DIR} ${HDF_RESOURCES_DIR}/ConversionTests.c @@ -245,17 +248,23 @@ macro (H5ConversionTests TEST msg) if (${TEST}_COMPILE) if (${TEST}_RUN MATCHES 0) set (${TEST} 1 CACHE INTERNAL ${msg}) - message (STATUS "${msg}... yes") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... yes") + endif () else () set (${TEST} "" CACHE INTERNAL ${msg}) - message (STATUS "${msg}... no") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... no") + endif () file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test ${TEST} Run failed with the following output and exit code:\n ${OUTPUT}\n" ) endif () else () set (${TEST} "" CACHE INTERNAL ${msg}) - message (STATUS "${msg}... no") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... no") + endif () file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test ${TEST} Compile failed with the following output:\n ${OUTPUT}\n" ) diff --git a/config/cmake/HDF5PluginMacros.cmake b/config/cmake/HDF5PluginMacros.cmake index a858353f37f..4e05399becb 100644 --- a/config/cmake/HDF5PluginMacros.cmake +++ b/config/cmake/HDF5PluginMacros.cmake @@ -14,7 +14,9 @@ macro (EXTERNAL_PLUGIN_LIBRARY compress_type) ) endif () FetchContent_GetProperties(PLUGIN) - message (STATUS "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}") + endif () if(NOT PLUGIN_POPULATED) FetchContent_Populate(PLUGIN) include (${HDF_RESOURCES_DIR}/HDF5PluginCache.cmake) @@ -65,8 +67,10 @@ macro (EXTERNAL_PLUGIN_LIBRARY compress_type) add_dependencies (h5ex_d_zfp ${HDF5_LIBSH_TARGET}) target_include_directories (h5ex_d_zfp PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}") endif () - endif() - message (STATUS "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}") + endif () + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}") + endif () set (PLUGIN_BINARY_DIR "${plugin_BINARY_DIR}") set (PLUGIN_SOURCE_DIR "${plugin_SOURCE_DIR}") set (PLUGIN_LIBRARY "PLUGIN") diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index 4350b7afa2d..8579b7385d2 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -41,7 +41,9 @@ else () # so this one is used. #----------------------------------------------------------------------------- macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1 RETURN_VAR) - message (STATUS "Detecting Fortran ${FUNCTION_NAME}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Detecting Fortran ${FUNCTION_NAME}") + endif () file (WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90 "${SOURCE_CODE}" @@ -55,18 +57,24 @@ macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1 if (${COMPILE_RESULT_VAR}) set(${RETURN_VAR} ${RUN_RESULT_VAR}) if (${RUN_RESULT_VAR} MATCHES 0) - message (STATUS "Testing Fortran ${FUNCTION_NAME} - OK") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Testing Fortran ${FUNCTION_NAME} - OK") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the Fortran ${FUNCTION_NAME} exists passed\n" ) else () - message (STATUS "Testing Fortran ${FUNCTION_NAME} - Fail") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Testing Fortran ${FUNCTION_NAME} - Fail") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the Fortran ${FUNCTION_NAME} exists failed: ${RUN_RESULT_VAR}\n" ) endif () else () - message (STATUS "Compiling Fortran ${FUNCTION_NAME} - Fail") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Compiling Fortran ${FUNCTION_NAME} - Fail") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the Fortran ${FUNCTION_NAME} compiles failed: ${COMPILE_RESULT_VAR}\n" ) @@ -281,7 +289,9 @@ string (REGEX REPLACE " " "" pack_int_sizeof "${pack_int_sizeof}") set (PAC_FC_ALL_INTEGER_KINDS_SIZEOF "\{${pack_int_sizeof}\}") -message (STATUS "....FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "....FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}") +endif () # ********** # REALS # ********** @@ -442,7 +452,9 @@ else () # so this one is used. #----------------------------------------------------------------------------- macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR) - message (STATUS "Detecting C ${FUNCTION_NAME}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Detecting C ${FUNCTION_NAME}") + endif () if (HDF5_REQUIRED_LIBRARIES) set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}") @@ -462,22 +474,28 @@ macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR) set (${RETURN_VAR} ${OUTPUT_VAR}) - #message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - #message (STATUS "Test COMPILE_RESULT_VAR ${COMPILE_RESULT_VAR} ") - #message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - #message (STATUS "Test RUN_RESULT_VAR ${RUN_RESULT_VAR} ") - #message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + #if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + # message (TRACE "Test COMPILE_RESULT_VAR ${COMPILE_RESULT_VAR} ") + # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + # message (TRACE "Test RUN_RESULT_VAR ${RUN_RESULT_VAR} ") + # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + #endif () if (${COMPILE_RESULT_VAR}) if (${RUN_RESULT_VAR} MATCHES 1) set (${RUN_RESULT_VAR} 1 CACHE INTERNAL "Have C function ${FUNCTION_NAME}") - message (STATUS "Testing C ${FUNCTION_NAME} - OK") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Testing C ${FUNCTION_NAME} - OK") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the C ${FUNCTION_NAME} exists passed with the following output:\n" "${OUTPUT_VAR}\n\n" ) else () - message (STATUS "Testing C ${FUNCTION_NAME} - Fail") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Testing C ${FUNCTION_NAME} - Fail") + endif () set (${RUN_RESULT_VAR} 0 CACHE INTERNAL "Have C function ${FUNCTION_NAME}") file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the C ${FUNCTION_NAME} exists failed with the following output:\n" diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake index 7bbebbc9160..48da0c66269 100644 --- a/config/cmake/HDFCXXCompilerFlags.cmake +++ b/config/cmake/HDFCXXCompilerFlags.cmake @@ -14,7 +14,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED TRUE) set(CMAKE_CXX_EXTENSIONS OFF) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_SANITIZER_FLAGS} ${CMAKE_CXX_FLAGS}") -message (STATUS "Warnings Configuration: CXX default: ${CMAKE_CXX_FLAGS}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Warnings Configuration: CXX default: ${CMAKE_CXX_FLAGS}") +endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- @@ -96,7 +98,9 @@ if (NOT MSVC AND NOT MINGW) elseif (CMAKE_CXX_COMPILER_ID STREQUAL "PGI") list (APPEND HDF5_CMAKE_CXX_FLAGS "-Minform=inform") endif () - message (STATUS "CMAKE_CXX_FLAGS_GENERAL=${HDF5_CMAKE_CXX_FLAGS}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "CMAKE_CXX_FLAGS_GENERAL=${HDF5_CMAKE_CXX_FLAGS}") + endif () endif () #----------------------------------------------------------------------------- diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index 31af2f8c4b2..b8139245c6f 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -15,7 +15,9 @@ set(CMAKE_C_STANDARD_REQUIRED TRUE) set (CMAKE_C_FLAGS "${CMAKE_C99_STANDARD_COMPILE_OPTION} ${CMAKE_C_FLAGS}") set (CMAKE_C_FLAGS "${CMAKE_C_SANITIZER_FLAGS} ${CMAKE_C_FLAGS}") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_SANITIZER_FLAGS} ${CMAKE_CXX_FLAGS}") -message (STATUS "Warnings Configuration: default: ${CMAKE_C_FLAGS} : ${CMAKE_CXX_FLAGS}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Warnings Configuration: default: ${CMAKE_C_FLAGS} : ${CMAKE_CXX_FLAGS}") +endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- @@ -107,7 +109,9 @@ if (NOT MSVC AND NOT MINGW) elseif (CMAKE_C_COMPILER_ID STREQUAL "PGI") list (APPEND HDF5_CMAKE_C_FLAGS "-Minform=inform") endif () - message (STATUS "CMAKE_C_FLAGS_GENERAL=${HDF5_CMAKE_C_FLAGS}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "CMAKE_C_FLAGS_GENERAL=${HDF5_CMAKE_C_FLAGS}") + endif () endif () #----------------------------------------------------------------------------- @@ -132,7 +136,6 @@ if (NOT MSVC AND NOT MINGW) endif () endif () - if (CMAKE_C_COMPILER_ID STREQUAL "GNU") # Technically, variable-length arrays are part of the C99 standard, but # we should approach them a bit cautiously... Only needed for gcc 4.X diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake index 2bbb35d8d82..c7f085ceab2 100644 --- a/config/cmake/HDFFortranCompilerFlags.cmake +++ b/config/cmake/HDFFortranCompilerFlags.cmake @@ -10,7 +10,9 @@ # help@hdfgroup.org. # -message (STATUS "Warnings Configuration: default Fortran: ${CMAKE_Fortran_FLAGS}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Warnings Configuration: default Fortran: ${CMAKE_Fortran_FLAGS}") +endif () #----------------------------------------------------------------------------- # Option to allow the user to disable compiler warnings @@ -64,7 +66,9 @@ if (NOT MSVC AND NOT MINGW) elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "PGI") list (APPEND HDF5_CMAKE_Fortran_FLAGS "-Mfreeform" "-Mdclchk" "-Mstandard" "-Mallocatable=03") endif () - message (STATUS "HDF5_CMAKE_Fortran_FLAGS=${HDF5_CMAKE_Fortran_FLAGS}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "HDF5_CMAKE_Fortran_FLAGS=${HDF5_CMAKE_Fortran_FLAGS}") + endif () if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") diff --git a/config/cmake/fileCompareTest.cmake b/config/cmake/fileCompareTest.cmake index d913da02973..2f968fac02d 100644 --- a/config/cmake/fileCompareTest.cmake +++ b/config/cmake/fileCompareTest.cmake @@ -24,9 +24,6 @@ endif () if (NOT TEST_FUNCTION) message (FATAL_ERROR "Require TEST_FUNCTION (LT,LTEQ,EQ,GTEQ,GT) to be defined") endif () -#if (NOT TEST_EXPECT) -# message (STATUS "Require TEST_EXPECT to be defined") -#endif () set (TEST_ONE_SIZE 0) set (TEST_TWO_SIZE 0) @@ -53,7 +50,9 @@ if (TEST_STRINGS STREQUAL "YES") RESULT_VARIABLE TEST_RESULT ) - message (STATUS "COMPARE Result: ${TEST_RESULT}: ${TEST_STRING_SIZE}=${TEST_U_STRING_LEN}-${TEST_O_STRING_LEN}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "COMPARE Result: ${TEST_RESULT}: ${TEST_STRING_SIZE}=${TEST_U_STRING_LEN}-${TEST_O_STRING_LEN}") + endif () # if the return value is !=${TEST_EXPECT} bail out if (NOT TEST_RESULT EQUAL TEST_EXPECT) message (FATAL_ERROR "Failed: The output of ${TEST_FOLDER}/${TEST_ONEFILE} did not match ${TEST_FOLDER}/${TEST_TWOFILE}.\n${TEST_ERROR}") @@ -66,31 +65,41 @@ else () file (SIZE ${TEST_FOLDER}/${TEST_TWOFILE} TEST_TWO_SIZE) if (TEST_FUNCTION MATCHES "LT") if (TEST_ONE_SIZE LESS TEST_TWO_SIZE) - message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less ${TEST_FOLDER}/${TEST_TWOFILE}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less ${TEST_FOLDER}/${TEST_TWOFILE}") + endif () else () message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT less ${TEST_FOLDER}/${TEST_TWOFILE}") endif () elseif (TEST_FUNCTION MATCHES "LTEQ") if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE) - message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less or equal ${TEST_FOLDER}/${TEST_TWOFILE}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSES "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less or equal ${TEST_FOLDER}/${TEST_TWOFILE}") + endif () else () message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT less or equal ${TEST_FOLDER}/${TEST_TWOFILE}") endif () elseif (TEST_FUNCTION MATCHES "EQ") if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE) - message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was equal ${TEST_FOLDER}/${TEST_TWOFILE}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was equal ${TEST_FOLDER}/${TEST_TWOFILE}") + endif () else () message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT equal ${TEST_FOLDER}/${TEST_TWOFILE}") endif () elseif (TEST_FUNCTION MATCHES "GTEQ") if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE) - message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}") + endif () else () message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}") endif () elseif (TEST_FUNCTION MATCHES "GT") if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE) - message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater ${TEST_FOLDER}/${TEST_TWOFILE}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater ${TEST_FOLDER}/${TEST_TWOFILE}") + endif () else () message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT greater ${TEST_FOLDER}/${TEST_TWOFILE}") endif () diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index 7988772d70c..5fa6ca12acd 100644 --- a/config/cmake_ext_mod/ConfigureChecks.cmake +++ b/config/cmake_ext_mod/ConfigureChecks.cmake @@ -224,7 +224,9 @@ macro (HDF_FUNCTION_TEST OTHER_TEST) ) endif () - #message (STATUS "Performing ${OTHER_TEST}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (TRACE "Performing ${OTHER_TEST}") + endif () try_compile (${OTHER_TEST} ${CMAKE_BINARY_DIR} ${HDF_RESOURCES_EXT_DIR}/HDFTests.c @@ -234,9 +236,13 @@ macro (HDF_FUNCTION_TEST OTHER_TEST) ) if (${OTHER_TEST}) set (${HDF_PREFIX}_${OTHER_TEST} 1 CACHE INTERNAL "Other test ${FUNCTION}") - message (STATUS "Performing Other Test ${OTHER_TEST} - Success") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Performing Other Test ${OTHER_TEST} - Success") + endif () else () - message (STATUS "Performing Other Test ${OTHER_TEST} - Failed") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Performing Other Test ${OTHER_TEST} - Failed") + endif () set (${HDF_PREFIX}_${OTHER_TEST} "" CACHE INTERNAL "Other test ${FUNCTION}") file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Performing Other Test ${OTHER_TEST} failed with the following output:\n" @@ -297,17 +303,23 @@ if (MINGW OR NOT WINDOWS) set (TEST_LFS_WORKS 1 CACHE INTERNAL ${msg}) set (LARGEFILE 1) set (HDF_EXTRA_FLAGS ${HDF_EXTRA_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE) - message (STATUS "${msg}... yes") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... yes") + endif () else () set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg}) - message (STATUS "${msg}... no") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... no") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Test TEST_LFS_WORKS Run failed with the following exit code:\n ${TEST_LFS_WORKS_RUN}\n" ) endif () else () set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg}) - message (STATUS "${msg}... no") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... no") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Test TEST_LFS_WORKS Compile failed\n" ) @@ -340,11 +352,15 @@ endif () macro (HDF_CHECK_TYPE_SIZE type var) set (aType ${type}) set (aVar ${var}) -# message (STATUS "Checking size of ${aType} and storing into ${aVar}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (TRACE "Checking size of ${aType} and storing into ${aVar}") + endif () CHECK_TYPE_SIZE (${aType} ${aVar}) if (NOT ${aVar}) set (${aVar} 0 CACHE INTERNAL "SizeOf for ${aType}") -# message (STATUS "Size of ${aType} was NOT Found") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (TRACE "Size of ${aType} was NOT Found") + endif () endif () endmacro () @@ -574,7 +590,9 @@ endif () #----------------------------------------------------------------------------- if (WINDOWS) if (NOT HDF_NO_IOEO_TEST) - message (STATUS "Checking for InitOnceExecuteOnce:") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Checking for InitOnceExecuteOnce:") + endif () if (NOT DEFINED ${HDF_PREFIX}_HAVE_IOEO) if (LARGEFILE) set (CMAKE_REQUIRED_DEFINITIONS @@ -603,7 +621,9 @@ if (WINDOWS) # if the return value was 0 then it worked if ("${HAVE_IOEO_EXITCODE}" EQUAL 0) set (${HDF_PREFIX}_HAVE_IOEO 1 CACHE INTERNAL "Test InitOnceExecuteOnce") - message (STATUS "Performing Test InitOnceExecuteOnce - Success") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Performing Test InitOnceExecuteOnce - Success") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Performing C SOURCE FILE Test InitOnceExecuteOnce succeded with the following output:\n" "${OUTPUT}\n" @@ -615,7 +635,9 @@ if (WINDOWS) set (${HDF_PREFIX}_HAVE_IOEO "" CACHE INTERNAL "Test InitOnceExecuteOnce") endif () - message (STATUS "Performing Test InitOnceExecuteOnce - Failed") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Performing Test InitOnceExecuteOnce - Failed") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Performing InitOnceExecuteOnce Test failed with the following output:\n" "${OUTPUT}\n" @@ -638,7 +660,9 @@ endforeach () #----------------------------------------------------------------------------- if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES "unknown") set (PRINT_LL_FOUND 0) - message (STATUS "Checking for appropriate format for 64 bit long:") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Checking for appropriate format for 64 bit long:") + endif () set (CURRENT_TEST_DEFINITIONS "-DPRINTF_LL_WIDTH") if (${HDF_PREFIX}_SIZEOF_LONG_LONG) set (CURRENT_TEST_DEFINITIONS "${CURRENT_TEST_DEFINITIONS} -DHAVE_LONG_LONG") @@ -655,7 +679,9 @@ if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES " set (${HDF_PREFIX}_PRINTF_LL_WIDTH "\"${${HDF_PREFIX}_PRINTF_LL}\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll") set (PRINT_LL_FOUND 1) else () - message (STATUS "Width test failed with result: ${${HDF_PREFIX}_PRINTF_LL_TEST_RUN}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Width test failed with result: ${${HDF_PREFIX}_PRINTF_LL_TEST_RUN}") + endif () endif () else () file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log @@ -664,9 +690,13 @@ if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES " endif () if (PRINT_LL_FOUND) - message (STATUS "Checking for appropriate format for 64 bit long: found ${${HDF_PREFIX}_PRINTF_LL_WIDTH}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Checking for appropriate format for 64 bit long: found ${${HDF_PREFIX}_PRINTF_LL_WIDTH}") + endif () else () - message (STATUS "Checking for appropriate format for 64 bit long: not found") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Checking for appropriate format for 64 bit long: not found") + endif () set (${HDF_PREFIX}_PRINTF_LL_WIDTH "\"unknown\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll" ) diff --git a/config/cmake_ext_mod/FindSZIP.cmake b/config/cmake_ext_mod/FindSZIP.cmake index 8f882b4a5fa..6ac20994c7a 100644 --- a/config/cmake_ext_mod/FindSZIP.cmake +++ b/config/cmake_ext_mod/FindSZIP.cmake @@ -118,7 +118,9 @@ if (NOT SZIP_FOUND) "SZip was not found. Make sure SZIP_LIBRARY and SZIP_INCLUDE_DIR are set or set the SZIP_INSTALL environment variable." ) if (NOT SZIP_FIND_QUIETLY) - message (STATUS "${SZIP_DIR_MESSAGE}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${SZIP_DIR_MESSAGE}") + endif () else () if (SZIP_FIND_REQUIRED) message (FATAL_ERROR "SZip was NOT found and is Required by this project") diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index 952b766d1b5..15b51177f4c 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -28,7 +28,9 @@ macro (SET_HDF_BUILD_TYPE) endif() endif() if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - message (STATUS "Setting build type to 'RelWithDebInfo' as none was specified.") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Setting build type to 'RelWithDebInfo' as none was specified.") + endif() set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE) # Set the possible values of build type for cmake-gui set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" @@ -126,10 +128,6 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype) OUTPUT_NAME_MINSIZEREL ${LIB_RELEASE_NAME} OUTPUT_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME} ) - #get_property (target_name TARGET ${libtarget} PROPERTY OUTPUT_NAME) - #get_property (target_name_debug TARGET ${libtarget} PROPERTY OUTPUT_NAME_DEBUG) - #get_property (target_name_rwdi TARGET ${libtarget} PROPERTY OUTPUT_NAME_RELWITHDEBINFO) - #message (STATUS "${target_name} : ${target_name_debug} : ${target_name_rwdi}") if (${libtype} MATCHES "STATIC") if (WIN32) @@ -458,19 +456,19 @@ endmacro () macro (ADD_H5_FLAGS h5_flag_var infile) file (STRINGS ${infile} TEST_FLAG_STREAM) - #message (STATUS "TEST_FLAG_STREAM=${TEST_FLAG_STREAM}") + #message (TRACE "TEST_FLAG_STREAM=${TEST_FLAG_STREAM}") list (LENGTH TEST_FLAG_STREAM len_flag) if (len_flag GREATER 0) math (EXPR _FP_LEN "${len_flag} - 1") foreach (line RANGE 0 ${_FP_LEN}) list (GET TEST_FLAG_STREAM ${line} str_flag) string (REGEX REPLACE "^#.*" "" str_flag "${str_flag}") - #message (STATUS "str_flag=${str_flag}") + #message (TRACE "str_flag=${str_flag}") if (str_flag) list (APPEND ${h5_flag_var} "${str_flag}") endif () endforeach () endif () - #message (STATUS "h5_flag_var=${${h5_flag_var}}") + #message (TRACE "h5_flag_var=${${h5_flag_var}}") endmacro () diff --git a/config/cmake_ext_mod/HDFUseCXX.cmake b/config/cmake_ext_mod/HDFUseCXX.cmake index 8d981479912..efce42f0d9c 100644 --- a/config/cmake_ext_mod/HDFUseCXX.cmake +++ b/config/cmake_ext_mod/HDFUseCXX.cmake @@ -70,7 +70,9 @@ macro (HDF_CXX_FUNCTION_TEST OTHER_TEST) ) endif () - #message (STATUS "Performing ${OTHER_TEST}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (TRACE "Performing ${OTHER_TEST}") + endif () TRY_COMPILE (${OTHER_TEST} ${CMAKE_BINARY_DIR} ${HDF_RESOURCES_EXT_DIR}/HDFCXXTests.cpp @@ -80,9 +82,13 @@ macro (HDF_CXX_FUNCTION_TEST OTHER_TEST) ) if (${OTHER_TEST} EQUAL 0) set (${OTHER_TEST} 1 CACHE INTERNAL "CXX test ${FUNCTION}") - message (STATUS "Performing CXX Test ${OTHER_TEST} - Success") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Performing CXX Test ${OTHER_TEST} - Success") + endif () else () - message (STATUS "Performing CXX Test ${OTHER_TEST} - Failed") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Performing CXX Test ${OTHER_TEST} - Failed") + endif () set (${OTHER_TEST} "" CACHE INTERNAL "CXX test ${FUNCTION}") file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Performing CXX Test ${OTHER_TEST} failed with the following output:\n" diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake index 0a6a0926ddb..2da7148dc36 100644 --- a/config/cmake_ext_mod/HDFUseFortran.cmake +++ b/config/cmake_ext_mod/HDFUseFortran.cmake @@ -135,7 +135,9 @@ else () # so this one is used for a sizeof test. #----------------------------------------------------------------------------- macro (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE) - message (STATUS "Testing Fortran ${FUNCTION}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Testing Fortran ${FUNCTION}") + endif () if (HDF5_REQUIRED_LIBRARIES) set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}") @@ -153,13 +155,17 @@ else () OUTPUT_VARIABLE OUTPUT ) - # message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - # message (STATUS "Test result ${OUTPUT}") - # message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + # if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + # message (TRACE "Test result ${OUTPUT}") + # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + # endif () if (${RESULT_VAR}) set (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}") - message (STATUS "Testing Fortran ${FUNCTION} - OK") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Testing Fortran ${FUNCTION} - OK") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n" "${OUTPUT}\n\n" diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake index 758b62b177c..cf7071d5249 100644 --- a/config/cmake_ext_mod/grepTest.cmake +++ b/config/cmake_ext_mod/grepTest.cmake @@ -16,18 +16,12 @@ if (NOT TEST_PROGRAM) message (FATAL_ERROR "Require TEST_PROGRAM to be defined") endif () -#if (NOT TEST_ARGS) -# message (STATUS "Require TEST_ARGS to be defined") -#endif () if (NOT TEST_FOLDER) message (FATAL_ERROR "Require TEST_FOLDER to be defined") endif () if (NOT TEST_OUTPUT) message (FATAL_ERROR "Require TEST_OUTPUT to be defined") endif () -#if (NOT TEST_EXPECT) -# message (STATUS "Require TEST_EXPECT to be defined") -#endif () if (NOT TEST_FILTER) message (STATUS "Optional TEST_FILTER to be defined") endif () @@ -55,7 +49,9 @@ endif () if (TEST_ENV_VAR) set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}") - #message (STATUS "ENV:${TEST_ENV_VAR}=$ENV{${TEST_ENV_VAR}}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (TRACE "ENV:${TEST_ENV_VAR}=$ENV{${TEST_ENV_VAR}}") + endif () endif () # run the test program, capture the stdout/stderr and the result var diff --git a/config/cmake/libhdf5.pc.in b/config/libhdf5.pc.in similarity index 100% rename from config/cmake/libhdf5.pc.in rename to config/libhdf5.pc.in diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index be98cfbe323..37b5157a405 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -539,7 +539,7 @@ set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") configure_file ( - ${HDF_RESOURCES_DIR}/libhdf5.pc.in + ${HDF_CONFIG_DIR}/libhdf5.pc.in ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc @ONLY ) diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt index 0c9b04b6d63..1eac9fe9228 100644 --- a/hl/c++/src/CMakeLists.txt +++ b/hl/c++/src/CMakeLists.txt @@ -109,7 +109,7 @@ set (_PKG_CONFIG_REQUIRES "${HDF5_HL_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_HL_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") configure_file ( - ${HDF_RESOURCES_DIR}/libhdf5.pc.in + ${HDF_CONFIG_DIR}/libhdf5.pc.in ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_CPP_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc @ONLY ) diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index d35ca3b639c..0b7795b45de 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -342,7 +342,7 @@ set (_PKG_CONFIG_REQUIRES "${HDF5_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") configure_file ( - ${HDF_RESOURCES_DIR}/libhdf5.pc.in + ${HDF_CONFIG_DIR}/libhdf5.pc.in ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc @ONLY ) diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt index 91953b00804..785bdcfc784 100644 --- a/hl/src/CMakeLists.txt +++ b/hl/src/CMakeLists.txt @@ -141,7 +141,7 @@ set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") configure_file ( - ${HDF_RESOURCES_DIR}/libhdf5.pc.in + ${HDF_CONFIG_DIR}/libhdf5.pc.in ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc @ONLY ) diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt index 416e495707e..5c79bd3b700 100644 --- a/java/CMakeLists.txt +++ b/java/CMakeLists.txt @@ -9,10 +9,14 @@ find_package (Java) #----------------------------------------------------------------------------- include (${HDF_RESOURCES_DIR}/UseJava.cmake) -message (STATUS "JAVA: JAVA_HOME=$ENV{JAVA_HOME} JAVA_ROOT=$ENV{JAVA_ROOT}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "JAVA: JAVA_HOME=$ENV{JAVA_HOME} JAVA_ROOT=$ENV{JAVA_ROOT}") +endif () find_package (JNI) -message (STATUS "JNI_LIBRARIES=${JNI_LIBRARIES}") -message (STATUS "JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "JNI_LIBRARIES=${JNI_LIBRARIES}") + message (VERBOSE "JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}") +endif () if (WIN32) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 6eb36fe2299..2825545d8c0 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -205,6 +205,14 @@ New Features Tools: ------ + - h5repack added help text for user-defined filters. + + Added help text line that states the valid values of the filter flag + for user-defined filters; + filter_flag: 1 is OPTIONAL or 0 is MANDATORY + + (ADB - 2021/01/14, HDFFV-11099) + - h5repack added options to control how external links are handled. Currently h5repack preserves external links and cannot copy and merge @@ -323,6 +331,18 @@ Bug Fixes since HDF5-1.12.0 release Configuration ------------- + - Reclassify CMake messages, to allow new modes and --log-level option + + CMake message commands have a mode argument. By default, STATUS mode + was chosen for any non-error message. CMake version 3.15 added additional + modes, NOTICE, VERBOSE, DEBUG and TRACE. All message commands with a mode + of STATUS were reviewed and most were reclassified as VERBOSE. The new + mode was protected by a check for a CMake version of at least 3.15. If CMake + version 3.17 or above is used, the user can use the command line option + of "--log-level" to further restrict which message commands are displayed. + + (ADB - 2021/01/11, HDFFV-11144) + - Fixes Autotools determination of the stat struct having an st_blocks field A missing parenthesis in an autoconf macro prevented building the test @@ -332,7 +352,7 @@ Bug Fixes since HDF5-1.12.0 release CMake. This #define is only used in the tests and does not affect the HDF5 C library. - (DER - 2021/07/01, HDFFV-11201) + (DER - 2021/01/07, HDFFV-11201) Tools: diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b15ca065d33..d7a62ec26c1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -440,6 +440,7 @@ set (H5MP_HDRS ) IDE_GENERATED_PROPERTIES ("H5MP" "${H5MP_HDRS}" "${H5MP_SOURCES}" ) + set (H5O_SOURCES ${HDF5_SRC_DIR}/H5O.c ${HDF5_SRC_DIR}/H5Oainfo.c @@ -1003,7 +1004,7 @@ if (HDF5_GENERATE_HEADERS) ) message(STATUS ${SCRIPT_OUTPUT}) else () - message (STATUS "Cannot generate headers - perl not found") + message (WARNING "Cannot generate headers - perl not found") endif () endif () @@ -1335,7 +1336,7 @@ set (_PKG_CONFIG_REQUIRES) set (_PKG_CONFIG_REQUIRES_PRIVATE) configure_file ( - ${HDF_RESOURCES_DIR}/libhdf5.pc.in + ${HDF_CONFIG_DIR}/libhdf5.pc.in ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc @ONLY ) diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index 34b3c10468a..14298425b55 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -80,39 +80,8 @@ struct handler_t { */ /* The following initialization makes use of C language concatenating */ /* "xxx" "yyy" into "xxxyyy". */ -static const char * s_opts = "hn*peyBHirVa:c:d:f:g:k:l:t:w:xD:uX:o*b*F:s:S:A*q:z:m:RE*CM:O*N:vG:"; -static struct long_options l_opts[] = {{"help", no_arg, 'h'}, - {"hel", no_arg, 'h'}, - {"contents", optional_arg, 'n'}, - {"properties", no_arg, 'p'}, - {"superblock", no_arg, 'B'}, - {"boot-block", no_arg, 'B'}, - {"boot-bloc", no_arg, 'B'}, - {"boot-blo", no_arg, 'B'}, - {"boot-bl", no_arg, 'B'}, - {"boot-b", no_arg, 'B'}, - {"boot", no_arg, 'B'}, - {"boo", no_arg, 'B'}, - {"bo", no_arg, 'B'}, - {"header", no_arg, 'H'}, - {"heade", no_arg, 'H'}, - {"head", no_arg, 'H'}, - {"hea", no_arg, 'H'}, - {"object-ids", no_arg, 'i'}, - {"object-id", no_arg, 'i'}, - {"object-i", no_arg, 'i'}, - {"object", no_arg, 'i'}, - {"objec", no_arg, 'i'}, - {"obje", no_arg, 'i'}, - {"obj", no_arg, 'i'}, - {"ob", no_arg, 'i'}, - {"version", no_arg, 'V'}, - {"versio", no_arg, 'V'}, - {"versi", no_arg, 'V'}, - {"vers", no_arg, 'V'}, - {"ver", no_arg, 'V'}, - {"ve", no_arg, 'V'}, - {"attribute", require_arg, 'a'}, +static const char * s_opts = "a:b*c:d:ef:g:hik:l:m:n*o*pq:rs:t:uvw:xyz:A*BCD:E*F:G:HM:N:O*RS:VX:"; +static struct long_options l_opts[] = {{"attribute", require_arg, 'a'}, {"attribut", require_arg, 'a'}, {"attribu", require_arg, 'a'}, {"attrib", require_arg, 'a'}, @@ -120,10 +89,7 @@ static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"attr", require_arg, 'a'}, {"att", require_arg, 'a'}, {"at", require_arg, 'a'}, - {"block", require_arg, 'k'}, - {"bloc", require_arg, 'k'}, - {"blo", require_arg, 'k'}, - {"bl", require_arg, 'k'}, + {"binary", optional_arg, 'b'}, {"count", require_arg, 'c'}, {"coun", require_arg, 'c'}, {"cou", require_arg, 'c'}, @@ -131,10 +97,7 @@ static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"dataset", require_arg, 'd'}, {"datase", require_arg, 'd'}, {"datas", require_arg, 'd'}, - {"datatype", require_arg, 't'}, - {"datatyp", require_arg, 't'}, - {"dataty", require_arg, 't'}, - {"datat", require_arg, 't'}, + {"escape", no_arg, 'e'}, {"filedriver", require_arg, 'f'}, {"filedrive", require_arg, 'f'}, {"filedriv", require_arg, 'f'}, @@ -148,24 +111,44 @@ static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"grou", require_arg, 'g'}, {"gro", require_arg, 'g'}, {"gr", require_arg, 'g'}, - {"output", optional_arg, 'o'}, - {"outpu", optional_arg, 'o'}, - {"outp", optional_arg, 'o'}, - {"out", optional_arg, 'o'}, - {"ou", optional_arg, 'o'}, + {"help", no_arg, 'h'}, + {"hel", no_arg, 'h'}, + {"object-ids", no_arg, 'i'}, + {"object-id", no_arg, 'i'}, + {"object-i", no_arg, 'i'}, + {"object", no_arg, 'i'}, + {"objec", no_arg, 'i'}, + {"obje", no_arg, 'i'}, + {"obj", no_arg, 'i'}, + {"ob", no_arg, 'i'}, + {"block", require_arg, 'k'}, + {"bloc", require_arg, 'k'}, + {"blo", require_arg, 'k'}, + {"bl", require_arg, 'k'}, {"soft-link", require_arg, 'l'}, {"soft-lin", require_arg, 'l'}, {"soft-li", require_arg, 'l'}, {"soft-l", require_arg, 'l'}, {"soft", require_arg, 'l'}, {"sof", require_arg, 'l'}, + {"format", require_arg, 'm'}, + {"contents", optional_arg, 'n'}, + {"output", optional_arg, 'o'}, + {"outpu", optional_arg, 'o'}, + {"outp", optional_arg, 'o'}, + {"out", optional_arg, 'o'}, + {"ou", optional_arg, 'o'}, + {"properties", no_arg, 'p'}, + {"sort_by", require_arg, 'q'}, + {"string", no_arg, 'r'}, + {"strin", no_arg, 'r'}, {"start", require_arg, 's'}, {"star", require_arg, 's'}, {"sta", require_arg, 's'}, - {"stride", require_arg, 'S'}, - {"strid", require_arg, 'S'}, - {"string", no_arg, 'r'}, - {"strin", no_arg, 'r'}, + {"datatype", require_arg, 't'}, + {"datatyp", require_arg, 't'}, + {"dataty", require_arg, 't'}, + {"datat", require_arg, 't'}, {"use-dtd", no_arg, 'u'}, {"use-dt", no_arg, 'u'}, {"use-d", no_arg, 'u'}, @@ -173,33 +156,50 @@ static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"use", no_arg, 'u'}, {"us", no_arg, 'u'}, {"u", no_arg, 'u'}, + {"vds-view-first-missing", no_arg, 'v'}, {"width", require_arg, 'w'}, {"widt", require_arg, 'w'}, {"wid", require_arg, 'w'}, {"wi", require_arg, 'w'}, - {"xml-dtd", require_arg, 'D'}, - {"xml-dt", require_arg, 'D'}, - {"xml-d", require_arg, 'D'}, - {"xml-ns", require_arg, 'X'}, - {"xml-n", require_arg, 'X'}, {"xml", no_arg, 'x'}, {"xm", no_arg, 'x'}, - {"onlyattr", optional_arg, 'A'}, - {"escape", no_arg, 'e'}, {"noindex", no_arg, 'y'}, - {"binary", optional_arg, 'b'}, - {"form", require_arg, 'F'}, - {"sort_by", require_arg, 'q'}, {"sort_order", require_arg, 'z'}, - {"format", require_arg, 'm'}, - {"region", no_arg, 'R'}, + {"onlyattr", optional_arg, 'A'}, + {"superblock", no_arg, 'B'}, + {"boot-block", no_arg, 'B'}, + {"boot-bloc", no_arg, 'B'}, + {"boot-blo", no_arg, 'B'}, + {"boot-bl", no_arg, 'B'}, + {"boot-b", no_arg, 'B'}, + {"boot", no_arg, 'B'}, + {"boo", no_arg, 'B'}, + {"bo", no_arg, 'B'}, + {"no-compact-subset", no_arg, 'C'}, + {"xml-dtd", require_arg, 'D'}, + {"xml-dt", require_arg, 'D'}, + {"xml-d", require_arg, 'D'}, {"enable-error-stack", optional_arg, 'E'}, + {"form", require_arg, 'F'}, + {"vds-gap-size", require_arg, 'G'}, + {"header", no_arg, 'H'}, + {"heade", no_arg, 'H'}, + {"head", no_arg, 'H'}, + {"hea", no_arg, 'H'}, {"packed-bits", require_arg, 'M'}, - {"no-compact-subset", no_arg, 'C'}, - {"ddl", optional_arg, 'O'}, {"any_path", require_arg, 'N'}, - {"vds-view-first-missing", no_arg, 'v'}, - {"vds-gap-size", require_arg, 'G'}, + {"ddl", optional_arg, 'O'}, + {"region", no_arg, 'R'}, + {"stride", require_arg, 'S'}, + {"strid", require_arg, 'S'}, + {"version", no_arg, 'V'}, + {"versio", no_arg, 'V'}, + {"versi", no_arg, 'V'}, + {"vers", no_arg, 'V'}, + {"ver", no_arg, 'V'}, + {"ve", no_arg, 'V'}, + {"xml-ns", require_arg, 'X'}, + {"xml-n", require_arg, 'X'}, {"s3-cred", require_arg, '$'}, {"hdfs-attrs", require_arg, '#'}, {"vol-value", require_arg, '1'}, diff --git a/tools/src/h5dump/h5dump.h b/tools/src/h5dump/h5dump.h index b4198ad7a50..9392ca33c49 100644 --- a/tools/src/h5dump/h5dump.h +++ b/tools/src/h5dump/h5dump.h @@ -83,7 +83,7 @@ typedef struct { dump_opt_t dump_opts = {TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, 0}; -#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */ +#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */ #define PACKED_BITS_SIZE_MAX (8 * sizeof(long long)) /* Maximum bits size of integer types of packed-bits */ /* mask list for packed bits */ unsigned long long packed_mask[PACKED_BITS_MAX]; /* packed bits are restricted to 8*sizeof(llong) bytes */ diff --git a/tools/src/h5dump/h5dump_extern.h b/tools/src/h5dump/h5dump_extern.h index 6ccd15951f1..56734cf8207 100644 --- a/tools/src/h5dump/h5dump_extern.h +++ b/tools/src/h5dump/h5dump_extern.h @@ -80,7 +80,7 @@ typedef struct { } dump_opt_t; extern dump_opt_t dump_opts; -#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */ +#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */ #define PACKED_BITS_SIZE_MAX 8 * sizeof(long long) /* Maximum bits size of integer types of packed-bits */ /* mask list for packed bits */ extern unsigned long long diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index c38dd66c71d..a67d6acb1e2 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -262,6 +262,7 @@ usage(const char *prog) PRINTVALSTREAM(rawoutstream, " Required values: filter_number, filter_flag, cd_value_count, value1\n"); PRINTVALSTREAM(rawoutstream, " Optional values: value2 to valueN\n"); + PRINTVALSTREAM(rawoutstream, " filter_flag: 1 is OPTIONAL or 0 is MANDATORY\n"); PRINTVALSTREAM(rawoutstream, " NONE (no parameter)\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " LAYT - is a string with the format:\n"); diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c index 85abb8af4d9..9236828ed88 100644 --- a/tools/src/misc/h5debug.c +++ b/tools/src/misc/h5debug.c @@ -67,7 +67,6 @@ * Return: Non-NULL on success/NULL on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Sep 11 2008 * *------------------------------------------------------------------------- @@ -149,7 +148,6 @@ get_H5B2_class(const uint8_t *sig) * Return: Non-NULL on success/NULL on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Sep 11 2008 * *------------------------------------------------------------------------- @@ -191,7 +189,6 @@ get_H5EA_class(const uint8_t *sig) * Return: Non-NULL on success/NULL on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Sep 11 2008 * *------------------------------------------------------------------------- diff --git a/tools/test/h5jam/getub.c b/tools/test/h5jam/getub.c index 9e9cd4dfc06..80e0c66cde7 100644 --- a/tools/test/h5jam/getub.c +++ b/tools/test/h5jam/getub.c @@ -138,14 +138,15 @@ main(int argc, const char *argv[]) } /* end if */ /* close things and exit */ + HDfree(filename); HDfree(buf); HDclose(fd); return EXIT_SUCCESS; error: - if (buf) - HDfree(buf); + HDfree(filename); + HDfree(buf); if (fd >= 0) HDclose(fd); return EXIT_FAILURE; diff --git a/tools/test/h5repack/testfiles/h5repack-help.txt b/tools/test/h5repack/testfiles/h5repack-help.txt index e12838df3b5..cb10d22597d 100644 --- a/tools/test/h5repack/testfiles/h5repack-help.txt +++ b/tools/test/h5repack/testfiles/h5repack-help.txt @@ -136,6 +136,7 @@ usage: h5repack [OPTIONS] file1 file2 UD= Required values: filter_number, filter_flag, cd_value_count, value1 Optional values: value2 to valueN + filter_flag: 1 is OPTIONAL or 0 is MANDATORY NONE (no parameter) LAYT - is a string with the format: diff --git a/tools/test/perform/chunk_cache.c b/tools/test/perform/chunk_cache.c index 3a6a209fb4b..1df409c24b4 100644 --- a/tools/test/perform/chunk_cache.c +++ b/tools/test/perform/chunk_cache.c @@ -98,7 +98,7 @@ create_dset1(hid_t file) hid_t dcpl = H5I_INVALID_HID; hsize_t dims[RANK] = {DSET1_DIM1, DSET1_DIM2}; hsize_t chunk_dims[RANK] = {CHUNK1_DIM1, CHUNK1_DIM2}; - int ** data; /* data for writing */ + int ** data = NULL; /* data for writing */ /* Create the data space. */ if ((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0) @@ -134,6 +134,7 @@ create_dset1(hid_t file) H5Dclose(dataset); H5Pclose(dcpl); H5Sclose(dataspace); + HDfree(data); return 0; error: @@ -144,6 +145,7 @@ create_dset1(hid_t file) H5Sclose(dataspace); } H5E_END_TRY; + HDfree(data); return 1; } @@ -160,7 +162,7 @@ create_dset2(hid_t file) hid_t dcpl = H5I_INVALID_HID; hsize_t dims[RANK] = {DSET2_DIM1, DSET2_DIM2}; hsize_t chunk_dims[RANK] = {CHUNK2_DIM1, CHUNK2_DIM2}; - int ** data; /* data for writing */ + int ** data = NULL; /* data for writing */ /* Create the data space. */ if ((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0) @@ -195,6 +197,7 @@ create_dset2(hid_t file) H5Dclose(dataset); H5Pclose(dcpl); H5Sclose(dataspace); + HDfree(data); return 0; @@ -206,6 +209,7 @@ create_dset2(hid_t file) H5Sclose(dataspace); } H5E_END_TRY; + HDfree(data); return 1; } From 317148f2542e7b43695e1700777a8baee14f6c6d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Sun, 17 Jan 2021 06:59:39 -0600 Subject: [PATCH 04/25] Move problem option to bottom of the list until fixed --- tools/src/h5dump/h5dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index 14298425b55..5e7d2df6d3a 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -161,8 +161,6 @@ static struct long_options l_opts[] = {{"attribute", require_arg, 'a'}, {"widt", require_arg, 'w'}, {"wid", require_arg, 'w'}, {"wi", require_arg, 'w'}, - {"xml", no_arg, 'x'}, - {"xm", no_arg, 'x'}, {"noindex", no_arg, 'y'}, {"sort_order", require_arg, 'z'}, {"onlyattr", optional_arg, 'A'}, @@ -200,6 +198,8 @@ static struct long_options l_opts[] = {{"attribute", require_arg, 'a'}, {"ve", no_arg, 'V'}, {"xml-ns", require_arg, 'X'}, {"xml-n", require_arg, 'X'}, + {"xml", no_arg, 'x'}, + {"xm", no_arg, 'x'}, {"s3-cred", require_arg, '$'}, {"hdfs-attrs", require_arg, '#'}, {"vol-value", require_arg, '1'}, From 3cdb2729cbade47d7c9917e69af8d0506f23f075 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 19 Jan 2021 09:30:00 -0600 Subject: [PATCH 05/25] HDFFV-11106 - fix parsing optional args --- tools/lib/h5tools_utils.c | 46 ++++++++++++++++++-------------- tools/src/h5diff/h5diff_common.c | 30 +++++++++------------ tools/src/h5dump/h5dump.c | 4 +-- 3 files changed, 40 insertions(+), 40 deletions(-) diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index aa2418d6f19..9c5999b871d 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -194,44 +194,50 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti if (sp == 1 && argv[opt_ind][0] == '-' && argv[opt_ind][1] == '-') { /* long command line option */ - const char *arg = &argv[opt_ind][2]; int i; + const char ch = '='; + char *arg = &argv[opt_ind][2]; + size_t arg_len = 0; + + opt_arg = strchr(&argv[opt_ind][2], ch); + arg_len = HDstrlen(&argv[opt_ind][2]); + if (opt_arg) { + arg_len -= HDstrlen(opt_arg); + opt_arg++; /* skip the equal sign */ + } + arg[arg_len] = 0; for (i = 0; l_opts && l_opts[i].name; i++) { size_t len = HDstrlen(l_opts[i].name); - if (HDstrncmp(arg, l_opts[i].name, len) == 0) { + if (HDstrcmp(arg, l_opts[i].name) == 0) { /* we've found a matching long command line flag */ opt_opt = l_opts[i].shortval; if (l_opts[i].has_arg != no_arg) { - if (arg[len] == '=') { - opt_arg = &arg[len + 1]; - } - else if (l_opts[i].has_arg != optional_arg) { - if (opt_ind < (argc - 1)) - if (argv[opt_ind + 1][0] != '-') - opt_arg = argv[++opt_ind]; - } - else if (l_opts[i].has_arg == require_arg) { - if (opt_err) - HDfprintf(rawerrorstream, "%s: option required for \"--%s\" flag\n", argv[0], - arg); - - opt_opt = '?'; + if (opt_arg == NULL) { + if (l_opts[i].has_arg != optional_arg) { + if (opt_ind < (argc - 1)) + if (argv[opt_ind + 1][0] != '-') + opt_arg = argv[++opt_ind]; + } + else if (l_opts[i].has_arg == require_arg) { + if (opt_err) + HDfprintf(rawerrorstream, "%s: option required for \"--%s\" flag\n", argv[0], + arg); + + opt_opt = '?'; + } } - else - opt_arg = NULL; } else { - if (arg[len] == '=') { + if (opt_arg) { if (opt_err) HDfprintf(rawerrorstream, "%s: no option required for \"%s\" flag\n", argv[0], arg); opt_opt = '?'; } - opt_arg = NULL; } break; } diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c index 95245bdeb45..5646e2a772a 100644 --- a/tools/src/h5diff/h5diff_common.c +++ b/tools/src/h5diff/h5diff_common.c @@ -25,7 +25,7 @@ static int check_d_input(const char *); * Command-line options: The user can specify short or long-named * parameters. */ -static const char * s_opts = "hVrv:qn:d:p:NcelxE:A:S"; +static const char * s_opts = "hVrv*qn:d:p:NcelxE:A:S"; static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"version", no_arg, 'V'}, {"report", no_arg, 'r'}, @@ -253,33 +253,27 @@ parse_command_line(int argc, const char *argv[], const char **fname1, const char case 'v': opts->mode_verbose = 1; - /* This for loop is for handling style like - * -v, -v1, --verbose, --verbose=1. - */ for (i = 1; i < argc; i++) { /* - * short opt + * special check for short opt */ - if (!strcmp(argv[i], "-v")) { /* no arg */ - opt_ind--; + if (!strcmp(argv[i], "-v")) { + if (opt_arg != NULL) + opt_ind--; opts->mode_verbose_level = 0; break; } else if (!strncmp(argv[i], "-v", (size_t)2)) { + if (opt_arg != NULL) + opt_ind--; opts->mode_verbose_level = atoi(&argv[i][2]); break; } - - /* - * long opt - */ - if (!strcmp(argv[i], "--verbose")) { /* no arg */ - opts->mode_verbose_level = 0; - break; - } - else if (!strncmp(argv[i], "--verbose", (size_t)9) && argv[i][9] == '=') { - opts->mode_verbose_level = atoi(&argv[i][10]); - break; + else { + if (opt_arg != NULL) + opts->mode_verbose_level = HDatoi(opt_arg); + else + opts->mode_verbose_level = 0; } } break; diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index 5e7d2df6d3a..14298425b55 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -161,6 +161,8 @@ static struct long_options l_opts[] = {{"attribute", require_arg, 'a'}, {"widt", require_arg, 'w'}, {"wid", require_arg, 'w'}, {"wi", require_arg, 'w'}, + {"xml", no_arg, 'x'}, + {"xm", no_arg, 'x'}, {"noindex", no_arg, 'y'}, {"sort_order", require_arg, 'z'}, {"onlyattr", optional_arg, 'A'}, @@ -198,8 +200,6 @@ static struct long_options l_opts[] = {{"attribute", require_arg, 'a'}, {"ve", no_arg, 'V'}, {"xml-ns", require_arg, 'X'}, {"xml-n", require_arg, 'X'}, - {"xml", no_arg, 'x'}, - {"xm", no_arg, 'x'}, {"s3-cred", require_arg, '$'}, {"hdfs-attrs", require_arg, '#'}, {"vol-value", require_arg, '1'}, From 2ccd184c99375bb6279d6d78c7a331430ecbcc71 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 19 Jan 2021 10:17:00 -0600 Subject: [PATCH 06/25] HDFFV-11106 add note --- release_docs/RELEASE.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 2825545d8c0..a6beaed6882 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -355,13 +355,20 @@ Bug Fixes since HDF5-1.12.0 release (DER - 2021/01/07, HDFFV-11201) - Tools: - ------ + Tools + ----- + - Fixed tools argument parsing. + + Tools parsing used the length of the option from the long array to match + the option from the command line. This incorrectly matched a shorter long + name option that was happened to be a subset of another long option. + Changed to match whole names. + + (ADB - 2021/01/19, HDFFV-11106) Fortran API ----------- - - Fixed configure issue when building HDF5 with NAG Fortran 7.0. HDF5 now accounts for the addition of half-precision floating-point @@ -369,12 +376,14 @@ Bug Fixes since HDF5-1.12.0 release (MSB - 2020/02/28, HDFFV-11033) + High-Level Library ------------------ - Eliminated unnecessary code in H5DOappend(), improving its performance. (QAK - 2020/06/05) + Testing ------- - Stopped java/test/junit.sh.in installing libs for testing under ${prefix} From 0d0f7db84b99854cc54d5d1caa71e5bacf437a45 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 19 Jan 2021 14:49:35 -0600 Subject: [PATCH 07/25] grammer fix --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3626a2013e7..58874cf2e75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,7 @@ set (CMAKE_IGNORE_EOL "--ignore-eol") if (CMAKE_VERSION VERSION_LESS "3.14.0") set (CMAKE_IGNORE_EOL "") if (WIN32) - message (FATAL_ERROR "Windows builds requires a minimum of CMake 3.14") + message (FATAL_ERROR "Windows builds require a minimum of CMake 3.14") endif() endif () From 7839aa8f887d543e41acf3cb99776011e1da73fb Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 27 Jan 2021 13:12:46 -0600 Subject: [PATCH 08/25] Whitespace after clang formatting --- c++/test/th5s.cpp | 2 +- hl/tools/gif2h5/gifread.c | 2 +- hl/tools/gif2h5/hdfgifwr.c | 2 +- src/H5.c | 10 +- src/H5Aprivate.h | 8 +- src/H5Apublic.h | 24 +-- src/H5C.c | 2 +- src/H5CX.c | 6 +- src/H5Dpkg.h | 6 +- src/H5Dvirtual.c | 4 +- src/H5EAtest.c | 6 +- src/H5F.c | 2 +- src/H5FAtest.c | 8 +- src/H5FDhdfs.c | 14 +- src/H5FScache.c | 9 +- src/H5Fint.c | 4 +- src/H5Fprivate.h | 71 ++++----- src/H5Fpublic.h | 244 +++++++++++++++--------------- src/H5Gnode.c | 2 +- src/H5Gprivate.h | 4 +- src/H5Gpublic.h | 2 +- src/H5HFcache.c | 6 +- src/H5Iint.c | 7 +- src/H5Ipkg.h | 8 +- src/H5Ipublic.h | 4 +- src/H5MM.c | 3 +- src/H5MMprivate.h | 6 +- src/H5Oprivate.h | 30 ++-- src/H5Opublic.h | 24 +-- src/H5PLpublic.h | 4 +- src/H5Pint.c | 4 +- src/H5Ppkg.h | 3 +- src/H5Ppublic.h | 104 ++++++------- src/H5Spkg.h | 46 +++--- src/H5Spoint.c | 16 +- src/H5Spublic.h | 12 +- src/H5TS.c | 4 +- src/H5Tpkg.h | 3 +- src/H5Tprivate.h | 8 +- src/H5Tpublic.h | 188 +++++++++++------------ src/H5Tref.c | 8 +- src/H5VL.c | 3 +- src/H5VLcallback.c | 2 +- src/H5VLint.c | 10 +- src/H5VLnative.c | 36 ++--- src/H5VLprivate.h | 2 +- src/H5VLpublic.h | 30 ++-- src/H5Znbit.c | 12 +- src/H5Zpublic.h | 16 +- src/H5Zscaleoffset.c | 18 +-- src/H5Zshuffle.c | 2 +- src/H5Ztrans.c | 28 ++-- src/H5public.h | 10 +- src/H5win32defs.h | 2 +- test/accum.c | 2 +- test/cache_common.h | 3 +- test/cache_tagging.c | 54 +++---- test/chunk_info.c | 2 +- test/dsets.c | 8 +- test/fheap.c | 51 ++++--- test/h5test.c | 2 +- test/hdfs.c | 3 +- test/links.c | 10 +- test/s3comms.c | 2 +- test/swmr_generator.c | 2 +- test/swmr_sparse_writer.c | 4 +- test/tattr.c | 8 +- test/th5o.c | 4 +- test/th5s.c | 4 +- test/tmisc.c | 12 +- test/tsohm.c | 8 +- test/use_disable_mdc_flushes.c | 6 +- test/vfd.c | 12 +- test/vol.c | 19 ++- testpar/t_chunk_alloc.c | 2 +- testpar/t_mpi.c | 6 +- testpar/testphdf5.h | 102 ++++++------- tools/lib/h5tools_utils.c | 10 +- tools/test/h5dump/h5dumpgentest.c | 4 +- 79 files changed, 728 insertions(+), 703 deletions(-) diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp index 8709c25f731..4cce6246092 100644 --- a/c++/test/th5s.cpp +++ b/c++/test/th5s.cpp @@ -33,7 +33,7 @@ using namespace H5; #include "h5test.h" #include "h5cpputil.h" // C++ utilility header file -#include "H5srcdir.h" // srcdir querying header file +#include "H5srcdir.h" // srcdir querying header file const H5std_string TESTFILE("th5s.h5"); const H5std_string DATAFILE("th5s1.h5"); diff --git a/hl/tools/gif2h5/gifread.c b/hl/tools/gif2h5/gifread.c index 705e6f3965f..a4210c3132a 100644 --- a/hl/tools/gif2h5/gifread.c +++ b/hl/tools/gif2h5/gifread.c @@ -354,7 +354,7 @@ ReadDataSubBlocks(GIFBYTE **MemGif2, /* GIF image file input FILE stream #ifdef COMMENTED_OUT *ptr1++ = dataSize; /* Write the data count */ #endif /* COMMENTED_OUT */ - while (dataSize--) /* Read/write the Plain Text data */ + while (dataSize--) /* Read/write the Plain Text data */ *ptr1++ = *(*MemGif2)++; /* Check if there is another data sub-block */ diff --git a/hl/tools/gif2h5/hdfgifwr.c b/hl/tools/gif2h5/hdfgifwr.c index 7be68dcebd1..63e92a5842a 100644 --- a/hl/tools/gif2h5/hdfgifwr.c +++ b/hl/tools/gif2h5/hdfgifwr.c @@ -73,7 +73,7 @@ static unsigned long cur_accum = 0; static int cur_bits = 0; #define MAXCODE(n_bits) ((1 << (n_bits)) - 1) -#define XV_BITS 12 /* BITS was already defined on some systems */ +#define XV_BITS 12 /* BITS was already defined on some systems */ #define HSIZE 5003 /* 80% occupancy */ typedef unsigned char char_type; diff --git a/src/H5.c b/src/H5.c index d31595095a5..f4b9a8dc929 100644 --- a/src/H5.c +++ b/src/H5.c @@ -101,12 +101,12 @@ DESCRIPTION herr_t H5__init_package(void) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT /* Run the library initialization routine, if it hasn't already ran */ - if (!H5_INIT_GLOBAL && !H5_TERM_GLOBAL) { \ + if (!H5_INIT_GLOBAL && !H5_TERM_GLOBAL) { if (H5_init_library() < 0) HGOTO_ERROR(H5E_LIB, H5E_CANTINIT, FAIL, "unable to initialize library") } /* end if */ @@ -137,7 +137,7 @@ H5_init_library(void) /* Set the 'library initialized' flag as early as possible, to avoid * possible re-entrancy. */ - H5_INIT_GLOBAL = TRUE; \ + H5_INIT_GLOBAL = TRUE; FUNC_ENTER_NOAPI(FAIL) @@ -404,7 +404,7 @@ H5_term_library(void) HDfprintf(stderr, " %s\n", loop); #ifndef NDEBUG HDabort(); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end if */ } /* end if */ @@ -1116,7 +1116,7 @@ H5is_library_threadsafe(hbool_t *is_ts) /* At this time, it is impossible for this to fail. */ #ifdef H5_HAVE_THREADSAFE *is_ts = TRUE; -#else /* H5_HAVE_THREADSAFE */ +#else /* H5_HAVE_THREADSAFE */ *is_ts = FALSE; #endif /* H5_HAVE_THREADSAFE */ diff --git a/src/H5Aprivate.h b/src/H5Aprivate.h index 41641546a24..69fba408da2 100644 --- a/src/H5Aprivate.h +++ b/src/H5Aprivate.h @@ -43,8 +43,8 @@ typedef herr_t (*H5A_lib_iterate_t)(const H5A_t *attr, void *op_data); /* Describe kind of callback to make for each attribute */ typedef enum H5A_attr_iter_op_type_t { #ifndef H5_NO_DEPRECATED_SYMBOLS - H5A_ATTR_OP_APP, /* Application callback */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + H5A_ATTR_OP_APP, /* Application callback */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ H5A_ATTR_OP_APP2, /* Revised application callback */ H5A_ATTR_OP_LIB /* Library internal callback */ } H5A_attr_iter_op_type_t; @@ -53,8 +53,8 @@ typedef struct H5A_attr_iter_op_t { H5A_attr_iter_op_type_t op_type; union { #ifndef H5_NO_DEPRECATED_SYMBOLS - H5A_operator1_t app_op; /* Application callback for each attribute */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + H5A_operator1_t app_op; /* Application callback for each attribute */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ H5A_operator2_t app_op2; /* Revised application callback for each attribute */ H5A_lib_iterate_t lib_op; /* Library internal callback for each attribute */ } u; diff --git a/src/H5Apublic.h b/src/H5Apublic.h index 3b836e7dbd4..c4403a0ea77 100644 --- a/src/H5Apublic.h +++ b/src/H5Apublic.h @@ -65,7 +65,7 @@ extern "C" { * * \see H5Acreate(), H5Aopen() */ -H5_DLL herr_t H5Aclose(hid_t attr_id); +H5_DLL herr_t H5Aclose(hid_t attr_id); /* --------------------------------------------------------------------------*/ /** * \ingroup H5A @@ -113,8 +113,8 @@ H5_DLL herr_t H5Aclose(hid_t attr_id); * \see H5Aclose() * */ -H5_DLL hid_t H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id, hid_t acpl_id, - hid_t aapl_id); +H5_DLL hid_t H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id, hid_t acpl_id, + hid_t aapl_id); /*--------------------------------------------------------------------------*/ /** * \ingroup H5A @@ -162,8 +162,8 @@ H5_DLL hid_t H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hi * \since 1.8.0 * */ -H5_DLL hid_t H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t type_id, - hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t lapl_id); +H5_DLL hid_t H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t type_id, + hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t lapl_id); /*--------------------------------------------------------------------------*/ /** * \ingroup H5A @@ -194,7 +194,7 @@ H5_DLL hid_t H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char * * \see H5Aclose(), H5Acreate() */ -H5_DLL hid_t H5Aopen(hid_t obj_id, const char *attr_name, hid_t aapl_id); +H5_DLL hid_t H5Aopen(hid_t obj_id, const char *attr_name, hid_t aapl_id); /*--------------------------------------------------------------------------*/ /** * \ingroup H5A @@ -240,8 +240,8 @@ H5_DLL hid_t H5Aopen(hid_t obj_id, const char *attr_name, hid_t aapl_id); * \since 1.8.0 * */ -H5_DLL hid_t H5Aopen_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, - hsize_t n, hid_t aapl_id, hid_t lapl_id); +H5_DLL hid_t H5Aopen_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, + hsize_t n, hid_t aapl_id, hid_t lapl_id); /*--------------------------------------------------------------------------*/ /** * \ingroup H5A @@ -283,8 +283,8 @@ H5_DLL hid_t H5Aopen_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx * \since 1.8.0 * */ -H5_DLL hid_t H5Aopen_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t aapl_id, - hid_t lapl_id); +H5_DLL hid_t H5Aopen_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t aapl_id, + hid_t lapl_id); /*-------------------------------------------------------------------------- */ /** * \ingroup H5A @@ -311,8 +311,8 @@ H5_DLL hid_t H5Aopen_by_name(hid_t loc_id, const char *obj_name, const char *a * * \see H5Awrite() * -*/ -H5_DLL herr_t H5Aread(hid_t attr_id, hid_t type_id, void *buf); + */ +H5_DLL herr_t H5Aread(hid_t attr_id, hid_t type_id, void *buf); /*--------------------------------------------------------------------------*/ /** * \ingroup H5A diff --git a/src/H5C.c b/src/H5C.c index fa4a8bf316b..24519eb693a 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -7131,7 +7131,7 @@ H5C__load_entry(H5F_t *f, MPI_Comm comm = MPI_COMM_NULL; /* File MPI Communicator */ int mpi_code; /* MPI error code */ #endif /* H5_HAVE_PARALLEL */ - void *ret_value = NULL; /* Return value */ + void *ret_value = NULL; /* Return value */ FUNC_ENTER_STATIC diff --git a/src/H5CX.c b/src/H5CX.c index 62a728370f1..cbef635bf67 100644 --- a/src/H5CX.c +++ b/src/H5CX.c @@ -370,9 +370,9 @@ typedef struct H5CX_dxpl_cache_t { uint32_t mpio_global_no_coll_cause; /* Global reason for breaking collective I/O (H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME) */ H5FD_mpio_chunk_opt_t - mpio_chunk_opt_mode; /* Collective chunk option (H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME) */ - unsigned mpio_chunk_opt_num; /* Collective chunk thrreshold (H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME) */ - unsigned mpio_chunk_opt_ratio; /* Collective chunk ratio (H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME) */ + mpio_chunk_opt_mode; /* Collective chunk option (H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME) */ + unsigned mpio_chunk_opt_num; /* Collective chunk thrreshold (H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME) */ + unsigned mpio_chunk_opt_ratio; /* Collective chunk ratio (H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME) */ #endif /* H5_HAVE_PARALLEL */ H5Z_EDC_t err_detect; /* Error detection info (H5D_XFER_EDC_NAME) */ H5Z_cb_t filter_cb; /* Filter callback function (H5D_XFER_FILTER_CB_NAME) */ diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index fa83fda7a61..095445b9bc7 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -216,9 +216,9 @@ typedef struct H5D_io_info_t { /* QAK: Delete the f_sh field when oloc has a shared file pointer? */ H5F_shared_t *f_sh; /* Pointer to shared file struct that dataset is within */ #ifdef H5_HAVE_PARALLEL - MPI_Comm comm; /* MPI communicator for file */ - hbool_t using_mpi_vfd; /* Whether the file is using an MPI-based VFD */ -#endif /* H5_HAVE_PARALLEL */ + MPI_Comm comm; /* MPI communicator for file */ + hbool_t using_mpi_vfd; /* Whether the file is using an MPI-based VFD */ +#endif /* H5_HAVE_PARALLEL */ H5D_storage_t * store; /* Dataset storage info */ H5D_layout_ops_t layout_ops; /* Dataset layout I/O operation function pointers */ H5D_io_ops_t io_ops; /* I/O operation function pointers */ diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index f61522f102f..79270b80d65 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -833,8 +833,8 @@ herr_t H5D__virtual_delete(H5F_t *f, H5O_storage_t *storage) { #ifdef NOT_YET - int heap_rc; /* Reference count of global heap object */ -#endif /* NOT_YET */ + int heap_rc; /* Reference count of global heap object */ +#endif /* NOT_YET */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE diff --git a/src/H5EAtest.c b/src/H5EAtest.c index bbd436e6f17..9a7db423ecd 100644 --- a/src/H5EAtest.c +++ b/src/H5EAtest.c @@ -262,9 +262,9 @@ BEGIN_FUNC(STATIC, NOERR, herr_t, SUCCEED, -, /* Local variables */ #ifndef NDEBUG H5EA__test_ctx_t *ctx = (H5EA__test_ctx_t *)_ctx; /* Callback context to destroy */ -#endif /* NDEBUG */ - uint64_t * elmt = (uint64_t *)_elmt; /* Convenience pointer to native elements */ - const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */ +#endif /* NDEBUG */ + uint64_t * elmt = (uint64_t *)_elmt; /* Convenience pointer to native elements */ + const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */ /* Sanity checks */ HDassert(raw); diff --git a/src/H5F.c b/src/H5F.c index d9d83081731..d15e4a35b31 100644 --- a/src/H5F.c +++ b/src/H5F.c @@ -472,7 +472,7 @@ H5Fis_accessible(const char *filename, hid_t fapl_id) hid_t H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id) { - void * new_file = NULL; /* File struct for new file */ + void * new_file = NULL; /* File struct for new file */ H5P_genplist_t * plist; /* Property list pointer */ H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */ H5VL_object_t * vol_obj = NULL; /* VOL object for file */ diff --git a/src/H5FAtest.c b/src/H5FAtest.c index 350530a8879..de9e6d7d07a 100644 --- a/src/H5FAtest.c +++ b/src/H5FAtest.c @@ -200,7 +200,7 @@ BEGIN_FUNC(STATIC, NOERR, herr_t, SUCCEED, -, #ifndef NDEBUG H5FA__test_ctx_t *ctx = (H5FA__test_ctx_t *)_ctx; /* Callback context to destroy */ #endif /* NDEBUG */ - const uint64_t *elmt = (const uint64_t *)_elmt; /* Convenience pointer to native elements */ + const uint64_t *elmt = (const uint64_t *)_elmt; /* Convenience pointer to native elements */ /* Sanity checks */ HDassert(raw); @@ -241,9 +241,9 @@ BEGIN_FUNC(STATIC, NOERR, herr_t, SUCCEED, -, /* Local variables */ #ifndef NDEBUG H5FA__test_ctx_t *ctx = (H5FA__test_ctx_t *)_ctx; /* Callback context to destroy */ -#endif /* NDEBUG */ - uint64_t * elmt = (uint64_t *)_elmt; /* Convenience pointer to native elements */ - const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */ +#endif /* NDEBUG */ + uint64_t * elmt = (uint64_t *)_elmt; /* Convenience pointer to native elements */ + const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */ /* Sanity checks */ HDassert(raw); diff --git a/src/H5FDhdfs.c b/src/H5FDhdfs.c index 9369955e17e..9f0614e4835 100644 --- a/src/H5FDhdfs.c +++ b/src/H5FDhdfs.c @@ -29,13 +29,13 @@ #include "H5FDdrvr_module.h" #endif /* H5_HAVE_LIBHDFS */ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5FDprivate.h" /* File drivers */ -#include "H5FDhdfs.h" /* hdfs file driver */ -#include "H5FLprivate.h" /* Free Lists */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MMprivate.h" /* Memory management */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5FDprivate.h" /* File drivers */ +#include "H5FDhdfs.h" /* hdfs file driver */ +#include "H5FLprivate.h" /* Free Lists */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MMprivate.h" /* Memory management */ #ifdef H5_HAVE_LIBHDFS diff --git a/src/H5FScache.c b/src/H5FScache.c index fc61edd5dcb..3f8ce2bca75 100644 --- a/src/H5FScache.c +++ b/src/H5FScache.c @@ -1004,10 +1004,11 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l /* Check for any serialized sections */ if (fspace->serial_sect_count > 0) { hsize_t old_tot_sect_count; /* Total section count from header */ - hsize_t H5_ATTR_NDEBUG_UNUSED old_serial_sect_count; /* Total serializable section count from header */ - hsize_t H5_ATTR_NDEBUG_UNUSED old_ghost_sect_count; /* Total ghost section count from header */ - hsize_t H5_ATTR_NDEBUG_UNUSED old_tot_space; /* Total space managed from header */ - unsigned sect_cnt_size; /* The size of the section size counts */ + hsize_t H5_ATTR_NDEBUG_UNUSED + old_serial_sect_count; /* Total serializable section count from header */ + hsize_t H5_ATTR_NDEBUG_UNUSED old_ghost_sect_count; /* Total ghost section count from header */ + hsize_t H5_ATTR_NDEBUG_UNUSED old_tot_space; /* Total space managed from header */ + unsigned sect_cnt_size; /* The size of the section size counts */ /* Compute the size of the section counts */ sect_cnt_size = H5VM_limit_enc_size((uint64_t)fspace->serial_sect_count); diff --git a/src/H5Fint.c b/src/H5Fint.c index f7ec1c2cd5f..60755135eee 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -2623,8 +2623,8 @@ H5F__build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *n hid_t new_fapl_id = H5I_INVALID_HID; /* ID for duplicated FAPL */ #ifdef H5_HAVE_SYMLINK /* This has to be declared here to avoid unfreed resources on errors */ - char *realname = NULL; /* Fully resolved path name of file */ -#endif /* H5_HAVE_SYMLINK */ + char *realname = NULL; /* Fully resolved path name of file */ +#endif /* H5_HAVE_SYMLINK */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index f4268e5fa6e..7445d368289 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -30,7 +30,7 @@ typedef struct H5F_t H5F_t; /* Private headers needed by this file */ #include "H5MMprivate.h" /* Memory management */ #ifdef H5_HAVE_PARALLEL -#include "H5Pprivate.h" /* Property lists */ +#include "H5Pprivate.h" /* Property lists */ #endif /* H5_HAVE_PARALLEL */ #include "H5VMprivate.h" /* Vectors and arrays */ #include "H5VLprivate.h" /* Virtual Object Layer */ @@ -532,33 +532,33 @@ typedef struct H5F_t H5F_t; #define H5F_DEFAULT_CSET H5T_CSET_ASCII /* ========= File Creation properties ============ */ -#define H5F_CRT_USER_BLOCK_NAME "block_size" /* Size of the file user block in bytes */ +#define H5F_CRT_USER_BLOCK_NAME "block_size" /* Size of the file user block in bytes */ #define H5F_CRT_SYM_LEAF_NAME "symbol_leaf" /* 1/2 rank for symbol table leaf nodes */ #define H5F_CRT_SYM_LEAF_DEF 4 -#define H5F_CRT_BTREE_RANK_NAME "btree_rank" /* 1/2 rank for btree internal nodes */ +#define H5F_CRT_BTREE_RANK_NAME "btree_rank" /* 1/2 rank for btree internal nodes */ #define H5F_CRT_ADDR_BYTE_NUM_NAME "addr_byte_num" /* Byte number in an address */ -#define H5F_CRT_OBJ_BYTE_NUM_NAME "obj_byte_num" /* Byte number for object size */ +#define H5F_CRT_OBJ_BYTE_NUM_NAME "obj_byte_num" /* Byte number for object size */ #define H5F_CRT_SUPER_VERS_NAME "super_version" /* Version number of the superblock */ /* Number of shared object header message indexes */ #define H5F_CRT_SHMSG_NINDEXES_NAME "num_shmsg_indexes" #define H5F_CRT_SHMSG_INDEX_TYPES_NAME "shmsg_message_types" /* Types of message in each index */ /* Minimum size of messages in each index */ #define H5F_CRT_SHMSG_INDEX_MINSIZE_NAME "shmsg_message_minsize" -#define H5F_CRT_SHMSG_LIST_MAX_NAME "shmsg_list_max" /* Shared message list maximum size */ -#define H5F_CRT_SHMSG_BTREE_MIN_NAME "shmsg_btree_min" /* Shared message B-tree minimum size */ -#define H5F_CRT_FILE_SPACE_STRATEGY_NAME "file_space_strategy" /* File space handling strategy */ -#define H5F_CRT_FREE_SPACE_PERSIST_NAME "free_space_persist" /* Free-space persisting status */ +#define H5F_CRT_SHMSG_LIST_MAX_NAME "shmsg_list_max" /* Shared message list maximum size */ +#define H5F_CRT_SHMSG_BTREE_MIN_NAME "shmsg_btree_min" /* Shared message B-tree minimum size */ +#define H5F_CRT_FILE_SPACE_STRATEGY_NAME "file_space_strategy" /* File space handling strategy */ +#define H5F_CRT_FREE_SPACE_PERSIST_NAME "free_space_persist" /* Free-space persisting status */ #define H5F_CRT_FREE_SPACE_THRESHOLD_NAME "free_space_threshold" /* Free space section threshold */ #define H5F_CRT_FILE_SPACE_PAGE_SIZE_NAME "file_space_page_size" /* File space page size */ /* ========= File Access properties ============ */ #define H5F_ACS_META_CACHE_INIT_CONFIG_NAME \ - "mdc_initCacheCfg" /* Initial metadata cache resize configuration */ + "mdc_initCacheCfg" /* Initial metadata cache resize configuration */ #define H5F_ACS_DATA_CACHE_NUM_SLOTS_NAME "rdcc_nslots" /* Size of raw data chunk cache(slots) */ #define H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME "rdcc_nbytes" /* Size of raw data chunk cache(bytes) */ -#define H5F_ACS_PREEMPT_READ_CHUNKS_NAME "rdcc_w0" /* Preemption read chunks first */ -#define H5F_ACS_ALIGN_THRHD_NAME "threshold" /* Threshold for alignment */ -#define H5F_ACS_ALIGN_NAME "align" /* Alignment */ +#define H5F_ACS_PREEMPT_READ_CHUNKS_NAME "rdcc_w0" /* Preemption read chunks first */ +#define H5F_ACS_ALIGN_THRHD_NAME "threshold" /* Threshold for alignment */ +#define H5F_ACS_ALIGN_NAME "align" /* Alignment */ #define H5F_ACS_META_BLOCK_SIZE_NAME \ "meta_block_size" /* Minimum metadata allocation block size (when aggregating metadata allocations) */ #define H5F_ACS_SIEVE_BUF_SIZE_NAME \ @@ -566,35 +566,35 @@ typedef struct H5F_t H5F_t; #define H5F_ACS_SDATA_BLOCK_SIZE_NAME \ "sdata_block_size" /* Minimum "small data" allocation block size (when aggregating "small" raw data \ allocations) */ -#define H5F_ACS_GARBG_COLCT_REF_NAME "gc_ref" /* Garbage-collect references */ -#define H5F_ACS_FILE_DRV_NAME "vfd_info" /* File driver ID & info */ +#define H5F_ACS_GARBG_COLCT_REF_NAME "gc_ref" /* Garbage-collect references */ +#define H5F_ACS_FILE_DRV_NAME "vfd_info" /* File driver ID & info */ #define H5F_ACS_VOL_CONN_NAME "vol_connector_info" /* VOL connector ID & info */ -#define H5F_ACS_CLOSE_DEGREE_NAME "close_degree" /* File close degree */ -#define H5F_ACS_FAMILY_OFFSET_NAME "family_offset" /* Offset position in file for family file driver */ +#define H5F_ACS_CLOSE_DEGREE_NAME "close_degree" /* File close degree */ +#define H5F_ACS_FAMILY_OFFSET_NAME "family_offset" /* Offset position in file for family file driver */ #define H5F_ACS_FAMILY_NEWSIZE_NAME \ "family_newsize" /* New member size of family driver. (private property only used by h5repart) */ #define H5F_ACS_FAMILY_TO_SINGLE_NAME \ "family_to_single" /* Whether to convert family to a single-file driver. (private property only used by \ h5repart) */ -#define H5F_ACS_MULTI_TYPE_NAME "multi_type" /* Data type in multi file driver */ -#define H5F_ACS_LIBVER_LOW_BOUND_NAME "libver_low_bound" /* 'low' bound of library format versions */ +#define H5F_ACS_MULTI_TYPE_NAME "multi_type" /* Data type in multi file driver */ +#define H5F_ACS_LIBVER_LOW_BOUND_NAME "libver_low_bound" /* 'low' bound of library format versions */ #define H5F_ACS_LIBVER_HIGH_BOUND_NAME "libver_high_bound" /* 'high' bound of library format versions */ #define H5F_ACS_WANT_POSIX_FD_NAME \ "want_posix_fd" /* Internal: query the file descriptor from the core VFD, instead of the memory address \ */ #define H5F_ACS_METADATA_READ_ATTEMPTS_NAME "metadata_read_attempts" /* # of metadata read attempts */ -#define H5F_ACS_OBJECT_FLUSH_CB_NAME "object_flush_cb" /* Object flush callback */ -#define H5F_ACS_EFC_SIZE_NAME "efc_size" /* Size of external file cache */ +#define H5F_ACS_OBJECT_FLUSH_CB_NAME "object_flush_cb" /* Object flush callback */ +#define H5F_ACS_EFC_SIZE_NAME "efc_size" /* Size of external file cache */ #define H5F_ACS_FILE_IMAGE_INFO_NAME \ "file_image_info" /* struct containing initial file image and callback info */ #define H5F_ACS_CLEAR_STATUS_FLAGS_NAME \ "clear_status_flags" /* Whether to clear superblock status_flags (private property only used by h5clear) \ */ -#define H5F_ACS_NULL_FSM_ADDR_NAME "null_fsm_addr" /* Nullify addresses of free-space managers */ - /* Private property used only by h5clear */ -#define H5F_ACS_SKIP_EOF_CHECK_NAME "skip_eof_check" /* Skip EOF check */ - /* Private property used only by h5clear */ -#define H5F_ACS_USE_MDC_LOGGING_NAME "use_mdc_logging" /* Whether to use metadata cache logging */ +#define H5F_ACS_NULL_FSM_ADDR_NAME "null_fsm_addr" /* Nullify addresses of free-space managers */ +/* Private property used only by h5clear */ +#define H5F_ACS_SKIP_EOF_CHECK_NAME "skip_eof_check" /* Skip EOF check */ +/* Private property used only by h5clear */ +#define H5F_ACS_USE_MDC_LOGGING_NAME "use_mdc_logging" /* Whether to use metadata cache logging */ #define H5F_ACS_MDC_LOG_LOCATION_NAME "mdc_log_location" /* Name of metadata cache log location */ #define H5F_ACS_START_MDC_LOG_ON_ACCESS_NAME \ "start_mdc_log_on_access" /* Whether logging starts on file create/open */ @@ -640,7 +640,7 @@ typedef struct H5F_t H5F_t; 3 /* With file locking and consistency flags (at least this version for SWMR support) */ #define HDF5_SUPERBLOCK_VERSION_LATEST HDF5_SUPERBLOCK_VERSION_3 /* The maximum super block format */ #define HDF5_SUPERBLOCK_VERSION_V18_LATEST \ - HDF5_SUPERBLOCK_VERSION_2 /* The latest superblock version for v18 */ + HDF5_SUPERBLOCK_VERSION_2 /* The latest superblock version for v18 */ #define HDF5_FREESPACE_VERSION 0 /* of the Free-Space Info */ #define HDF5_OBJECTDIR_VERSION 0 /* of the Object Directory format */ #define HDF5_SHAREDHEADER_VERSION 0 /* of the Shared-Header Info */ @@ -648,14 +648,15 @@ typedef struct H5F_t H5F_t; /* B-tree internal 'K' values */ #define HDF5_BTREE_SNODE_IK_DEF 16 -#define HDF5_BTREE_CHUNK_IK_DEF 32 /* Note! this value is assumed \ - to be 32 for version 0 \ - of the superblock and \ - if it is changed, the code \ - must compensate. -QAK \ - */ +#define HDF5_BTREE_CHUNK_IK_DEF \ + 32 /* Note! this value is assumed \ + to be 32 for version 0 \ + of the superblock and \ + if it is changed, the code \ + must compensate. -QAK \ + */ #define HDF5_BTREE_IK_MAX_ENTRIES 65536 /* 2^16 - 2 bytes for storing entries (children) */ - /* See format specification on version 1 B-trees */ +/* See format specification on version 1 B-trees */ /* Default file space handling strategy */ #define H5F_FILE_SPACE_STRATEGY_DEF H5F_FSPACE_STRATEGY_FSM_AGGR @@ -690,7 +691,7 @@ typedef struct H5F_t H5F_t; #define H5F_PAGED_AGGR(F) (F->shared->fs_strategy == H5F_FSPACE_STRATEGY_PAGE && F->shared->fs_page_size) /* Metadata read attempt values */ -#define H5F_METADATA_READ_ATTEMPTS 1 /* Default # of read attempts for non-SWMR access */ +#define H5F_METADATA_READ_ATTEMPTS 1 /* Default # of read attempts for non-SWMR access */ #define H5F_SWMR_METADATA_READ_ATTEMPTS 100 /* Default # of read attempts for SWMR access */ /* Macros to define signatures of all objects in the file */ @@ -806,7 +807,7 @@ typedef enum H5F_mem_page_t { } H5F_mem_page_t; /* Aliases for H5F_mem_page_t enum values */ -#define H5F_MEM_PAGE_META H5F_MEM_PAGE_SUPER /* Small-sized meta data */ +#define H5F_MEM_PAGE_META H5F_MEM_PAGE_SUPER /* Small-sized meta data */ #define H5F_MEM_PAGE_GENERIC H5F_MEM_PAGE_LARGE_SUPER /* Large-sized generic: meta and raw */ /* Type of prefix for opening prefixed files */ diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h index 04a72ba4ad6..858bbd5407b 100644 --- a/src/H5Fpublic.h +++ b/src/H5Fpublic.h @@ -84,8 +84,9 @@ #define H5F_OBJ_DATATYPE (0x0008u) /**< Named datatype objects */ #define H5F_OBJ_ATTR (0x0010u) /**< Attribute objects */ #define H5F_OBJ_ALL (H5F_OBJ_FILE | H5F_OBJ_DATASET | H5F_OBJ_GROUP | H5F_OBJ_DATATYPE | H5F_OBJ_ATTR) -#define H5F_OBJ_LOCAL (0x0020u) /**< Restrict search to objects opened through current file ID - (as opposed to objects opened through any file ID accessing this file) */ +#define H5F_OBJ_LOCAL \ + (0x0020u) /**< Restrict search to objects opened through current file ID \ + (as opposed to objects opened through any file ID accessing this file) */ #define H5F_FAMILY_DEFAULT (hsize_t)0 @@ -987,8 +988,9 @@ H5_DLL ssize_t H5Fget_file_image(hid_t file_id, void *buf_ptr, size_t buf_len); * * * hbool_t open_trace_file - * OUT: Boolean field indicating whether the trace_file_name field should be used to open - * a trace file for the cache. This field will always be set to 0 in this context. + * OUT: Boolean field indicating whether the trace_file_name field should be used to + * open a trace file for the cache. This field will always be set to 0 in this + * context. * * * hbool_t close_trace_file @@ -996,8 +998,8 @@ H5_DLL ssize_t H5Fget_file_image(hid_t file_id, void *buf_ptr, size_t buf_len); * will always be set to 0 in this context. * * char*trace_file_name - * OUT: Full path name of the trace file to be opened if the open_trace_file field is set - * to 1. This field will always be set to the empty string in this context. + * OUT: Full path name of the trace file to be opened if the open_trace_file field is + * set to 1. This field will always be set to the empty string in this context. * * hbool_t evictions_enabled * OUT: Boolean flag indicating whether metadata cache entry evictions are @@ -1041,10 +1043,10 @@ H5_DLL ssize_t H5Fget_file_image(hid_t file_id, void *buf_ptr, size_t buf_len); * * * - * + * * * * @@ -1070,8 +1072,8 @@ H5_DLL ssize_t H5Fget_file_image(hid_t file_id, void *buf_ptr, size_t buf_len); * * + * disabled.

\c H5C_flash_incr__add_space: Flash cache size increase is enabled using the add + * space algorithm.

* * * @@ -1082,8 +1084,8 @@ H5_DLL ssize_t H5Fget_file_image(hid_t file_id, void *buf_ptr, size_t buf_len); * * * + * obtain the initial cache size increment. This increment may be reduced to reflect existing free + * space in the cache and the max_size field above. * *
enum H5C_cache_incr_mode incr_mode OUT: Enumerated value indicating the operational mode of the automatic cache size increase code. At - * present, only the following values are legal:

\c H5C_incr__off: Automatic cache size increase is - * disabled.

\c H5C_incr__threshold: Automatic cache size increase is enabled using the hit rate - * threshold algorithm.

OUT: Enumerated value indicating the operational mode of the automatic cache size increase code. + * At present, only the following values are legal:

\c H5C_incr__off: Automatic cache size increase + * is disabled.

\c H5C_incr__threshold: Automatic cache size increase is enabled using the hit + * rate threshold algorithm.

double lower_hr_threshold enum H5C_cache_flash_incr_mode flash_incr_mode OUT: Enumerated value indicating the operational mode of the flash cache size increase code. At * present, only the following values are legal:

\c H5C_flash_incr__off: Flash cache size increase is - * disabled.

\c H5C_flash_incr__add_space: Flash cache size increase is enabled using the add space - * algorithm.

double flash_threshold
double flash_multiple OUT: The factor by which the size of the triggering entry / entry size increase is multiplied to - * obtain the initial cache size increment. This increment may be reduced to reflect existing free space - * in the cache and the max_size field above.
* @@ -1094,13 +1096,13 @@ H5_DLL ssize_t H5Fget_file_image(hid_t file_id, void *buf_ptr, size_t buf_len); * * * enum H5C_cache_decr_mode decr_mode - * OUT: Enumerated value indicating the operational mode of the automatic cache size decrease code. At - * present, the following values are legal:

H5C_decr__off: Automatic cache size decrease is disabled, - * and the remaining decrement fields are ignored.

H5C_decr__threshold: Automatic cache size - * decrease is enabled using the hit rate threshold algorithm.

H5C_decr__age_out: Automatic cache - * size decrease is enabled using the ageout algorithm.

H5C_decr__age_out_with_threshold: - * Automatic cache size decrease is enabled using the ageout with hit rate threshold - * algorithm

+ * OUT: Enumerated value indicating the operational mode of the automatic cache size decrease code. + * At present, the following values are legal:

H5C_decr__off: Automatic cache size decrease is + * disabled, and the remaining decrement fields are ignored.

H5C_decr__threshold: Automatic + * cache size decrease is enabled using the hit rate threshold algorithm.

H5C_decr__age_out: + * Automatic cache size decrease is enabled using the ageout algorithm.

+ *

H5C_decr__age_out_with_threshold: Automatic cache size decrease is enabled using the ageout + * with hit rate threshold algorithm

* * double upper_hr_threshold * OUT: Upper hit rate threshold. This value is only used if the decr_mode is either @@ -1143,7 +1145,8 @@ H5_DLL ssize_t H5Fget_file_image(hid_t file_id, void *buf_ptr, size_t buf_len); * int dirty_bytes_threshold * OUT: Threshold number of bytes of dirty metadata generation for triggering synchronizations of the * metadata caches serving the target file in the parallel case.

Synchronization occurs whenever the - * number of bytes of dirty metadata created since the last synchronization exceeds this limit.

+ * number of bytes of dirty metadata created since the last synchronization exceeds this + * limit.

* * * @@ -1179,59 +1182,59 @@ H5_DLL herr_t H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr); * * hbool_t rpt_fcn_enabled * IN: Boolean flag indicating whether the adaptive cache resize report function is enabled. This - * field should almost always be set to disabled (0). Since resize algorithm activity is reported - * via stdout, it MUST be set to disabled (0) on Windows machines.

The report function is not - * supported code, and can be expected to change between versions of the library. Use it at your own - * risk.

+ * field should almost always be set to disabled (0). Since resize algorithm activity is + * reported via stdout, it MUST be set to disabled (0) on Windows machines.

The report + * function is not supported code, and can be expected to change between versions of the library. Use + * it at your own risk.

* * * hbool_t open_trace_File * IN: Boolean field indicating whether the trace_file_name field should be used to open - * a trace file for the cache.

The trace file is a debuging feature that allows the capture of top level - * metadata cache requests for purposes of debugging and/or optimization. This field should normally be set - * to 0, as trace file collection imposes considerable overhead.

This field should only be - * set to 1 when the trace_file_name contains the full path of the desired trace - * file, and either there is no open trace file on the cache, or the close_trace_file field is - * also 1.

The trace file feature is unsupported unless used at the direction of The HDF - * Group. It is intended to allow The HDF Group to collect a trace of cache activity in cases of occult - * failures and/or poor performance seen in the field, so as to aid in reproduction in the lab. If you use it - * absent the direction of The HDF Group, you are on your - * own.

+ * a trace file for the cache.

The trace file is a debuging feature that allows the capture of top + * level metadata cache requests for purposes of debugging and/or optimization. This field should + *

This field should only normally be set to 0, as trace file collection imposes + * considerable overhead.

be set to 1 when the trace_file_name contains + * the full path of the desired trace file, and either there is no open trace file on the cache, or the + * close_trace_file field is also 1.

The trace file feature is + * unsupported unless used at the direction of The HDF Group. It is intended to allow The HDF Group to + * collect a trace of cache activity in cases of occult failures and/or poor performance seen in the + * field, so as to aid in reproduction in the lab. If you use it absent the direction of The HDF Group, + * you are on your own.

* * hbool_t close_trace_file * IN: Boolean field indicating whether the current trace file (if any) should be closed.

See the - * above comments on the open_trace_file field. This field should be set to 0 unless - * there is an open trace file on the cache that you wish to close.

The trace file feature is - * unsupported unless used at the direction of The HDF Group. It is intended to allow The HDF Group to collect - * a trace of cache activity in cases of occult failures and/or poor performance seen in the field, so as to - * aid in reproduction in the lab. If you use it absent the direction of The HDF Group, you are on your - * own.

+ * above comments on the open_trace_file field. This field should be set to + * 0 unless there is an open trace file on the cache that you wish to close.

The + * trace file feature is unsupported unless used at the direction of The HDF Group. It is intended to + * allow The HDF Group to collect a trace of cache activity in cases of occult failures and/or poor + * performance seen in the field, so as to aid in reproduction in the lab. If you use it absent the + * direction of The HDF Group, you are on your own.

* * * char trace_file_name[] * IN: Full path of the trace file to be opened if the open_trace_file field is set - * to 1.

In the parallel case, an ascii representation of the mpi rank of the process will be - * appended to the file name to yield a unique trace file name for each process.

The length of the path - * must not exceed #H5AC__MAX_TRACE_FILE_NAME_LEN characters.

The trace file feature is - * unsupported unless used at the direction of The HDF Group. It is intended to allow The HDF Group to collect - * a trace of cache activity in cases of occult failures and/or poor performance seen in the field, so as to - * aid in reproduction in the lab. If you use it absent the direction of The HDF Group, you are on your - * own.

+ * to 1.

In the parallel case, an ascii representation of the mpi rank of the process + * will be appended to the file name to yield a unique trace file name for each process.

The + * length of the path must not exceed #H5AC__MAX_TRACE_FILE_NAME_LEN characters.

The trace file + * feature is unsupported unless used at the direction of The HDF Group. It is intended to allow The + * HDF Group to collect a trace of cache activity in cases of occult failures and/or poor performance + * seen in the field, so as to aid in reproduction in the lab. If you use it absent the direction of + * The HDF Group, you are on your own.

* * * hbool_t evictions_enabled * IN: A boolean flag indicating whether evictions from the metadata cache are enabled. This flag is - * initially set to enabled (1).

In rare circumstances, the raw data throughput requirements - * may be so high that the user wishes to postpone metadata writes so as to reserve I/O throughput for raw - * data. The evictions_enabled field exists to allow this. However, this is an extreme step, and - * you have no business doing it unless you have read the User Guide section on metadata caching, and have - * considered all other options carefully.

The evictions_enabled field may not be set to - * disabled (0) unless all adaptive cache resizing code is disabled via - * the incr_mode, flash_incr_mode, and decr_mode fields.

When - * this flag is set to disabled (0), the metadata cache will not attempt to evict entries to make - * space for new entries, and thus will grow without bound.

Evictions will be re-enabled when this field - * is set back to 1. This should be done as soon as - * possible.

+ * initially set to enabled (1).

In rare circumstances, the raw data throughput + * requirements may be so high that the user wishes to postpone metadata writes so as to reserve I/O + * throughput for raw data. The evictions_enabled field exists to allow this. However, + * this is an extreme step, and you have no business doing it unless you have read the User Guide + * section on metadata caching, and have considered all other options carefully.

The + * evictions_enabled field may not be set to disabled (0) unless all adaptive + * cache resizing code is disabled via the incr_mode, flash_incr_mode, and + * decr_mode fields.

When this flag is set to disabled (0), the + * metadata cache will not attempt to evict entries to make space for new entries, and thus will grow + * without bound.

Evictions will be re-enabled when this field is set back to 1. + * This should be done as soon as possible.

* * * hbool_t set_initial_size @@ -1241,24 +1244,24 @@ H5_DLL herr_t H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr); * * size_t initial_size * IN: If set_initial_size is set to 1, then initial_size must - * contain the desired initial size in bytes. This value must lie in the closed interval [min_size, - * max_size]. (see below) + * contain the desired initial size in bytes. This value must lie in the closed interval + * [min_size, max_size]. (see below) * * double min_clean_fraction * IN: This field specifies the minimum fraction of the cache that must be kept either clean or - * empty.

The value must lie in the interval [0.0, 1.0]. 0.01 is a good place to start in the serial case. - * In the parallel case, a larger value is needed -- - * see Metadata Caching in HDF5 in the collection - * "Advanced Topics in HDF5."

+ * empty.

The value must lie in the interval [0.0, 1.0]. 0.01 is a good place to start in the serial + * case. In the parallel case, a larger value is needed -- see Metadata Caching in HDF5 in the collection + * "Advanced Topics in HDF5."

* * size_t max_size - * IN: Upper bound (in bytes) on the range of values that the adaptive cache resize code can select as - * the maximum cache size. + * IN: Upper bound (in bytes) on the range of values that the adaptive cache resize code can select + * as the maximum cache size. * * * size_t min_size - * IN: Lower bound (in bytes) on the range of values that the adaptive cache resize code can select as - * the maximum cache size. + * IN: Lower bound (in bytes) on the range of values that the adaptive cache resize code can select + * as the maximum cache size. * * long int epoch_length * IN: Number of cache accesses between runs of the adaptive cache resize code. 50,000 is a good @@ -1271,27 +1274,25 @@ H5_DLL herr_t H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr); * * enum H5C_cache_incr_mode incr_mode * IN: Enumerated value indicating the operational mode of the automatic cache size increase code. At - * present, only two values are legal:

\c H5C_incr__off: Automatic cache size increase is disabled, and the - * remaining increment fields are ignored.

\c H5C_incr__threshold: Automatic cache size increase is enabled - * using the hit rate threshold - * algorithm.

+ * present, only two values are legal:

\c H5C_incr__off: Automatic cache size increase is disabled, + * and the remaining increment fields are ignored.

\c H5C_incr__threshold: Automatic cache size + * increase is enabled using the hit rate threshold algorithm.

* * * double lower_hr_threshold * IN: Hit rate threshold used by the hit rate threshold cache size increment algorithm.

When the - * hit rate over an epoch is below this threshold and the cache is full, the maximum size of the cache is - * multiplied by increment (below), and then clipped as necessary to stay within max_size, and possibly - * max_increment.

This field must lie in the interval [0.0, 1.0]. 0.8 or 0.9 is a good starting - * point.

+ * hit rate over an epoch is below this threshold and the cache is full, the maximum size of the + * cache is multiplied by increment (below), and then clipped as necessary to stay within max_size, and + * possibly max_increment.

This field must lie in the interval [0.0, 1.0]. 0.8 or 0.9 is a good + * starting point.

* * * double increment * IN: Factor by which the hit rate threshold cache size increment algorithm multiplies the current - * maximum cache size to obtain a tentative new cache size.

The actual cache size increase will be clipped - * to satisfy the max_size specified in the general configuration, and possibly max_increment below.

The - * parameter must be greater than or equal to 1.0 -- 2.0 is a reasonable value.

If you set it to 1.0, - * you will effectively disable cache size - * increases.

+ * maximum cache size to obtain a tentative new cache size.

The actual cache size increase will be + * clipped to satisfy the max_size specified in the general configuration, and possibly max_increment + * below.

The parameter must be greater than or equal to 1.0 -- 2.0 is a reasonable + * value.

If you set it to 1.0, you will effectively disable cache size increases.

* * * hbool_t apply_max_increment @@ -1307,21 +1308,21 @@ H5_DLL herr_t H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr); * enum H5C_cache_flash_incr_mode flash_incr_mode * IN: Enumerated value indicating the operational mode of the flash cache size increase code. At * present, only the following values are legal:

\c H5C_flash_incr__off: Flash cache size increase is - * disabled.

\c H5C_flash_incr__add_space: Flash cache size increase is enabled using the add space - * algorithm.

+ * disabled.

\c H5C_flash_incr__add_space: Flash cache size increase is enabled using the add + * space algorithm.

* * * double flash_threshold * IN: The factor by which the current maximum cache size is multiplied to obtain the minimum size - * entry / entry size increase which may trigger a flash cache size increase.

At present, this value must - * lie in the range [0.1, 1.0].

+ * entry / entry size increase which may trigger a flash cache size increase.

At present, this value + * must lie in the range [0.1, 1.0].

* * * double flash_multiple * IN: The factor by which the size of the triggering entry / entry size increase is multiplied to - * obtain the initial cache size increment. This increment may be reduced to reflect existing free space in - * the cache and the max_size field above.

At present, this field must lie in the range [0.1, - * 10.0].

+ * obtain the initial cache size increment. This increment may be reduced to reflect existing free + * space in the cache and the max_size field above.

At present, this field must lie in + * the range [0.1, 10.0].

* * * @@ -1331,31 +1332,30 @@ H5_DLL herr_t H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr); * enum H5C_cache_decr_mode decr_mode * IN: Enumerated value indicating the operational mode of the automatic cache size decrease code. At * present, the following values are legal:

\c H5C_decr__off: Automatic cache size decrease is - * disabled.

\c H5C_decr__threshold: Automatic cache size decrease is enabled using the hit rate threshold - * algorithm.

\c H5C_decr__age_out: Automatic cache size decrease is enabled using the ageout - * algorithm.

\c H5C_decr__age_out_with_threshold: Automatic cache size decrease is enabled using the - * ageout with hit rate threshold - * algorithm

+ * disabled.

\c H5C_decr__threshold: Automatic cache size decrease is enabled using the hit + * rate threshold algorithm.

\c H5C_decr__age_out: Automatic cache size decrease is enabled using + * the ageout algorithm.

\c H5C_decr__age_out_with_threshold: Automatic cache size decrease is + * enabled using the ageout with hit rate threshold algorithm

* * * double upper_hr_threshold * IN: Hit rate threshold for the hit rate threshold and ageout with hit rate threshold cache size - * decrement algorithms.

When \c decr_mode is \c H5C_decr__threshold, and the hit rate over a given epoch exceeds - * the supplied threshold, the current maximum cache size is multiplied by decrement to obtain a tentative new - * (and smaller) maximum cache size.

When \c decr_mode is \c H5C_decr__age_out_with_threshold, there is no - * attempt to find and evict aged out entries unless the hit rate in the previous epoch exceeded the supplied - * threshold.

This field must lie in the interval [0.0, 1.0].

For \c H5C_incr__threshold, .9995 or - * .99995 is a good place to start.

For \c H5C_decr__age_out_with_threshold, .999 might be more - * useful.

+ * decrement algorithms.

When \c decr_mode is \c H5C_decr__threshold, and the hit rate over a given + * epoch exceeds the supplied threshold, the current maximum cache size is multiplied by decrement to + * obtain a tentative new (and smaller) maximum cache size.

When \c decr_mode is \c + * H5C_decr__age_out_with_threshold, there is no attempt to find and evict aged out entries unless the + * hit rate in the previous epoch exceeded the supplied threshold.

This field must lie in the + * interval [0.0, 1.0].

For \c H5C_incr__threshold, .9995 or .99995 is a good place to + * start.

For \c H5C_decr__age_out_with_threshold, .999 might be more useful.

* * * double decrement * IN: In the hit rate threshold cache size decrease algorithm, this parameter contains the factor by - * which the current max cache size is multiplied to produce a tentative new cache size.

The actual cache - * size decrease will be clipped to satisfy the min_size specified in the general configuration, and possibly - * max_decrement below.

The parameter must be be in the interval [0.0, 1.0].

If you set it to 1.0, - * you will effectively disable cache size decreases. 0.9 is a reasonable starting - * point.

+ * which the current max cache size is multiplied to produce a tentative new cache size.

The actual + * cache size decrease will be clipped to satisfy the min_size specified in the general configuration, + * and possibly max_decrement below.

The parameter must be be in the interval + * [0.0, 1.0].

If you set it to 1.0, you will effectively disable cache size decreases. 0.9 is a + * reasonable starting point.

* * * hbool_t apply_max_decrement @@ -1370,8 +1370,8 @@ H5_DLL herr_t H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr); * * int epochs_before_eviction * IN: In the ageout based cache size reduction algorithms, this field contains the minimum number of - * epochs an entry must remain unaccessed in cache before the cache size reduction algorithm tries to evict - * it. 3 is a reasonable value. + * epochs an entry must remain unaccessed in cache before the cache size reduction algorithm tries to + * evict it. 3 is a reasonable value. * * * hbool_t apply_empty_reserve @@ -1380,10 +1380,10 @@ H5_DLL herr_t H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr); * * * double empty_reserve - * IN: Empty reserve as a fraction of maximum cache size if applicable.

When so directed, the ageout - * based algorithms will not decrease the maximum cache size unless the empty reserve can be met.

The - * parameter must lie in the interval [0.0, 1.0]. 0.1 or 0.05 is a good place to - * start.

+ * IN: Empty reserve as a fraction of maximum cache size if applicable.

When so directed, the + * ageout based algorithms will not decrease the maximum cache size unless the empty reserve can be + * met.

The parameter must lie in the interval [0.0, 1.0]. 0.1 or 0.05 is a good place to + * start.

* * * @@ -1392,12 +1392,12 @@ H5_DLL herr_t H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr); * * int dirty_bytes_threshold * IN: Threshold number of bytes of dirty metadata generation for triggering synchronizations of the - * metadata caches serving the target file in the parallel case.

Synchronization occurs whenever the number - * of bytes of dirty metadata created since the last synchronization exceeds this limit.

This field only - * applies to the parallel case. While it is ignored elsewhere, it can still draw a value out of bounds - * error.

It must be consistant across all caches on any given file.

By default, this field is set - * to 256 KB. It shouldn't be more than half the current maximum cache size times the minimum clean - * fraction.

+ * metadata caches serving the target file in the parallel case.

Synchronization occurs whenever the + * number of bytes of dirty metadata created since the last synchronization exceeds this + * limit.

This field only applies to the parallel case. While it is ignored elsewhere, it can + * still draw a value out of bounds error.

It must be consistant across all caches on any given + * file.

By default, this field is set to 256 KB. It shouldn't be more than half the current + * maximum cache size times the minimum clean fraction.

* * * @@ -1639,7 +1639,8 @@ H5_DLL herr_t H5Fget_info2(hid_t obj_id, H5F_info2_t *file_info); * 18Fixed array data block * 19Fixed array data block page * 20File's superblock (version 2) - * * All entries are of version 0 (zero) unless indicated otherwise. + * * All entries are of version 0 (zero) unless indicated + * otherwise. * * * \note On a system that is not atomic, the library might possibly read inconsistent @@ -1926,8 +1927,7 @@ H5_DLL herr_t H5Fstop_mdc_logging(hid_t file_id); * * \since 1.10.0 */ -H5_DLL herr_t H5Fget_mdc_logging_status(hid_t file_id, hbool_t *is_enabled, - hbool_t *is_currently_logging); +H5_DLL herr_t H5Fget_mdc_logging_status(hid_t file_id, hbool_t *is_enabled, hbool_t *is_currently_logging); /** * \ingroup SWMR * diff --git a/src/H5Gnode.c b/src/H5Gnode.c index a08acca611b..c66a174fc69 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -97,7 +97,7 @@ H5B_class_t H5B_SNODE[1] = {{ H5G__node_create, /*new */ H5G__node_cmp2, /*cmp2 */ H5G__node_cmp3, /*cmp3 */ - H5G__node_found, /*found */ + H5G__node_found, /*found */ H5G__node_insert, /*insert */ TRUE, /*follow min branch? */ TRUE, /*follow max branch? */ diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h index a9a290304c7..a037e5462f3 100644 --- a/src/H5Gprivate.h +++ b/src/H5Gprivate.h @@ -168,14 +168,14 @@ typedef enum H5G_link_iterate_op_type_t { #ifndef H5_NO_DEPRECATED_SYMBOLS H5G_LINK_OP_OLD, /* "Old" application callback */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ - H5G_LINK_OP_NEW /* "New" application callback */ + H5G_LINK_OP_NEW /* "New" application callback */ } H5G_link_iterate_op_type_t; typedef struct { H5G_link_iterate_op_type_t op_type; union { #ifndef H5_NO_DEPRECATED_SYMBOLS - H5G_iterate_t op_old; /* "Old" application callback for each link */ + H5G_iterate_t op_old; /* "Old" application callback for each link */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ H5L_iterate2_t op_new; /* "New" application callback for each link */ } op_func; diff --git a/src/H5Gpublic.h b/src/H5Gpublic.h index fd0106b7baf..6db23e0643a 100644 --- a/src/H5Gpublic.h +++ b/src/H5Gpublic.h @@ -98,7 +98,7 @@ H5_DLL herr_t H5Grefresh(hid_t group_id); /* Macros for types of objects in a group (see H5G_obj_t definition) */ #define H5G_NTYPES 256 /* Max possible number of types */ -#define H5G_NLIBTYPES 8 /* Number of internal types */ +#define H5G_NLIBTYPES 8 /* Number of internal types */ #define H5G_NUSERTYPES (H5G_NTYPES - H5G_NLIBTYPES) #define H5G_USERTYPE(X) (8 + (X)) /* User defined types */ diff --git a/src/H5HFcache.c b/src/H5HFcache.c index a9f89e09f23..ef2c4b277ae 100644 --- a/src/H5HFcache.c +++ b/src/H5HFcache.c @@ -1302,9 +1302,9 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG H5HF_indirect_t *iblock = (H5HF_indirect_t *)_thing; /* Indirect block info */ uint8_t * image = (uint8_t *)_image; /* Pointer into raw data buffer */ #ifndef NDEBUG - unsigned nchildren = 0; /* Track # of children */ - size_t max_child = 0; /* Track max. child entry used */ -#endif /* NDEBUG */ + unsigned nchildren = 0; /* Track # of children */ + size_t max_child = 0; /* Track max. child entry used */ +#endif /* NDEBUG */ uint32_t metadata_chksum; /* Computed metadata checksum value */ size_t u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5Iint.c b/src/H5Iint.c index 2e1145d45d3..f552256087a 100644 --- a/src/H5Iint.c +++ b/src/H5Iint.c @@ -432,10 +432,9 @@ H5I__destroy_type(H5I_type_t type) if (type_info == NULL || type_info->init_count <= 0) HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "invalid type") - /* Close/clear/destroy all IDs for this type */ - H5E_BEGIN_TRY { - H5I_clear_type(type, TRUE, FALSE); - } H5E_END_TRY /* don't care about errors */ + /* Close/clear/destroy all IDs for this type */ + H5E_BEGIN_TRY { H5I_clear_type(type, TRUE, FALSE); } + H5E_END_TRY /* don't care about errors */ /* Check if we should release the ID class */ if (type_info->cls->flags & H5I_CLASS_IS_APPLICATION) diff --git a/src/H5Ipkg.h b/src/H5Ipkg.h index 5d9af136379..bd11fd53329 100644 --- a/src/H5Ipkg.h +++ b/src/H5Ipkg.h @@ -98,10 +98,10 @@ H5_DLLVAR int H5I_next_type_g; /* Package Private Prototypes */ /******************************/ -H5_DLL int H5I__destroy_type(H5I_type_t type); -H5_DLL void * H5I__remove_verify(hid_t id, H5I_type_t type); -H5_DLL int H5I__inc_type_ref(H5I_type_t type); -H5_DLL int H5I__get_type_ref(H5I_type_t type); +H5_DLL int H5I__destroy_type(H5I_type_t type); +H5_DLL void *H5I__remove_verify(hid_t id, H5I_type_t type); +H5_DLL int H5I__inc_type_ref(H5I_type_t type); +H5_DLL int H5I__get_type_ref(H5I_type_t type); H5_DLL H5I_id_info_t *H5I__find_id(hid_t id); /* Testing functions */ diff --git a/src/H5Ipublic.h b/src/H5Ipublic.h index ba5eed01577..8a393b87fd0 100644 --- a/src/H5Ipublic.h +++ b/src/H5Ipublic.h @@ -53,7 +53,9 @@ typedef enum H5I_type_t { H5I_NTYPES /**< number of library types, MUST BE LAST! */ } H5I_type_t; -/* Type of IDs to return to users */ +/** + * Type of IDs to return to users + */ typedef int64_t hid_t; #define PRIdHID PRId64 diff --git a/src/H5MM.c b/src/H5MM.c index ca358bfb93e..1effd6a6fad 100644 --- a/src/H5MM.c +++ b/src/H5MM.c @@ -52,7 +52,8 @@ /* Memory allocation "block", wrapped around each allocation */ struct H5MM_block_t; /* Forward declaration for typedef */ typedef struct H5MM_block_t { - unsigned char sig[H5MM_SIG_SIZE]; /* Signature for the block, to indicate it was allocated with H5MM* interface */ + unsigned char + sig[H5MM_SIG_SIZE]; /* Signature for the block, to indicate it was allocated with H5MM* interface */ struct H5MM_block_t *next; /* Pointer to next block in the list of allocated blocks */ struct H5MM_block_t *prev; /* Pointer to previous block in the list of allocated blocks */ union { diff --git a/src/H5MMprivate.h b/src/H5MMprivate.h index 7c34a986183..b4a59bac76e 100644 --- a/src/H5MMprivate.h +++ b/src/H5MMprivate.h @@ -48,9 +48,9 @@ H5_DLL void * H5MM_xfree(void *mem); H5_DLL void * H5MM_xfree_const(const void *mem); H5_DLL void * H5MM_memcpy(void *dest, const void *src, size_t n); H5_DLL herr_t H5MM_get_alloc_stats(H5_alloc_stats_t *stats); -#if defined H5_MEMORY_ALLOC_SANITY_CHECK -H5_DLL void H5MM_sanity_check_all(void); -H5_DLL void H5MM_final_sanity_check(void); +#if defined H5_MEMORY_ALLOC_SANITY_CHECK +H5_DLL void H5MM_sanity_check_all(void); +H5_DLL void H5MM_final_sanity_check(void); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ #endif /* _H5MMprivate_H */ diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 8e338cc073b..d2aed18ffc5 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -29,22 +29,22 @@ typedef struct H5O_t H5O_t; typedef struct H5O_fill_t H5O_fill_t; /* Include the public header file for this API */ -#include "H5Opublic.h" /* Object header functions */ +#include "H5Opublic.h" /* Object header functions */ /* Public headers needed by this file */ -#include "H5Dpublic.h" /* Dataset functions */ -#include "H5Lpublic.h" /* Link functions */ -#include "H5Spublic.h" /* Dataspace functions */ +#include "H5Dpublic.h" /* Dataset functions */ +#include "H5Lpublic.h" /* Link functions */ +#include "H5Spublic.h" /* Dataspace functions */ /* Private headers needed by this file */ -#include "H5private.h" /* Generic Functions */ +#include "H5private.h" /* Generic Functions */ #include "H5ACprivate.h" /* Metadata cache */ -#include "H5Fprivate.h" /* File access */ +#include "H5Fprivate.h" /* File access */ #include "H5HGprivate.h" /* Global Heaps */ #include "H5SLprivate.h" /* Skip lists */ -#include "H5Tprivate.h" /* Datatype functions */ +#include "H5Tprivate.h" /* Datatype functions */ #include "H5VLprivate.h" /* Virtual Object Layer */ -#include "H5Zprivate.h" /* I/O pipeline filters */ +#include "H5Zprivate.h" /* I/O pipeline filters */ /* Forward references of package typedefs */ typedef struct H5O_msg_class_t H5O_msg_class_t; @@ -67,8 +67,8 @@ typedef struct H5O_mesg_t H5O_mesg_t; /* Object header macros */ #define H5O_MESG_MAX_SIZE 65536 /*max obj header message size */ -#define H5O_ALL (-1) /* Operate on all messages of type */ -#define H5O_FIRST (-2) /* Operate on first message of type */ +#define H5O_ALL (-1) /* Operate on all messages of type */ +#define H5O_FIRST (-2) /* Operate on first message of type */ /* Flags needed when encoding messages */ #define H5O_MSG_NO_FLAGS_SET 0x00u @@ -96,10 +96,10 @@ typedef struct H5O_mesg_t H5O_mesg_t; /* #define H5O_ENABLE_BOGUS */ /* ========= Object Creation properties ============ */ -#define H5O_CRT_ATTR_MAX_COMPACT_NAME "max compact attr" /* Max. # of attributes to store compactly */ -#define H5O_CRT_ATTR_MIN_DENSE_NAME "min dense attr" /* Min. # of attributes to store densely */ +#define H5O_CRT_ATTR_MAX_COMPACT_NAME "max compact attr" /* Max. # of attributes to store compactly */ +#define H5O_CRT_ATTR_MIN_DENSE_NAME "min dense attr" /* Min. # of attributes to store densely */ #define H5O_CRT_OHDR_FLAGS_NAME "object header flags" /* Object header flags */ -#define H5O_CRT_PIPELINE_NAME "pline" /* Filter pipeline */ +#define H5O_CRT_PIPELINE_NAME "pline" /* Filter pipeline */ #define H5O_CRT_PIPELINE_DEF \ { \ {0, NULL, H5O_NULL_ID, {{0, HADDR_UNDEF}}}, H5O_PLINE_VERSION_1, 0, 0, NULL \ @@ -232,7 +232,7 @@ typedef struct H5O_copy_t { #define H5O_FSINFO_ID 0x0017 /* File space info message. */ #define H5O_MDCI_MSG_ID 0x0018 /* Metadata Cache Image Message */ #define H5O_UNKNOWN_ID 0x0019 /* Placeholder message ID for unknown message. */ - /* (this should never exist in a file) */ +/* (this should never exist in a file) */ /* * Note: Must increment H5O_MSG_TYPES in H5Opkg.h and update H5O_msg_class_g * in H5O.c when creating a new message type. Also bump the value of @@ -376,7 +376,7 @@ typedef struct H5O_link_t { * External File List Message * (Data structure in memory) */ -#define H5O_EFL_ALLOC 16 /*number of slots to alloc at once */ +#define H5O_EFL_ALLOC 16 /*number of slots to alloc at once */ #define H5O_EFL_UNLIMITED H5F_UNLIMITED /*max possible file size */ typedef struct H5O_efl_entry_t { diff --git a/src/H5Opublic.h b/src/H5Opublic.h index 64408a0670e..ea445278cc4 100644 --- a/src/H5Opublic.h +++ b/src/H5Opublic.h @@ -26,9 +26,9 @@ #define _H5Opublic_H /* Public headers needed by this file */ -#include "H5public.h" /* Generic Functions */ -#include "H5Ipublic.h" /* IDs */ -#include "H5Lpublic.h" /* Links */ +#include "H5public.h" /* Generic Functions */ +#include "H5Ipublic.h" /* IDs */ +#include "H5Lpublic.h" /* Links */ /*****************/ /* Public Macros */ @@ -103,10 +103,10 @@ /* Types of objects in file */ typedef enum H5O_type_t { - H5O_TYPE_UNKNOWN = -1, /* Unknown object type */ - H5O_TYPE_GROUP, /* Object is a group */ - H5O_TYPE_DATASET, /* Object is a dataset */ - H5O_TYPE_NAMED_DATATYPE, /* Object is a named data type */ + H5O_TYPE_UNKNOWN = -1, /* Unknown object type */ + H5O_TYPE_GROUP, /* Object is a group */ + H5O_TYPE_DATASET, /* Object is a dataset */ + H5O_TYPE_NAMED_DATATYPE, /* Object is a named data type */ H5O_TYPE_MAP, /* Object is a map */ H5O_TYPE_NTYPES /* Number of different object types (must be last!) */ } H5O_type_t; @@ -257,13 +257,13 @@ typedef struct H5O_stat_t { /* (For H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx versions 1 & 2) */ typedef struct H5O_info1_t { unsigned long fileno; /* File number that object is located in */ - haddr_t addr; /* Object address in file */ + haddr_t addr; /* Object address in file */ H5O_type_t type; /* Basic object type (group, dataset, etc.) */ unsigned rc; /* Reference count of object */ - time_t atime; /* Access time */ - time_t mtime; /* Modification time */ - time_t ctime; /* Change time */ - time_t btime; /* Birth time */ + time_t atime; /* Access time */ + time_t mtime; /* Modification time */ + time_t ctime; /* Change time */ + time_t btime; /* Birth time */ hsize_t num_attrs; /* # of attributes attached to object */ H5O_hdr_info_t hdr; /* Object header information */ /* Extra metadata storage for obj & attributes */ diff --git a/src/H5PLpublic.h b/src/H5PLpublic.h index a08c78d7ee1..51f69c923fe 100644 --- a/src/H5PLpublic.h +++ b/src/H5PLpublic.h @@ -99,8 +99,8 @@ H5_DLL herr_t H5PLset_loading_state(unsigned int plugin_control_mask); * disabled.\n * A plugin bit set to 1 (one) indicates that that the dynamic plugin type is * enabled.\n - * If the value of \p plugin_control_mask is negative, all dynamic plugin types - * are enabled.\n + * If the value of \p plugin_control_mask is negative, all dynamic plugin + * types are enabled.\n * If the value of \p plugin_control_mask is 0 (zero), all dynamic plugins * are disabled. * \return \herr_t diff --git a/src/H5Pint.c b/src/H5Pint.c index f67e4d704f0..001f62b0034 100644 --- a/src/H5Pint.c +++ b/src/H5Pint.c @@ -5012,9 +5012,9 @@ H5P__unregister(H5P_genclass_t *pclass, const char *name) herr_t H5P_close(void *_plist) { - H5P_genclass_t *tclass; /* Temporary class pointer */ + H5P_genclass_t *tclass; /* Temporary class pointer */ H5P_genplist_t *plist = (H5P_genplist_t *)_plist; - H5SL_t * seen = NULL; /* Skip list to hold names of properties already seen */ + H5SL_t * seen = NULL; /* Skip list to hold names of properties already seen */ size_t nseen; /* Number of items 'seen' */ hbool_t has_parent_class; /* Flag to indicate that this property list's class has a parent */ size_t ndel; /* Number of items deleted */ diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h index 075eae07392..6dab94a1044 100644 --- a/src/H5Ppkg.h +++ b/src/H5Ppkg.h @@ -86,7 +86,8 @@ struct H5P_genclass_t { char * name; /* Name of property list class */ H5P_plist_type_t type; /* Type of property */ size_t nprops; /* Number of properties in class */ - unsigned plists; /* Number of property lists that have been created since the last modification to the class */ + unsigned + plists; /* Number of property lists that have been created since the last modification to the class */ unsigned classes; /* Number of classes that have been derived since the last modification to the class */ unsigned ref_count; /* Number of outstanding ID's open on this class object */ hbool_t deleted; /* Whether this class has been deleted and is waiting for dependent classes & proplists diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index a978895b839..649389554a8 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -374,7 +374,7 @@ H5_DLL herr_t H5Pclose(hid_t plist_id); * \since 1.0.0 * */ -H5_DLL hid_t H5Pcreate(hid_t cls_id); +H5_DLL hid_t H5Pcreate(hid_t cls_id); H5_DLL hid_t H5Pcreate_class(hid_t parent, const char *name, H5P_cls_create_func_t cls_create, void *create_data, H5P_cls_copy_func_t cls_copy, void *copy_data, H5P_cls_close_func_t cls_close, void *close_data); @@ -472,30 +472,27 @@ H5_DLL hid_t H5Pcopy(hid_t plist_id); * \since 1.8.0 * */ -H5_DLL H5Z_filter_t H5Pget_filter2(hid_t plist_id, unsigned idx, - unsigned int *flags/*out*/, - size_t *cd_nelmts/*out*/, - unsigned cd_values[]/*out*/, - size_t namelen, char name[], - unsigned *filter_config /*out*/); -H5_DLL herr_t H5Pset_attr_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dense); -H5_DLL herr_t H5Pget_attr_phase_change(hid_t plist_id, unsigned *max_compact, unsigned *min_dense); -H5_DLL herr_t H5Pset_attr_creation_order(hid_t plist_id, unsigned crt_order_flags); -H5_DLL herr_t H5Pget_attr_creation_order(hid_t plist_id, unsigned *crt_order_flags); -H5_DLL herr_t H5Pset_obj_track_times(hid_t plist_id, hbool_t track_times); -H5_DLL herr_t H5Pget_obj_track_times(hid_t plist_id, hbool_t *track_times); +H5_DLL H5Z_filter_t H5Pget_filter2(hid_t plist_id, unsigned idx, unsigned int *flags /*out*/, + size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen, + char name[], unsigned *filter_config /*out*/); +H5_DLL herr_t H5Pset_attr_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dense); +H5_DLL herr_t H5Pget_attr_phase_change(hid_t plist_id, unsigned *max_compact, unsigned *min_dense); +H5_DLL herr_t H5Pset_attr_creation_order(hid_t plist_id, unsigned crt_order_flags); +H5_DLL herr_t H5Pget_attr_creation_order(hid_t plist_id, unsigned *crt_order_flags); +H5_DLL herr_t H5Pset_obj_track_times(hid_t plist_id, hbool_t track_times); +H5_DLL herr_t H5Pget_obj_track_times(hid_t plist_id, hbool_t *track_times); H5_DLL herr_t H5Pmodify_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[/*cd_nelmts*/]); H5_DLL herr_t H5Pset_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts, const unsigned int c_values[]); H5_DLL int H5Pget_nfilters(hid_t plist_id); -H5_DLL herr_t H5Pget_filter_by_id2(hid_t plist_id, H5Z_filter_t id, unsigned int *flags /*out*/, - size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen, - char name[] /*out*/, unsigned *filter_config /*out*/); -H5_DLL htri_t H5Pall_filters_avail(hid_t plist_id); -H5_DLL herr_t H5Premove_filter(hid_t plist_id, H5Z_filter_t filter); -H5_DLL herr_t H5Pset_deflate(hid_t plist_id, unsigned aggression); -H5_DLL herr_t H5Pset_fletcher32(hid_t plist_id); +H5_DLL herr_t H5Pget_filter_by_id2(hid_t plist_id, H5Z_filter_t id, unsigned int *flags /*out*/, + size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen, + char name[] /*out*/, unsigned *filter_config /*out*/); +H5_DLL htri_t H5Pall_filters_avail(hid_t plist_id); +H5_DLL herr_t H5Premove_filter(hid_t plist_id, H5Z_filter_t filter); +H5_DLL herr_t H5Pset_deflate(hid_t plist_id, unsigned aggression); +H5_DLL herr_t H5Pset_fletcher32(hid_t plist_id); /* File creation property list (FCPL) routines */ H5_DLL herr_t H5Pset_userblock(hid_t plist_id, hsize_t size); @@ -610,7 +607,7 @@ H5_DLL herr_t H5Pget_page_buffer_size(hid_t plist_id, size_t *buf_size, unsigned * \since 1.0.0 * */ -H5_DLL int H5Pget_chunk(hid_t plist_id, int max_ndims, hsize_t dim[]/*out*/); +H5_DLL int H5Pget_chunk(hid_t plist_id, int max_ndims, hsize_t dim[] /*out*/); /** *------------------------------------------------------------------------- * @@ -683,8 +680,7 @@ H5_DLL herr_t H5Pget_chunk_opts(hid_t plist_id, unsigned *opts); * \since 1.6.0 * */ -H5_DLL herr_t H5Pget_fill_time(hid_t plist_id, H5D_fill_time_t - *fill_time/*out*/); +H5_DLL herr_t H5Pget_fill_time(hid_t plist_id, H5D_fill_time_t *fill_time /*out*/); /** *------------------------------------------------------------------------- * @@ -723,8 +719,7 @@ H5_DLL herr_t H5Pget_fill_time(hid_t plist_id, H5D_fill_time_t * \since 1.0.0 * */ -H5_DLL herr_t H5Pget_fill_value(hid_t plist_id, hid_t type_id, - void *value/*out*/); +H5_DLL herr_t H5Pget_fill_value(hid_t plist_id, hid_t type_id, void *value /*out*/); /** *------------------------------------------------------------------------- * \ingroup DCPL @@ -941,8 +936,7 @@ H5_DLL herr_t H5Pset_fill_time(hid_t plist_id, H5D_fill_time_t fill_time); * \since 1.0.0 * */ -H5_DLL herr_t H5Pset_fill_value(hid_t plist_id, hid_t type_id, - const void *value); +H5_DLL herr_t H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value); /** *------------------------------------------------------------------------- * @@ -1173,25 +1167,25 @@ H5_DLL herr_t H5Pset_layout(hid_t plist_id, H5D_layout_t layout); * *-------------------------------------------------------------------------- */ -H5_DLL herr_t H5Pset_szip(hid_t plist_id, unsigned options_mask, unsigned pixels_per_block); -H5_DLL herr_t H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, - const char *src_dset_name, hid_t src_space_id); -H5_DLL herr_t H5Pget_virtual_count(hid_t dcpl_id, size_t *count /*out*/); -H5_DLL hid_t H5Pget_virtual_vspace(hid_t dcpl_id, size_t index); -H5_DLL hid_t H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index); -H5_DLL ssize_t H5Pget_virtual_filename(hid_t dcpl_id, size_t index, char *name /*out*/, size_t size); -H5_DLL ssize_t H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, char *name /*out*/, size_t size); -H5_DLL herr_t H5Pset_external(hid_t plist_id, const char *name, off_t offset, hsize_t size); -H5_DLL int H5Pget_external_count(hid_t plist_id); -H5_DLL herr_t H5Pget_external(hid_t plist_id, unsigned idx, size_t name_size, char *name /*out*/, - off_t *offset /*out*/, hsize_t *size /*out*/); -H5_DLL herr_t H5Pset_nbit(hid_t plist_id); -H5_DLL herr_t H5Pset_scaleoffset(hid_t plist_id, H5Z_SO_scale_type_t scale_type, int scale_factor); -H5_DLL herr_t H5Pfill_value_defined(hid_t plist, H5D_fill_value_t *status); -H5_DLL herr_t H5Pset_alloc_time(hid_t plist_id, H5D_alloc_time_t alloc_time); -H5_DLL herr_t H5Pget_alloc_time(hid_t plist_id, H5D_alloc_time_t *alloc_time /*out*/); -H5_DLL herr_t H5Pget_dset_no_attrs_hint(hid_t dcpl_id, hbool_t *minimize); -H5_DLL herr_t H5Pset_dset_no_attrs_hint(hid_t dcpl_id, hbool_t minimize); +H5_DLL herr_t H5Pset_szip(hid_t plist_id, unsigned options_mask, unsigned pixels_per_block); +H5_DLL herr_t H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, + const char *src_dset_name, hid_t src_space_id); +H5_DLL herr_t H5Pget_virtual_count(hid_t dcpl_id, size_t *count /*out*/); +H5_DLL hid_t H5Pget_virtual_vspace(hid_t dcpl_id, size_t index); +H5_DLL hid_t H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index); +H5_DLL ssize_t H5Pget_virtual_filename(hid_t dcpl_id, size_t index, char *name /*out*/, size_t size); +H5_DLL ssize_t H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, char *name /*out*/, size_t size); +H5_DLL herr_t H5Pset_external(hid_t plist_id, const char *name, off_t offset, hsize_t size); +H5_DLL int H5Pget_external_count(hid_t plist_id); +H5_DLL herr_t H5Pget_external(hid_t plist_id, unsigned idx, size_t name_size, char *name /*out*/, + off_t *offset /*out*/, hsize_t *size /*out*/); +H5_DLL herr_t H5Pset_nbit(hid_t plist_id); +H5_DLL herr_t H5Pset_scaleoffset(hid_t plist_id, H5Z_SO_scale_type_t scale_type, int scale_factor); +H5_DLL herr_t H5Pfill_value_defined(hid_t plist, H5D_fill_value_t *status); +H5_DLL herr_t H5Pset_alloc_time(hid_t plist_id, H5D_alloc_time_t alloc_time); +H5_DLL herr_t H5Pget_alloc_time(hid_t plist_id, H5D_alloc_time_t *alloc_time /*out*/); +H5_DLL herr_t H5Pget_dset_no_attrs_hint(hid_t dcpl_id, hbool_t *minimize); +H5_DLL herr_t H5Pset_dset_no_attrs_hint(hid_t dcpl_id, hbool_t minimize); /* Dataset access property list (DAPL) routines */ H5_DLL herr_t H5Pset_chunk_cache(hid_t dapl_id, size_t rdcc_nslots, size_t rdcc_nbytes, double rdcc_w0); @@ -1300,15 +1294,15 @@ H5_DLL herr_t H5Pget_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t *func, /* Typedefs */ /* Function prototypes */ -H5_DLL herr_t H5Pregister1(hid_t cls_id, const char *name, size_t size, void *def_value, - H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set, - H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_del, - H5P_prp_copy_func_t prp_copy, H5P_prp_close_func_t prp_close); -H5_DLL herr_t H5Pinsert1(hid_t plist_id, const char *name, size_t size, void *value, - H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get, - H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy, - H5P_prp_close_func_t prp_close); -H5_DLL herr_t H5Pencode1(hid_t plist_id, void *buf, size_t *nalloc); +H5_DLL herr_t H5Pregister1(hid_t cls_id, const char *name, size_t size, void *def_value, + H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set, + H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_del, + H5P_prp_copy_func_t prp_copy, H5P_prp_close_func_t prp_close); +H5_DLL herr_t H5Pinsert1(hid_t plist_id, const char *name, size_t size, void *value, + H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get, + H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy, + H5P_prp_close_func_t prp_close); +H5_DLL herr_t H5Pencode1(hid_t plist_id, void *buf, size_t *nalloc); /** *------------------------------------------------------------------------- * \ingroup OCPL diff --git a/src/H5Spkg.h b/src/H5Spkg.h index 159e485cd06..3bca293a8fb 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -138,10 +138,10 @@ struct H5S_pnt_list_t { H5S_pnt_node_t *head; /* Pointer to head of point list */ H5S_pnt_node_t *tail; /* Pointer to tail of point list */ - hsize_t last_idx; /* Index of the point after the last returned from H5S__get_select_elem_pointlist() */ + hsize_t last_idx; /* Index of the point after the last returned from H5S__get_select_elem_pointlist() */ H5S_pnt_node_t *last_idx_pnt; /* Point after the last returned from H5S__get_select_elem_pointlist(). - * If we ever add a way to remove points or add points in the middle of - * the pointlist we will need to invalidate these fields. */ + * If we ever add a way to remove points or add points in the middle of + * the pointlist we will need to invalidate these fields. */ }; /* Information about hyperslab spans */ @@ -285,23 +285,28 @@ typedef struct { H5S_sel_copy_func_t copy; /* Method to make a copy of a selection */ H5S_sel_release_func_t release; /* Method to release current selection */ H5S_sel_is_valid_func_t is_valid; /* Method to determine if current selection is valid for dataspace */ - H5S_sel_serial_size_func_t serial_size; /* Method to determine number of bytes required to store current selection */ + H5S_sel_serial_size_func_t + serial_size; /* Method to determine number of bytes required to store current selection */ H5S_sel_serialize_func_t serialize; /* Method to store current selection in "serialized" form (a byte sequence suitable for storing on disk) */ H5S_sel_deserialize_func_t deserialize; /* Method to store create selection from "serialized" form (a byte sequence suitable for storing on disk) */ - H5S_sel_bounds_func_t bounds; /* Method to determine to smallest n-D bounding box containing the current selection */ - H5S_sel_offset_func_t offset; /* Method to determine linear offset of initial element in selection within dataspace */ + H5S_sel_bounds_func_t + bounds; /* Method to determine to smallest n-D bounding box containing the current selection */ + H5S_sel_offset_func_t + offset; /* Method to determine linear offset of initial element in selection within dataspace */ H5S_sel_unlim_dim_func_t unlim_dim; /* Method to get unlimited dimension of selection (or -1 for none) */ H5S_sel_num_elem_non_unlim_func_t num_elem_non_unlim; /* Method to get the number of elements in a slice through the unlimited dimension */ H5S_sel_is_contiguous_func_t is_contiguous; /* Method to determine if current selection is contiguous */ H5S_sel_is_single_func_t is_single; /* Method to determine if current selection is a single block */ H5S_sel_is_regular_func_t is_regular; /* Method to determine if current selection is "regular" */ - H5S_sel_shape_same_func_t shape_same; /* Method to determine if two dataspaces' selections are the same shape */ - H5S_sel_intersect_block_func_t intersect_block; /* Method to determine if a dataspaces' selection intersects a block */ - H5S_sel_adjust_u_func_t adjust_u; /* Method to adjust a selection by an offset */ - H5S_sel_adjust_s_func_t adjust_s; /* Method to adjust a selection by an offset (signed) */ + H5S_sel_shape_same_func_t + shape_same; /* Method to determine if two dataspaces' selections are the same shape */ + H5S_sel_intersect_block_func_t + intersect_block; /* Method to determine if a dataspaces' selection intersects a block */ + H5S_sel_adjust_u_func_t adjust_u; /* Method to adjust a selection by an offset */ + H5S_sel_adjust_s_func_t adjust_s; /* Method to adjust a selection by an offset (signed) */ H5S_sel_project_scalar project_scalar; /* Method to construct scalar dataspace projection */ H5S_sel_project_simple project_simple; /* Method to construct simple dataspace projection */ H5S_sel_iter_init_func_t iter_init; /* Method to initialize iterator for current selection */ @@ -352,13 +357,20 @@ typedef struct H5S_sel_iter_class_t { H5S_sel_type type; /* Type of selection (all, none, points or hyperslab) */ /* Methods on selections */ - H5S_sel_iter_coords_func_t iter_coords; /* Method to retrieve the current coordinates of iterator for current selection */ - H5S_sel_iter_block_func_t iter_block; /* Method to retrieve the current block of iterator for current selection */ - H5S_sel_iter_nelmts_func_t iter_nelmts; /* Method to determine number of elements left in iterator for current selection */ - H5S_sel_iter_has_next_block_func_t iter_has_next_block; /* Method to query if there is another block left in the selection */ - H5S_sel_iter_next_func_t iter_next; /* Method to move selection iterator to the next element in the selection */ - H5S_sel_iter_next_block_func_t iter_next_block; /* Method to move selection iterator to the next block in the selection */ - H5S_sel_iter_get_seq_list_func_t iter_get_seq_list; /* Method to retrieve a list of offset/length sequences for selection iterator */ + H5S_sel_iter_coords_func_t + iter_coords; /* Method to retrieve the current coordinates of iterator for current selection */ + H5S_sel_iter_block_func_t + iter_block; /* Method to retrieve the current block of iterator for current selection */ + H5S_sel_iter_nelmts_func_t + iter_nelmts; /* Method to determine number of elements left in iterator for current selection */ + H5S_sel_iter_has_next_block_func_t + iter_has_next_block; /* Method to query if there is another block left in the selection */ + H5S_sel_iter_next_func_t + iter_next; /* Method to move selection iterator to the next element in the selection */ + H5S_sel_iter_next_block_func_t + iter_next_block; /* Method to move selection iterator to the next block in the selection */ + H5S_sel_iter_get_seq_list_func_t + iter_get_seq_list; /* Method to retrieve a list of offset/length sequences for selection iterator */ H5S_sel_iter_release_func_t iter_release; /* Method to release iterator for current selection */ } H5S_sel_iter_class_t; diff --git a/src/H5Spoint.c b/src/H5Spoint.c index 966333c9b67..5a38c2833a5 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -843,7 +843,7 @@ H5S__copy_pnt_list(const H5S_pnt_list_t *src, unsigned rank) H5MM_memcpy(dst->low_bounds, src->low_bounds, (rank * sizeof(hsize_t))); /* Clear cached iteration point */ - dst->last_idx = 0; + dst->last_idx = 0; dst->last_idx_pnt = NULL; /* Set return value */ @@ -1515,8 +1515,8 @@ static herr_t H5S__get_select_elem_pointlist(const H5S_t *space, hsize_t startpoint, hsize_t numpoints, hsize_t *buf) { const hsize_t endpoint = startpoint + numpoints; /* Index of last point in iteration */ - H5S_pnt_node_t *node; /* Point node */ - unsigned rank; /* Dataspace rank */ + H5S_pnt_node_t *node; /* Point node */ + unsigned rank; /* Dataspace rank */ FUNC_ENTER_STATIC_NOERR @@ -1527,8 +1527,8 @@ H5S__get_select_elem_pointlist(const H5S_t *space, hsize_t startpoint, hsize_t n rank = space->extent.rank; /* Check for cached point at the correct index */ - if(space->select.sel_info.pnt_lst->last_idx_pnt - && startpoint == space->select.sel_info.pnt_lst->last_idx) + if (space->select.sel_info.pnt_lst->last_idx_pnt && + startpoint == space->select.sel_info.pnt_lst->last_idx) node = space->select.sel_info.pnt_lst->last_idx_pnt; else { /* Get the head of the point list */ @@ -1539,7 +1539,7 @@ H5S__get_select_elem_pointlist(const H5S_t *space, hsize_t startpoint, hsize_t n startpoint--; node = node->next; } /* end while */ - } /* end else */ + } /* end else */ /* Iterate through the node, copying each point's information */ while (node != NULL && numpoints > 0) { @@ -1550,7 +1550,7 @@ H5S__get_select_elem_pointlist(const H5S_t *space, hsize_t startpoint, hsize_t n } /* end while */ /* Cached next point in iteration */ - space->select.sel_info.pnt_lst->last_idx = endpoint; + space->select.sel_info.pnt_lst->last_idx = endpoint; space->select.sel_info.pnt_lst->last_idx_pnt = node; FUNC_LEAVE_NOAPI(SUCCEED) @@ -2345,7 +2345,7 @@ H5S__point_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of } /* end else */ /* Clear cached iteration point */ - new_space->select.sel_info.pnt_lst->last_idx = 0; + new_space->select.sel_info.pnt_lst->last_idx = 0; new_space->select.sel_info.pnt_lst->last_idx_pnt = NULL; /* Number of elements selected will be the same */ diff --git a/src/H5Spublic.h b/src/H5Spublic.h index c16af9332d4..62e2128cf21 100644 --- a/src/H5Spublic.h +++ b/src/H5Spublic.h @@ -171,7 +171,7 @@ H5_DLL herr_t H5Sclose(hid_t space_id); * \since 1.0.0 * */ -H5_DLL hid_t H5Screate(H5S_class_t type); +H5_DLL hid_t H5Screate(H5S_class_t type); /** * \ingroup H5S * \brief Creates a new simple dataspace and opens it for access @@ -222,7 +222,7 @@ H5_DLL hid_t H5Screate(H5S_class_t type); * \since 1.0.0 * */ -H5_DLL hid_t H5Screate_simple(int rank, const hsize_t dims[], const hsize_t maxdims[]); +H5_DLL hid_t H5Screate_simple(int rank, const hsize_t dims[], const hsize_t maxdims[]); /*--------------------------------------------------------------------------*/ /**\ingroup H5S * @@ -269,8 +269,7 @@ H5_DLL hssize_t H5Sget_select_npoints(hid_t spaceid); * \since 1.0.0 * */ -H5_DLL int H5Sget_simple_extent_dims(hid_t space_id, hsize_t dims[], - hsize_t maxdims[]); +H5_DLL int H5Sget_simple_extent_dims(hid_t space_id, hsize_t dims[], hsize_t maxdims[]); /*-------------------------------------------------------------------------*/ /**\ingroup H5S * @@ -394,9 +393,8 @@ H5_DLL int H5Sget_simple_extent_ndims(hid_t space_id); * \since 1.0.0 * */ -H5_DLL herr_t H5Sselect_hyperslab(hid_t space_id, H5S_seloper_t op, - const hsize_t start[], const hsize_t stride[], const hsize_t count[], - const hsize_t block[]); +H5_DLL herr_t H5Sselect_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[], + const hsize_t stride[], const hsize_t count[], const hsize_t block[]); H5_DLL herr_t H5Sset_extent_simple(hid_t space_id, int rank, const hsize_t dims[], const hsize_t max[]); H5_DLL hid_t H5Scopy(hid_t space_id); H5_DLL herr_t H5Sencode2(hid_t obj_id, void *buf, size_t *nalloc, hid_t fapl); diff --git a/src/H5TS.c b/src/H5TS.c index ea309bb2f7a..6e3f0dfc12d 100644 --- a/src/H5TS.c +++ b/src/H5TS.c @@ -52,7 +52,7 @@ typedef struct H5TS_cancel_struct { /********************/ /* Local Prototypes */ /********************/ -static void H5TS__key_destructor(void *key_val); +static void H5TS__key_destructor(void *key_val); /*********************/ /* Package Variables */ @@ -478,7 +478,7 @@ H5TS_cancel_count_inc(void) HDfree(cancel_counter); return FAIL; } /* end if */ - } /* end if */ + } /* end if */ /* Check if thread entering library */ if (cancel_counter->cancel_count == 0) diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index 4f3d89d3f2d..e96921fae14 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -338,7 +338,8 @@ typedef struct H5T_shared_t { H5T_class_t type; /*which class of type is this? */ size_t size; /*total size of an instance of this type */ unsigned version; /* Version of object header message to encode this object with */ - hbool_t force_conv; /* Set if this type always needs to be converted and H5T__conv_noop cannot be called */ + hbool_t + force_conv; /* Set if this type always needs to be converted and H5T__conv_noop cannot be called */ struct H5T_t * parent; /*parent type for derived datatypes */ H5VL_object_t *owned_vol_obj; /* Vol object owned by this type (free on close) */ union { diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h index b3dc064708a..52f1c1441a0 100644 --- a/src/H5Tprivate.h +++ b/src/H5Tprivate.h @@ -24,12 +24,12 @@ typedef struct H5T_t H5T_t; #include "H5Tpublic.h" /* Other public headers needed by this file */ -#include "H5MMpublic.h" /* Memory management */ +#include "H5MMpublic.h" /* Memory management */ /* Private headers needed by this file */ -#include "H5private.h" /* Generic Functions */ -#include "H5Gprivate.h" /* Groups */ -#include "H5Rprivate.h" /* References */ +#include "H5private.h" /* Generic Functions */ +#include "H5Gprivate.h" /* Groups */ +#include "H5Rprivate.h" /* References */ #include "H5VLprivate.h" /* VOL Drivers */ /* Macro for size of temporary buffers to contain a single element */ diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h index 68a1d797c60..3bd4c709515 100644 --- a/src/H5Tpublic.h +++ b/src/H5Tpublic.h @@ -30,20 +30,20 @@ */ //! [H5T_class_t_snip] typedef enum H5T_class_t { - H5T_NO_CLASS = -1, /**< error */ - H5T_INTEGER = 0, /**< integer types */ - H5T_FLOAT = 1, /**< floating-point types */ - H5T_TIME = 2, /**< date and time types */ - H5T_STRING = 3, /**< character string types */ - H5T_BITFIELD = 4, /**< bit field types */ - H5T_OPAQUE = 5, /**< opaque types */ - H5T_COMPOUND = 6, /**< compound types */ - H5T_REFERENCE = 7, /**< reference types */ - H5T_ENUM = 8, /**< enumeration types */ - H5T_VLEN = 9, /**< variable-Length types */ - H5T_ARRAY = 10, /**< array types */ + H5T_NO_CLASS = -1, /**< error */ + H5T_INTEGER = 0, /**< integer types */ + H5T_FLOAT = 1, /**< floating-point types */ + H5T_TIME = 2, /**< date and time types */ + H5T_STRING = 3, /**< character string types */ + H5T_BITFIELD = 4, /**< bit field types */ + H5T_OPAQUE = 5, /**< opaque types */ + H5T_COMPOUND = 6, /**< compound types */ + H5T_REFERENCE = 7, /**< reference types */ + H5T_ENUM = 8, /**< enumeration types */ + H5T_VLEN = 9, /**< variable-Length types */ + H5T_ARRAY = 10, /**< array types */ - H5T_NCLASSES /**< sentinel: this must be last */ + H5T_NCLASSES /**< sentinel: this must be last */ } H5T_class_t; //! [H5T_class_t_snip] @@ -52,12 +52,12 @@ typedef enum H5T_class_t { */ //! [H5T_order_t_snip] typedef enum H5T_order_t { - H5T_ORDER_ERROR = -1, /**< error */ - H5T_ORDER_LE = 0, /**< little endian */ - H5T_ORDER_BE = 1, /**< bit endian */ - H5T_ORDER_VAX = 2, /**< VAX mixed endian */ - H5T_ORDER_MIXED = 3, /**< Compound type with mixed member orders */ - H5T_ORDER_NONE = 4 /**< no particular order (strings, bits,..) */ + H5T_ORDER_ERROR = -1, /**< error */ + H5T_ORDER_LE = 0, /**< little endian */ + H5T_ORDER_BE = 1, /**< bit endian */ + H5T_ORDER_VAX = 2, /**< VAX mixed endian */ + H5T_ORDER_MIXED = 3, /**< Compound type with mixed member orders */ + H5T_ORDER_NONE = 4 /**< no particular order (strings, bits,..) */ /*H5T_ORDER_NONE must be last */ } H5T_order_t; //! [H5T_order_t_snip] @@ -67,11 +67,11 @@ typedef enum H5T_order_t { */ //! [H5T_sign_t_snip] typedef enum H5T_sign_t { - H5T_SGN_ERROR = -1, /**< error */ - H5T_SGN_NONE = 0, /**< this is an unsigned type */ - H5T_SGN_2 = 1, /**< two's complement */ + H5T_SGN_ERROR = -1, /**< error */ + H5T_SGN_NONE = 0, /**< this is an unsigned type */ + H5T_SGN_2 = 1, /**< two's complement */ - H5T_NSGN = 2 /** sentinel: this must be last! */ + H5T_NSGN = 2 /** sentinel: this must be last! */ } H5T_sign_t; //! [H5T_sign_t_snip] @@ -80,10 +80,10 @@ typedef enum H5T_sign_t { */ //! [H5T_norm_t_snip] typedef enum H5T_norm_t { - H5T_NORM_ERROR = -1, /**< error */ - H5T_NORM_IMPLIED = 0, /**< msb of mantissa isn't stored, always 1 */ - H5T_NORM_MSBSET = 1, /**< msb of mantissa is always 1 */ - H5T_NORM_NONE = 2 /**< not normalized */ + H5T_NORM_ERROR = -1, /**< error */ + H5T_NORM_IMPLIED = 0, /**< msb of mantissa isn't stored, always 1 */ + H5T_NORM_MSBSET = 1, /**< msb of mantissa is always 1 */ + H5T_NORM_NONE = 2 /**< not normalized */ /*H5T_NORM_NONE must be last */ } H5T_norm_t; //! [H5T_norm_t_snip] @@ -93,62 +93,62 @@ typedef enum H5T_norm_t { * \internal Do not change these values since they appear in HDF5 files! */ typedef enum H5T_cset_t { - H5T_CSET_ERROR = -1, /**< error */ - H5T_CSET_ASCII = 0, /**< US ASCII */ - H5T_CSET_UTF8 = 1, /**< UTF-8 Unicode encoding */ - H5T_CSET_RESERVED_2 = 2, /**< reserved for later use */ - H5T_CSET_RESERVED_3 = 3, /**< reserved for later use */ - H5T_CSET_RESERVED_4 = 4, /**< reserved for later use */ - H5T_CSET_RESERVED_5 = 5, /**< reserved for later use */ - H5T_CSET_RESERVED_6 = 6, /**< reserved for later use */ - H5T_CSET_RESERVED_7 = 7, /**< reserved for later use */ - H5T_CSET_RESERVED_8 = 8, /**< reserved for later use */ - H5T_CSET_RESERVED_9 = 9, /**< reserved for later use */ - H5T_CSET_RESERVED_10 = 10, /**< reserved for later use */ - H5T_CSET_RESERVED_11 = 11, /**< reserved for later use */ - H5T_CSET_RESERVED_12 = 12, /**< reserved for later use */ - H5T_CSET_RESERVED_13 = 13, /**< reserved for later use */ - H5T_CSET_RESERVED_14 = 14, /**< reserved for later use */ - H5T_CSET_RESERVED_15 = 15 /**< reserved for later use */ + H5T_CSET_ERROR = -1, /**< error */ + H5T_CSET_ASCII = 0, /**< US ASCII */ + H5T_CSET_UTF8 = 1, /**< UTF-8 Unicode encoding */ + H5T_CSET_RESERVED_2 = 2, /**< reserved for later use */ + H5T_CSET_RESERVED_3 = 3, /**< reserved for later use */ + H5T_CSET_RESERVED_4 = 4, /**< reserved for later use */ + H5T_CSET_RESERVED_5 = 5, /**< reserved for later use */ + H5T_CSET_RESERVED_6 = 6, /**< reserved for later use */ + H5T_CSET_RESERVED_7 = 7, /**< reserved for later use */ + H5T_CSET_RESERVED_8 = 8, /**< reserved for later use */ + H5T_CSET_RESERVED_9 = 9, /**< reserved for later use */ + H5T_CSET_RESERVED_10 = 10, /**< reserved for later use */ + H5T_CSET_RESERVED_11 = 11, /**< reserved for later use */ + H5T_CSET_RESERVED_12 = 12, /**< reserved for later use */ + H5T_CSET_RESERVED_13 = 13, /**< reserved for later use */ + H5T_CSET_RESERVED_14 = 14, /**< reserved for later use */ + H5T_CSET_RESERVED_15 = 15 /**< reserved for later use */ } H5T_cset_t; -#define H5T_NCSET H5T_CSET_RESERVED_2 /*Number of character sets actually defined */ +#define H5T_NCSET H5T_CSET_RESERVED_2 /*Number of character sets actually defined */ /** * Type of padding to use in character strings. * \internal Do not change these values since they appear in HDF5 files! */ typedef enum H5T_str_t { - H5T_STR_ERROR = -1, /**< error */ - H5T_STR_NULLTERM = 0, /**< null terminate like in C */ - H5T_STR_NULLPAD = 1, /**< pad with nulls */ - H5T_STR_SPACEPAD = 2, /**< pad with spaces like in Fortran */ - H5T_STR_RESERVED_3 = 3, /**< reserved for later use */ - H5T_STR_RESERVED_4 = 4, /**< reserved for later use */ - H5T_STR_RESERVED_5 = 5, /**< reserved for later use */ - H5T_STR_RESERVED_6 = 6, /**< reserved for later use */ - H5T_STR_RESERVED_7 = 7, /**< reserved for later use */ - H5T_STR_RESERVED_8 = 8, /**< reserved for later use */ - H5T_STR_RESERVED_9 = 9, /**< reserved for later use */ - H5T_STR_RESERVED_10 = 10, /**< reserved for later use */ - H5T_STR_RESERVED_11 = 11, /**< reserved for later use */ - H5T_STR_RESERVED_12 = 12, /**< reserved for later use */ - H5T_STR_RESERVED_13 = 13, /**< reserved for later use */ - H5T_STR_RESERVED_14 = 14, /**< reserved for later use */ - H5T_STR_RESERVED_15 = 15 /**< reserved for later use */ + H5T_STR_ERROR = -1, /**< error */ + H5T_STR_NULLTERM = 0, /**< null terminate like in C */ + H5T_STR_NULLPAD = 1, /**< pad with nulls */ + H5T_STR_SPACEPAD = 2, /**< pad with spaces like in Fortran */ + H5T_STR_RESERVED_3 = 3, /**< reserved for later use */ + H5T_STR_RESERVED_4 = 4, /**< reserved for later use */ + H5T_STR_RESERVED_5 = 5, /**< reserved for later use */ + H5T_STR_RESERVED_6 = 6, /**< reserved for later use */ + H5T_STR_RESERVED_7 = 7, /**< reserved for later use */ + H5T_STR_RESERVED_8 = 8, /**< reserved for later use */ + H5T_STR_RESERVED_9 = 9, /**< reserved for later use */ + H5T_STR_RESERVED_10 = 10, /**< reserved for later use */ + H5T_STR_RESERVED_11 = 11, /**< reserved for later use */ + H5T_STR_RESERVED_12 = 12, /**< reserved for later use */ + H5T_STR_RESERVED_13 = 13, /**< reserved for later use */ + H5T_STR_RESERVED_14 = 14, /**< reserved for later use */ + H5T_STR_RESERVED_15 = 15 /**< reserved for later use */ } H5T_str_t; -#define H5T_NSTR H5T_STR_RESERVED_3 /*num H5T_str_t types actually defined */ +#define H5T_NSTR H5T_STR_RESERVED_3 /*num H5T_str_t types actually defined */ /** * Type of padding to use in other atomic types */ //! [H5T_pad_t_snip] typedef enum H5T_pad_t { - H5T_PAD_ERROR = -1, /**< error */ - H5T_PAD_ZERO = 0, /**< always set to zero */ - H5T_PAD_ONE = 1, /**< always set to one */ - H5T_PAD_BACKGROUND = 2, /**< set to background value */ + H5T_PAD_ERROR = -1, /**< error */ + H5T_PAD_ZERO = 0, /**< always set to zero */ + H5T_PAD_ONE = 1, /**< always set to one */ + H5T_PAD_BACKGROUND = 2, /**< set to background value */ - H5T_NPAD = 3 /**< sentinal: THIS MUST BE LAST */ + H5T_NPAD = 3 /**< sentinal: THIS MUST BE LAST */ } H5T_pad_t; //! [H5T_pad_t_snip] @@ -156,18 +156,18 @@ typedef enum H5T_pad_t { * Commands sent to conversion functions */ typedef enum H5T_cmd_t { - H5T_CONV_INIT = 0, /**< query and/or initialize private data */ - H5T_CONV_CONV = 1, /**< convert data from source to dest datatype */ - H5T_CONV_FREE = 2 /**< function is being removed from path */ + H5T_CONV_INIT = 0, /**< query and/or initialize private data */ + H5T_CONV_CONV = 1, /**< convert data from source to dest datatype */ + H5T_CONV_FREE = 2 /**< function is being removed from path */ } H5T_cmd_t; /** * How is the `bkg' buffer used by the conversion function? */ typedef enum H5T_bkg_t { - H5T_BKG_NO = 0, /**< background buffer is not needed, send NULL */ - H5T_BKG_TEMP = 1, /**< bkg buffer used as temp storage only */ - H5T_BKG_YES = 2 /**< init bkg buf with data before conversion */ + H5T_BKG_NO = 0, /**< background buffer is not needed, send NULL */ + H5T_BKG_TEMP = 1, /**< bkg buffer used as temp storage only */ + H5T_BKG_YES = 2 /**< init bkg buf with data before conversion */ } H5T_bkg_t; /** @@ -175,10 +175,10 @@ typedef enum H5T_bkg_t { */ //! [H5T_cdata_t_snip] typedef struct H5T_cdata_t { - H5T_cmd_t command;/**< what should the conversion function do? */ - H5T_bkg_t need_bkg;/**< is the background buffer needed? */ - hbool_t recalc; /**< recalculate private data */ - void *priv; /**< private data */ + H5T_cmd_t command; /**< what should the conversion function do? */ + H5T_bkg_t need_bkg; /**< is the background buffer needed? */ + hbool_t recalc; /**< recalculate private data */ + void * priv; /**< private data */ } H5T_cdata_t; //! [H5T_cdata_t_snip] @@ -186,9 +186,9 @@ typedef struct H5T_cdata_t { * Conversion function persistence */ typedef enum H5T_pers_t { - H5T_PERS_DONTCARE = -1, /**< wild card */ - H5T_PERS_HARD = 0, /**< hard conversion function */ - H5T_PERS_SOFT = 1 /**< soft conversion function */ + H5T_PERS_DONTCARE = -1, /**< wild card */ + H5T_PERS_HARD = 0, /**< hard conversion function */ + H5T_PERS_SOFT = 1 /**< soft conversion function */ } H5T_pers_t; /** @@ -196,9 +196,9 @@ typedef enum H5T_pers_t { */ //! [H5T_direction_t_snip] typedef enum H5T_direction_t { - H5T_DIR_DEFAULT = 0, /**< default direction is inscendent */ - H5T_DIR_ASCEND = 1, /**< in inscendent order */ - H5T_DIR_DESCEND = 2 /**< in descendent order */ + H5T_DIR_DEFAULT = 0, /**< default direction is inscendent */ + H5T_DIR_ASCEND = 1, /**< in inscendent order */ + H5T_DIR_DESCEND = 2 /**< in descendent order */ } H5T_direction_t; //! [H5T_direction_t_snip] @@ -206,22 +206,22 @@ typedef enum H5T_direction_t { * The exception type passed into the conversion callback function */ typedef enum H5T_conv_except_t { - H5T_CONV_EXCEPT_RANGE_HI = 0, /**< source value is greater than destination's range */ - H5T_CONV_EXCEPT_RANGE_LOW = 1, /**< source value is less than destination's range */ - H5T_CONV_EXCEPT_PRECISION = 2, /**< source value loses precision in destination */ - H5T_CONV_EXCEPT_TRUNCATE = 3, /**< source value is truncated in destination */ - H5T_CONV_EXCEPT_PINF = 4, /**< source value is positive infinity(floating number) */ - H5T_CONV_EXCEPT_NINF = 5, /**< source value is negative infinity(floating number) */ - H5T_CONV_EXCEPT_NAN = 6 /**< source value is NaN(floating number) */ + H5T_CONV_EXCEPT_RANGE_HI = 0, /**< source value is greater than destination's range */ + H5T_CONV_EXCEPT_RANGE_LOW = 1, /**< source value is less than destination's range */ + H5T_CONV_EXCEPT_PRECISION = 2, /**< source value loses precision in destination */ + H5T_CONV_EXCEPT_TRUNCATE = 3, /**< source value is truncated in destination */ + H5T_CONV_EXCEPT_PINF = 4, /**< source value is positive infinity(floating number) */ + H5T_CONV_EXCEPT_NINF = 5, /**< source value is negative infinity(floating number) */ + H5T_CONV_EXCEPT_NAN = 6 /**< source value is NaN(floating number) */ } H5T_conv_except_t; /** * The return value from conversion callback function H5T_conv_except_func_t() */ typedef enum H5T_conv_ret_t { - H5T_CONV_ABORT = -1, /**< abort conversion */ - H5T_CONV_UNHANDLED = 0, /**< callback function failed to handle the exception */ - H5T_CONV_HANDLED = 1 /**< callback function handled the exception successfully */ + H5T_CONV_ABORT = -1, /**< abort conversion */ + H5T_CONV_UNHANDLED = 0, /**< callback function failed to handle the exception */ + H5T_CONV_HANDLED = 1 /**< callback function handled the exception successfully */ } H5T_conv_ret_t; /** diff --git a/src/H5Tref.c b/src/H5Tref.c index 0c17d49acac..8d7dca2c394 100644 --- a/src/H5Tref.c +++ b/src/H5Tref.c @@ -586,10 +586,10 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size H5VL_object_t H5_ATTR_UNUSED *dst_file, void *dst_buf, size_t dst_size, void H5_ATTR_UNUSED *bg_buf) { - H5F_t * src_f = NULL; - hid_t file_id = H5I_INVALID_HID; - H5R_ref_priv_t *dst_ref = (H5R_ref_priv_t *)dst_buf; - H5R_ref_priv_t tmp_ref; /* Temporary reference to decode into */ + H5F_t * src_f = NULL; + hid_t file_id = H5I_INVALID_HID; + H5R_ref_priv_t *dst_ref = (H5R_ref_priv_t *)dst_buf; + H5R_ref_priv_t tmp_ref; /* Temporary reference to decode into */ herr_t ret_value = SUCCEED; FUNC_ENTER_STATIC diff --git a/src/H5VL.c b/src/H5VL.c index 92b1e4c3a93..d663f84d851 100644 --- a/src/H5VL.c +++ b/src/H5VL.c @@ -92,8 +92,7 @@ H5VLregister_connector(const H5VL_class_t *cls, hid_t vipl_id) HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, "VOL connector class pointer cannot be NULL") if (H5VL_VERSION != cls->version) - HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, - "VOL connector has incompatible version") + HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "VOL connector has incompatible version") if (!cls->name) HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "VOL connector class name cannot be the NULL pointer") diff --git a/src/H5VLcallback.c b/src/H5VLcallback.c index 46572138043..95a6c5242ec 100644 --- a/src/H5VLcallback.c +++ b/src/H5VLcallback.c @@ -29,7 +29,7 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ -#include "H5Fprivate.h" /* File access */ +#include "H5Fprivate.h" /* File access */ #include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ #include "H5Pprivate.h" /* Property lists */ diff --git a/src/H5VLint.c b/src/H5VLint.c index aed397b3fa0..b9c128804cc 100644 --- a/src/H5VLint.c +++ b/src/H5VLint.c @@ -2362,7 +2362,7 @@ H5VL_wrap_register(H5I_type_t type, void *obj, hbool_t app_ref) herr_t H5VL_check_plugin_load(const H5VL_class_t *cls, const H5PL_key_t *key, hbool_t *success) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -2375,16 +2375,16 @@ H5VL_check_plugin_load(const H5VL_class_t *cls, const H5PL_key_t *key, hbool_t * if (key->vol.kind == H5VL_GET_CONNECTOR_BY_NAME) { /* Check if plugin name matches VOL connector class name */ if (cls->name && !HDstrcmp(cls->name, key->vol.u.name)) - *success = TRUE; - } /* end if */ + *success = TRUE; + } /* end if */ else { /* Sanity check */ HDassert(key->vol.kind == H5VL_GET_CONNECTOR_BY_VALUE); /* Check if plugin value matches VOL connector class value */ if (cls->value == key->vol.u.value) - *success = TRUE; - } /* end else */ + *success = TRUE; + } /* end else */ /* Connector is a match, but might not be a compatible version */ if (*success && cls->version != H5VL_VERSION) diff --git a/src/H5VLnative.c b/src/H5VLnative.c index ead3beb981c..f8d26e1ad5d 100644 --- a/src/H5VLnative.c +++ b/src/H5VLnative.c @@ -19,23 +19,23 @@ /* Module Setup */ /****************/ -#define H5VL_FRIEND /* Suppress error about including H5VLpkg */ +#define H5VL_FRIEND /* Suppress error about including H5VLpkg */ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Aprivate.h" /* Attributes */ -#include "H5Dprivate.h" /* Datasets */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Fprivate.h" /* Files */ -#include "H5Gprivate.h" /* Groups */ -#include "H5Iprivate.h" /* IDs */ -#include "H5Oprivate.h" /* Object headers */ -#include "H5Pprivate.h" /* Property lists */ -#include "H5Tprivate.h" /* Datatypes */ -#include "H5VLpkg.h" /* Virtual Object Layer */ +#include "H5private.h" /* Generic Functions */ +#include "H5Aprivate.h" /* Attributes */ +#include "H5Dprivate.h" /* Datasets */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fprivate.h" /* Files */ +#include "H5Gprivate.h" /* Groups */ +#include "H5Iprivate.h" /* IDs */ +#include "H5Oprivate.h" /* Object headers */ +#include "H5Pprivate.h" /* Property lists */ +#include "H5Tprivate.h" /* Datatypes */ +#include "H5VLpkg.h" /* Virtual Object Layer */ #include "H5VLnative_private.h" /* Native VOL connector */ @@ -47,12 +47,12 @@ static herr_t H5VL__native_term(void); /* Native VOL connector class struct */ static const H5VL_class_t H5VL_native_cls_g = { - H5VL_VERSION, /* VOL class struct version */ - H5VL_NATIVE_VALUE, /* value */ - H5VL_NATIVE_NAME, /* name */ - 0, /* capability flags */ - NULL, /* initialize */ - H5VL__native_term, /* terminate */ + H5VL_VERSION, /* VOL class struct version */ + H5VL_NATIVE_VALUE, /* value */ + H5VL_NATIVE_NAME, /* name */ + 0, /* capability flags */ + NULL, /* initialize */ + H5VL__native_term, /* terminate */ { /* info_cls */ (size_t)0, /* info size */ diff --git a/src/H5VLprivate.h b/src/H5VLprivate.h index 581a24db772..e660520370e 100644 --- a/src/H5VLprivate.h +++ b/src/H5VLprivate.h @@ -14,7 +14,7 @@ #define _H5VLprivate_H /* Include package's public header */ -#include "H5VLpublic.h" /* Generic Functions */ +#include "H5VLpublic.h" /* Generic Functions */ /* Private headers needed by this file */ diff --git a/src/H5VLpublic.h b/src/H5VLpublic.h index a492291ca64..6e35746ee1b 100644 --- a/src/H5VLpublic.h +++ b/src/H5VLpublic.h @@ -84,19 +84,19 @@ typedef int H5VL_class_value_t; * (Used for various queries, etc) */ typedef enum H5VL_subclass_t { - H5VL_SUBCLS_NONE, /**< Operations outside of a subclass */ - H5VL_SUBCLS_INFO, /**< 'Info' subclass */ - H5VL_SUBCLS_WRAP, /**< 'Wrap' subclass */ - H5VL_SUBCLS_ATTR, /**< 'Attribute' subclass */ - H5VL_SUBCLS_DATASET, /**< 'Dataset' subclass */ - H5VL_SUBCLS_DATATYPE, /**< 'Named datatype' subclass */ - H5VL_SUBCLS_FILE, /**< 'File' subclass */ - H5VL_SUBCLS_GROUP, /**< 'Group' subclass */ - H5VL_SUBCLS_LINK, /**< 'Link' subclass */ - H5VL_SUBCLS_OBJECT, /**< 'Object' subclass */ - H5VL_SUBCLS_REQUEST, /**< 'Request' subclass */ - H5VL_SUBCLS_BLOB, /**< 'Blob' subclass */ - H5VL_SUBCLS_TOKEN /**< 'Token' subclass */ + H5VL_SUBCLS_NONE, /**< Operations outside of a subclass */ + H5VL_SUBCLS_INFO, /**< 'Info' subclass */ + H5VL_SUBCLS_WRAP, /**< 'Wrap' subclass */ + H5VL_SUBCLS_ATTR, /**< 'Attribute' subclass */ + H5VL_SUBCLS_DATASET, /**< 'Dataset' subclass */ + H5VL_SUBCLS_DATATYPE, /**< 'Named datatype' subclass */ + H5VL_SUBCLS_FILE, /**< 'File' subclass */ + H5VL_SUBCLS_GROUP, /**< 'Group' subclass */ + H5VL_SUBCLS_LINK, /**< 'Link' subclass */ + H5VL_SUBCLS_OBJECT, /**< 'Object' subclass */ + H5VL_SUBCLS_REQUEST, /**< 'Request' subclass */ + H5VL_SUBCLS_BLOB, /**< 'Blob' subclass */ + H5VL_SUBCLS_TOKEN /**< 'Token' subclass */ } H5VL_subclass_t; /********************/ @@ -342,8 +342,8 @@ H5_DLL herr_t H5VLquery_optional(hid_t obj_id, H5VL_subclass_t subcls, int opt_t #endif /* Semi-public headers mainly for VOL connector authors */ -#include "H5VLconnector.h" /* VOL connector author routines */ +#include "H5VLconnector.h" /* VOL connector author routines */ #include "H5VLconnector_passthru.h" /* Pass-through VOL connector author routines */ -#include "H5VLnative.h" /* Native VOL connector macros, for VOL connector authors */ +#include "H5VLnative.h" /* Native VOL connector macros, for VOL connector authors */ #endif /* _H5VLpublic_H */ diff --git a/src/H5Znbit.c b/src/H5Znbit.c index d85ebfe5a37..ca5f74a6149 100644 --- a/src/H5Znbit.c +++ b/src/H5Znbit.c @@ -95,13 +95,13 @@ H5Z_class2_t H5Z_NBIT[1] = {{ }}; /* Local macros */ -#define H5Z_NBIT_ATOMIC 1 /* Atomic datatype class: integer/floating-point */ -#define H5Z_NBIT_ARRAY 2 /* Array datatype class */ -#define H5Z_NBIT_COMPOUND 3 /* Compound datatype class */ -#define H5Z_NBIT_NOOPTYPE 4 /* Other datatype class: nbit does no compression */ +#define H5Z_NBIT_ATOMIC 1 /* Atomic datatype class: integer/floating-point */ +#define H5Z_NBIT_ARRAY 2 /* Array datatype class */ +#define H5Z_NBIT_COMPOUND 3 /* Compound datatype class */ +#define H5Z_NBIT_NOOPTYPE 4 /* Other datatype class: nbit does no compression */ #define H5Z_NBIT_MAX_NPARMS 4096 /* Max number of parameters for filter */ -#define H5Z_NBIT_ORDER_LE 0 /* Little endian for datatype byte order */ -#define H5Z_NBIT_ORDER_BE 1 /* Big endian for datatype byte order */ +#define H5Z_NBIT_ORDER_LE 0 /* Little endian for datatype byte order */ +#define H5Z_NBIT_ORDER_BE 1 /* Big endian for datatype byte order */ /* Local variables */ diff --git a/src/H5Zpublic.h b/src/H5Zpublic.h index 56047ae645e..70278c34a2f 100644 --- a/src/H5Zpublic.h +++ b/src/H5Zpublic.h @@ -216,10 +216,10 @@ typedef enum H5Z_SO_scale_type_t { * Values to decide if EDC is enabled for reading data */ typedef enum H5Z_EDC_t { - H5Z_ERROR_EDC = -1, /**< error value */ - H5Z_DISABLE_EDC = 0, - H5Z_ENABLE_EDC = 1, - H5Z_NO_EDC = 2 /**< sentinel */ + H5Z_ERROR_EDC = -1, /**< error value */ + H5Z_DISABLE_EDC = 0, + H5Z_ENABLE_EDC = 1, + H5Z_NO_EDC = 2 /**< sentinel */ } H5Z_EDC_t; /* Bit flags for H5Zget_filter_info */ @@ -230,10 +230,10 @@ typedef enum H5Z_EDC_t { * Return values for filter callback function */ typedef enum H5Z_cb_return_t { - H5Z_CB_ERROR = -1, - H5Z_CB_FAIL = 0, /**< I/O should fail if filter fails. */ - H5Z_CB_CONT = 1, /**< I/O continues if filter fails. */ - H5Z_CB_NO = 2 + H5Z_CB_ERROR = -1, + H5Z_CB_FAIL = 0, /**< I/O should fail if filter fails. */ + H5Z_CB_CONT = 1, /**< I/O continues if filter fails. */ + H5Z_CB_NO = 2 } H5Z_cb_return_t; /** diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c index 96360eb7be5..d4a72a4ed18 100644 --- a/src/H5Zscaleoffset.c +++ b/src/H5Zscaleoffset.c @@ -103,14 +103,14 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ /* Local macros */ #define H5Z_SCALEOFFSET_TOTAL_NPARMS 20 /* Total number of parameters for filter */ -#define H5Z_SCALEOFFSET_PARM_SCALETYPE 0 /* "User" parameter for scale type */ -#define H5Z_SCALEOFFSET_PARM_SCALEFACTOR 1 /* "User" parameter for scale factor */ -#define H5Z_SCALEOFFSET_PARM_NELMTS 2 /* "Local" parameter for number of elements in the chunk */ -#define H5Z_SCALEOFFSET_PARM_CLASS 3 /* "Local" parameter for datatype class */ -#define H5Z_SCALEOFFSET_PARM_SIZE 4 /* "Local" parameter for datatype size */ -#define H5Z_SCALEOFFSET_PARM_SIGN 5 /* "Local" parameter for integer datatype sign */ -#define H5Z_SCALEOFFSET_PARM_ORDER 6 /* "Local" parameter for datatype byte order */ -#define H5Z_SCALEOFFSET_PARM_FILAVAIL 7 /* "Local" parameter for dataset fill value existence */ +#define H5Z_SCALEOFFSET_PARM_SCALETYPE 0 /* "User" parameter for scale type */ +#define H5Z_SCALEOFFSET_PARM_SCALEFACTOR 1 /* "User" parameter for scale factor */ +#define H5Z_SCALEOFFSET_PARM_NELMTS 2 /* "Local" parameter for number of elements in the chunk */ +#define H5Z_SCALEOFFSET_PARM_CLASS 3 /* "Local" parameter for datatype class */ +#define H5Z_SCALEOFFSET_PARM_SIZE 4 /* "Local" parameter for datatype size */ +#define H5Z_SCALEOFFSET_PARM_SIGN 5 /* "Local" parameter for integer datatype sign */ +#define H5Z_SCALEOFFSET_PARM_ORDER 6 /* "Local" parameter for datatype byte order */ +#define H5Z_SCALEOFFSET_PARM_FILAVAIL 7 /* "Local" parameter for dataset fill value existence */ #define H5Z_SCALEOFFSET_PARM_FILVAL 8 /* "Local" parameter for start location to store dataset fill value */ #define H5Z_SCALEOFFSET_CLS_INTEGER 0 /* Integer (datatype class) */ @@ -1232,7 +1232,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu */ minval_size = sizeof(unsigned long long) <= ((unsigned char *)*buf)[4] ? sizeof(unsigned long long) : ((unsigned char *)*buf)[4]; - minval = 0; + minval = 0; for (i = 0; i < minval_size; i++) { minval_mask = ((unsigned char *)*buf)[5 + i]; minval_mask <<= i * 8; diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c index 354d4df22c3..dcd06a7e0a2 100644 --- a/src/H5Zshuffle.c +++ b/src/H5Zshuffle.c @@ -122,7 +122,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] size_t numofelements; /* Number of elements in buffer */ size_t i; /* Local index variables */ #ifdef NO_DUFFS_DEVICE - size_t j; /* Local index variable */ + size_t j; /* Local index variable */ #endif /* NO_DUFFS_DEVICE */ size_t leftover; /* Extra bytes at end of buffer */ size_t ret_value = 0; /* Return value */ diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c index cde186224cd..cda518d02a3 100644 --- a/src/H5Ztrans.c +++ b/src/H5Ztrans.c @@ -13,12 +13,12 @@ #include "H5Zmodule.h" /* This source code file is part of the H5Z module */ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5VMprivate.h" /* H5VM_array_fill */ -#include "H5Zpkg.h" /* Data filters */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5VMprivate.h" /* H5VM_array_fill */ +#include "H5Zpkg.h" /* Data filters */ /* Token types */ typedef enum { @@ -994,12 +994,12 @@ H5Z__new_node(H5Z_token_type type) /*------------------------------------------------------------------------- * Function: H5Z_xform_eval - * Purpose: If the transform is trivial, this function applies it. - * Otherwise, it calls H5Z__xform_eval_full to do the full - * transform. + * Purpose: If the transform is trivial, this function applies it. + * Otherwise, it calls H5Z__xform_eval_full to do the full + * transform. * Return: SUCCEED if transform applied successfully, FAIL otherwise * Programmer: Leon Arber - * 5/1/04 + * 5/1/04 * *------------------------------------------------------------------------- */ @@ -1110,8 +1110,8 @@ H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void *array, size_t array_size /*------------------------------------------------------------------------- * Function: H5Z__xform_eval_full * - * Purpose: Does a full evaluation of the parse tree contained in tree - * and applies this transform to array. + * Purpose: Does a full evaluation of the parse tree contained in tree + * and applies this transform to array. * * Notes: In the case of a polynomial data transform (ie, the left and right * subtree are both of type H5Z_XFORM_SYMBOL), the convention is @@ -1121,7 +1121,7 @@ H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void *array, size_t array_size * Return: Nothing * * Programmer: Leon Arber - * 5/1/04 + * 5/1/04 * *------------------------------------------------------------------------- */ @@ -1753,7 +1753,7 @@ H5Z_xform_noop(const H5Z_data_xform_t *data_xform_prop) * Function: H5Z_xform_extract_xform_str * * Purpose: Extracts the pointer to the data transform strings from the - * data transform property.` + * data transform property.` * Return: * Pointer to a copy of the string in the data_xform property. * diff --git a/src/H5public.h b/src/H5public.h index 9e31cbecc8c..855ea6ffd17 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -92,11 +92,11 @@ extern "C" { #endif /* Version numbers */ -#define H5_VERS_MAJOR 1 /* For major interface/format changes */ -#define H5_VERS_MINOR 12 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 1 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "4" /* For pre-releases like snap0 */ - /* Empty string for real releases. */ +#define H5_VERS_MAJOR 1 /* For major interface/format changes */ +#define H5_VERS_MINOR 12 /* For minor interface/format changes */ +#define H5_VERS_RELEASE 1 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_SUBRELEASE "4" /* For pre-releases like snap0 */ +/* Empty string for real releases. */ #define H5_VERS_INFO "HDF5 library version: 1.12.1-4" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE) diff --git a/src/H5win32defs.h b/src/H5win32defs.h index d5096e57e10..4db53274df6 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -199,7 +199,7 @@ H5_DLL float Wroundf(float arg); #define HDsetenv(N, V, O) Wsetenv(N, V, O) #define HDflock(F, L) Wflock(F, L) #define HDgetlogin() Wgetlogin() -#define HDsnprintf c99_snprintf /*varargs*/ +#define HDsnprintf c99_snprintf /*varargs*/ #define HDvsnprintf c99_vsnprintf /*varargs*/ /* Non-POSIX functions */ diff --git a/test/accum.c b/test/accum.c index 46015c920f5..a60964ad413 100644 --- a/test/accum.c +++ b/test/accum.c @@ -2100,7 +2100,7 @@ test_swmr_write_big(hbool_t newest_format) uint8_t wbuf[1024]; /* Buffer for reading & writing */ unsigned u; /* Local index variable */ #ifdef H5_HAVE_UNISTD_H - pid_t pid; /* Process ID */ + pid_t pid; /* Process ID */ #endif /* H5_HAVE_UNISTD_H */ int status; /* Status returned from child process */ char * driver = NULL; /* VFD string (from env variable) */ diff --git a/test/cache_common.h b/test/cache_common.h index 87fab72d45e..455acfbfa79 100644 --- a/test/cache_common.h +++ b/test/cache_common.h @@ -392,7 +392,8 @@ typedef struct test_entry_t { int flush_dep_par_idx[MAX_FLUSH_DEP_PARS]; /* Indices of flush dependency parents */ unsigned flush_dep_npar; /* Number of flush dependency parents */ unsigned flush_dep_nchd; /* Number of flush dependency children */ - unsigned flush_dep_ndirty_chd; /* Number of dirty flush dependency children (including granchildren, etc.) */ + unsigned + flush_dep_ndirty_chd; /* Number of dirty flush dependency children (including granchildren, etc.) */ hbool_t pinned_from_client; /* entry was pinned by client call */ hbool_t pinned_from_cache; /* entry was pinned by cache internally */ unsigned flush_order; /* Order that entry was flushed in */ diff --git a/test/cache_tagging.c b/test/cache_tagging.c index 9d0aa3e90c3..61ada348d2a 100644 --- a/test/cache_tagging.c +++ b/test/cache_tagging.c @@ -443,7 +443,7 @@ check_file_creation_tags(hid_t fcpl_id, int type) /* Variable Declarations */ hid_t fid = -1; /* File Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose test outout */ + int verbose = FALSE; /* verbose test outout */ #endif /* NDEBUG */ hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = 0; @@ -549,9 +549,9 @@ check_file_open_tags(hid_t fcpl, int type) #ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ #endif /* NDEBUG */ - hid_t fapl = -1; /* File access prop list */ - haddr_t root_tag; /* Root Group Tag */ - haddr_t sbe_tag; /* Sblock Extension Tag */ + hid_t fapl = -1; /* File access prop list */ + haddr_t root_tag; /* Root Group Tag */ + haddr_t sbe_tag; /* Sblock Extension Tag */ /* Testing Macro */ TESTING("tag application during file open"); @@ -677,7 +677,7 @@ check_group_creation_tags(void) hid_t fid = -1; /* File Identifier */ hid_t gid = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ + int verbose = FALSE; /* verbose file outout */ #endif /* NDEBUG */ hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = HADDR_UNDEF; /* Root Group Tag */ @@ -800,7 +800,7 @@ check_multi_group_creation_tags(void) hid_t fid = -1; /* File Identifier */ hid_t gid = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ + int verbose = FALSE; /* verbose file outout */ #endif /* NDEBUG */ char gname[16]; /* group name buffer */ int i = 0; /* iterator */ @@ -952,7 +952,7 @@ check_link_iteration_tags(void) hid_t sid = -1; /* Group Identifier */ hid_t did = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ + int verbose = FALSE; /* verbose file outout */ #endif /* NDEBUG */ int i = 0; /* iterator */ haddr_t root_tag = 0; /* Root Group Tag Value */ @@ -1094,7 +1094,7 @@ check_dense_attribute_tags(void) hid_t did = -1; /* Group Identifier */ hid_t dcpl = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ + int verbose = FALSE; /* verbose file outout */ #endif /* NDEBUG */ int i = 0; /* iterator */ hid_t fapl = -1; /* File access property list */ @@ -1324,7 +1324,7 @@ check_group_open_tags(void) hid_t fid = -1; /* File Identifier */ hid_t gid = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file output */ + int verbose = FALSE; /* verbose file output */ #endif /* NDEBUG */ hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = HADDR_UNDEF; @@ -1455,7 +1455,7 @@ check_attribute_creation_tags(hid_t fcpl, int type) hid_t gid = -1; /* Group Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ + int verbose = FALSE; /* verbose file outout */ #endif /* NDEBUG */ hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = 0; /* Root group tag */ @@ -1620,7 +1620,7 @@ check_attribute_open_tags(hid_t fcpl, int type) hid_t gid = -1; /* Group Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ + int verbose = FALSE; /* verbose file outout */ #endif /* NDEBUG */ hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = 0; @@ -1787,7 +1787,7 @@ check_attribute_rename_tags(hid_t fcpl, int type) hid_t aid = -1; /* Attribute Identifier */ hid_t sid = -1; /* Dataset Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ + int verbose = FALSE; /* verbose file outout */ #endif /* NDEBUG */ int * data = NULL; /* data buffer */ int i, j, k = 0; /* iterators */ @@ -2000,7 +2000,7 @@ check_attribute_delete_tags(hid_t fcpl, int type) hid_t aid = -1; /* Attribute Identifier */ hid_t sid = -1; /* Dataset Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ + int verbose = FALSE; /* verbose file outout */ #endif /* NDEBUG */ int * data = NULL; /* data buffer */ int i, j, k = 0; /* iterators */ @@ -2191,7 +2191,7 @@ check_dataset_creation_tags(hid_t fcpl, int type) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ + int verbose = FALSE; /* verbose file outout */ #endif /* NDEBUG */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ @@ -2351,7 +2351,7 @@ check_dataset_creation_earlyalloc_tags(hid_t fcpl, int type) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ + int verbose = FALSE; /* verbose file outout */ #endif /* NDEBUG */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ @@ -2517,7 +2517,7 @@ check_dataset_open_tags(void) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ + int verbose = FALSE; /* verbose file outout */ #endif /* NDEBUG */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ @@ -2669,7 +2669,7 @@ check_dataset_write_tags(void) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ + int verbose = FALSE; /* verbose file outout */ #endif /* NDEBUG */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ @@ -2836,7 +2836,7 @@ check_attribute_write_tags(hid_t fcpl, int type) hid_t aid = -1; /* Attribute Identifier */ hid_t sid = -1; /* Dataset Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ + int verbose = FALSE; /* verbose file outout */ #endif /* NDEBUG */ int * data = NULL; /* data buffer */ int i, j, k = 0; /* iterators */ @@ -3022,7 +3022,7 @@ check_dataset_read_tags(void) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ + int verbose = FALSE; /* verbose file outout */ #endif /* NDEBUG */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ @@ -3184,7 +3184,7 @@ check_dataset_size_retrieval(void) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ + int verbose = FALSE; /* verbose file outout */ #endif /* NDEBUG */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ @@ -3348,7 +3348,7 @@ check_dataset_extend_tags(void) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ + int verbose = FALSE; /* verbose file outout */ #endif /* NDEBUG */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ @@ -3510,7 +3510,7 @@ check_object_info_tags(void) hid_t fid = -1; /* File Identifier */ hid_t gid = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file output */ + int verbose = FALSE; /* verbose file output */ #endif /* NDEBUG */ hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = HADDR_UNDEF; @@ -3645,7 +3645,7 @@ check_object_copy_tags(void) hid_t fid = -1; /* File Identifier */ hid_t gid = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file output */ + int verbose = FALSE; /* verbose file output */ #endif /* NDEBUG */ hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = HADDR_UNDEF; @@ -3795,7 +3795,7 @@ check_link_removal_tags(hid_t fcpl, int type) hid_t sid = -1; /* Dataspace Identifier */ hid_t gid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ + int verbose = FALSE; /* verbose file outout */ #endif /* NDEBUG */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ @@ -3984,7 +3984,7 @@ check_link_getname_tags(void) hid_t sid = -1; /* Dataspace Identifier */ hid_t gid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ + int verbose = FALSE; /* verbose file outout */ #endif /* NDEBUG */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ @@ -4161,7 +4161,7 @@ check_external_link_creation_tags(void) hid_t fid2 = -1; /* File Identifier */ hid_t gid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ + int verbose = FALSE; /* verbose file outout */ #endif /* NDEBUG */ hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = 0; @@ -4288,7 +4288,7 @@ check_external_link_open_tags(void) hid_t gid = -1; /* Dataspace Identifier */ hid_t xid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ + int verbose = FALSE; /* verbose file outout */ #endif /* NDEBUG */ H5O_native_info_t ninfo; /* Native object info struct */ hid_t fapl = -1; /* File access prop list */ diff --git a/test/chunk_info.c b/test/chunk_info.c index d45e923b65a..5d1d9f14101 100644 --- a/test/chunk_info.c +++ b/test/chunk_info.c @@ -67,7 +67,7 @@ const char *FILENAME[] = {"tchunk_info_earliest", "tchunk_info_v18", "tchunk_inf #define V2_BTREE_INDEX_DSET_NAME "Version 2 B-Tree Index Dataset" #define SKIP_FILTER_DSET_NAME "Dataset with Skipping One Filter" #define FILENAME_BUF_SIZE 256 /* Size for file names */ -#define RANK 2 /* Rank for datasets */ +#define RANK 2 /* Rank for datasets */ /* Dimension of the dataset */ #define NX 24 diff --git a/test/dsets.c b/test/dsets.c index 2e9e3db1d80..2c50c09fd58 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -193,15 +193,15 @@ const char *FILENAME[] = {"dataset", /* 0 */ #define DATA_NOT_CORRUPTED 0 /* Parameters for the "set local" test */ -#define BOGUS2_PERM_NPARMS 2 /* Number of "permanent" parameters */ +#define BOGUS2_PERM_NPARMS 2 /* Number of "permanent" parameters */ #define BOGUS2_PARAM_1 13 /* (No particular meaning, just for checking value) */ #define BOGUS2_PARAM_2 35 /* (No particular meaning, just for checking value) */ -#define BOGUS2_ALL_NPARMS 4 /* Total number of parameter = permanent + "local" parameters */ +#define BOGUS2_ALL_NPARMS 4 /* Total number of parameter = permanent + "local" parameters */ /* Dimensionality for conversion buffer test */ -#define DIM1 100 /* Dim. Size of data member # 1 */ +#define DIM1 100 /* Dim. Size of data member # 1 */ #define DIM2 5000 /* Dim. Size of data member # 2 */ -#define DIM3 10 /* Dim. Size of data member # 3 */ +#define DIM3 10 /* Dim. Size of data member # 3 */ /* Parameters for internal filter test */ #define FILTER_CHUNK_DIM1 2 diff --git a/test/fheap.c b/test/fheap.c index f8f9d16a7c7..bcf8fd09f18 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -9423,7 +9423,8 @@ test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_ H5HF_t * fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ - unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the */ + /* first indirect blocks */ unsigned row; /* Current row in indirect block */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ @@ -9554,7 +9555,8 @@ test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_ H5HF_t * fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ - unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + unsigned + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -9699,8 +9701,9 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5 H5HF_t * fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ - unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ - unsigned row; /* Current row in indirect block */ + unsigned + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + unsigned row; /* Current row in indirect block */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -9861,7 +9864,8 @@ test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_ H5HF_t * fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ - unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + unsigned + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ unsigned max_dblock_rows; /* Max. # of rows (of direct blocks) in the root indirect block */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ @@ -10016,7 +10020,8 @@ test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t H5HF_t * fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ - unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + unsigned + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ unsigned max_dblock_rows; /* Max. # of rows (of direct blocks) in the root indirect block */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ @@ -10472,7 +10477,8 @@ test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(h H5HF_t * fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ - unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + unsigned + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -10624,7 +10630,8 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped( H5HF_t * fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ - unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + unsigned + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -10780,7 +10787,8 @@ test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t H5HF_t * fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ - unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + unsigned + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -10943,7 +10951,8 @@ test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_s H5HF_t * fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ - unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + unsigned + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -11110,7 +11119,8 @@ test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5 H5HF_t * fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ - unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + unsigned + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -11272,7 +11282,8 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_blo H5HF_t * fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ - unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + unsigned + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -11454,7 +11465,8 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_ H5HF_t * fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ - unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + unsigned + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -11673,7 +11685,8 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_star H5HF_t * fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ - unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + unsigned + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -11872,7 +11885,8 @@ test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_ H5HF_t * fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ - unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + unsigned + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -12402,7 +12416,8 @@ test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t * H5HF_t * fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ - unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + unsigned + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -14936,7 +14951,7 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ #ifdef NOT_YET - h5_stat_size_t file_size; /* Size of file currently */ + h5_stat_size_t file_size; /* Size of file currently */ #endif /* NOT_YET */ unsigned char heap_id[HEAP_ID_LEN]; /* Heap ID for object */ size_t obj_size; /* Size of object */ @@ -15109,7 +15124,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ #ifdef NOT_YET - h5_stat_size_t file_size; /* Size of file currently */ + h5_stat_size_t file_size; /* Size of file currently */ #endif /* NOT_YET */ unsigned char heap_id1[HEAP_ID_LEN]; /* Heap ID for object #1 */ unsigned char heap_id2[HEAP_ID_LEN]; /* Heap ID for object #2 */ diff --git a/test/h5test.c b/test/h5test.c index 7a4bf2d37bd..1831418540a 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -2040,7 +2040,7 @@ h5_get_dummy_vol_class(void) * can be registered. */ vol_class->version = H5VL_VERSION; - vol_class->name = "dummy"; + vol_class->name = "dummy"; return vol_class; diff --git a/test/hdfs.c b/test/hdfs.c index a59cdb61011..4121f15621d 100644 --- a/test/hdfs.c +++ b/test/hdfs.c @@ -566,7 +566,8 @@ test_fapl_config_validation(void) JSVERIFY(config.stream_buffer_size, fa_fetch.stream_buffer_size, "streambuffer size mismatch") JSVERIFY_STR(config.namenode_name, fa_fetch.namenode_name, "node name mismatch") JSVERIFY_STR(config.user_name, fa_fetch.user_name, "user name mismatch") - JSVERIFY_STR(config.kerberos_ticket_cache, fa_fetch.kerberos_ticket_cache, "kerberos ticket cache mismatch") + JSVERIFY_STR(config.kerberos_ticket_cache, fa_fetch.kerberos_ticket_cache, + "kerberos ticket cache mismatch") } /*----------------------------- diff --git a/test/links.c b/test/links.c index 055e1dc3e0d..11b760cab31 100644 --- a/test/links.c +++ b/test/links.c @@ -9800,8 +9800,8 @@ external_set_elink_cb(hid_t fapl, hbool_t new_format) base_driver == H5FD_MPIO || base_driver == H5FD_CORE) ? H5P_DEFAULT : fapl; - op_data.fam_size = ELINK_CB_FAM_SIZE; - op_data.code = 0; + op_data.fam_size = ELINK_CB_FAM_SIZE; + op_data.code = 0; /* Create family fapl */ if ((fam_fapl = H5Pcopy(fapl)) < 0) @@ -19182,7 +19182,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u unsigned v; /* Local index variable */ hsize_t skip; /* # of links to skip in group */ #ifndef H5_NO_DEPRECATED_SYMBOLS - int gskip; /* # of links to skip in group, with H5Giterate */ + int gskip; /* # of links to skip in group, with H5Giterate */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ herr_t ret; /* Generic return value */ @@ -19670,7 +19670,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links unsigned v; /* Local index variable */ hsize_t skip; /* # of links to skip in group */ #ifndef H5_NO_DEPRECATED_SYMBOLS - int gskip; /* # of links to skip in group, with H5Giterate */ + int gskip; /* # of links to skip in group, with H5Giterate */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ herr_t ret; /* Generic return value */ @@ -22503,7 +22503,7 @@ main(void) #ifndef H5_NO_DEPRECATED_SYMBOLS nerrors += ud_hard_links_deprec(fapl2) < 0 ? 1 : 0; /* requires new format groups */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ - nerrors += ud_link_reregister(fapl2) < 0 ? 1 : 0; /* requires new format groups */ + nerrors += ud_link_reregister(fapl2) < 0 ? 1 : 0; /* requires new format groups */ #ifndef H5_NO_DEPRECATED_SYMBOLS nerrors += ud_link_reregister_deprec(fapl2) < 0 ? 1 : 0; /* requires new format groups */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ diff --git a/test/s3comms.c b/test/s3comms.c index f3e96b51743..36f6f49d77e 100644 --- a/test/s3comms.c +++ b/test/s3comms.c @@ -372,7 +372,7 @@ jserr_str(const char *expected, const char *actual, const char *reason) #define S3_TEST_RESOURCE_TEXT_PUBLIC "Poe_Raven.txt" #define S3_TEST_RESOURCE_MISSING "missing.csv" -#define S3_TEST_RUN_TIMEOUT 0 /* run tests that might hang */ +#define S3_TEST_RUN_TIMEOUT 0 /* run tests that might hang */ #define S3_TEST_MAX_URL_SIZE 256 /* char array size */ /* Global variables for aws test profile. diff --git a/test/swmr_generator.c b/test/swmr_generator.c index 931da947ff7..9e7c0502e59 100644 --- a/test/swmr_generator.c +++ b/test/swmr_generator.c @@ -96,7 +96,7 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp #ifdef FILLVAL_WORKS symbol_t fillval; /* Dataset fill value */ #endif /* FILLVAL_WORKS */ - unsigned u, v; /* Local index variable */ + unsigned u, v; /* Local index variable */ HDassert(filename); HDassert(index_type); diff --git a/test/swmr_sparse_writer.c b/test/swmr_sparse_writer.c index 14eef3d11e9..a253de53c2e 100644 --- a/test/swmr_sparse_writer.c +++ b/test/swmr_sparse_writer.c @@ -149,8 +149,8 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f symbol_t record; /* The record to add to the dataset */ unsigned long rec_to_flush; /* # of records left to write before flush */ #ifdef OUT - volatile int dummy; /* Dummy varialbe for busy sleep */ -#endif /* OUT */ + volatile int dummy; /* Dummy varialbe for busy sleep */ +#endif /* OUT */ hsize_t dim[2] = {1, 0}; /* Dataspace dimensions */ unsigned long u, v; /* Local index variables */ diff --git a/test/tattr.c b/test/tattr.c index ad669a12b7b..346c1b9f770 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -5437,9 +5437,9 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl) h5_stat_size_t empty_size; /* Size of empty file */ h5_stat_size_t file_size; /* Size of file after operating on it */ #endif /* LATER */ - unsigned curr_dset; /* Current dataset to work on */ - unsigned u; /* Local index variable */ - herr_t ret; /* Generic return value */ + unsigned curr_dset; /* Current dataset to work on */ + unsigned u; /* Local index variable */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Deleting Object w/Dense Attribute Storage and Creation Order Info\n")); @@ -6861,7 +6861,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx unsigned v; /* Local index variable */ hsize_t skip; /* # of attributes to skip on object */ #ifndef H5_NO_DEPRECATED_SYMBOLS - unsigned oskip; /* # of attributes to skip on object, with H5Aiterate1 */ + unsigned oskip; /* # of attributes to skip on object, with H5Aiterate1 */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ int old_nerrs; /* Number of errors when entering this check */ herr_t ret; /* Generic return value */ diff --git a/test/th5o.c b/test/th5o.c index c2409c181b7..a1849f0cff4 100644 --- a/test/th5o.c +++ b/test/th5o.c @@ -1736,8 +1736,8 @@ test_h5o(void) test_h5o_open(); /* Test generic open function */ #ifndef H5_NO_DEPRECATED_SYMBOLS - test_h5o_open_by_addr(); /* Test opening objects by address */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + test_h5o_open_by_addr(); /* Test opening objects by address */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ test_h5o_open_by_token(); /* Test opening objects by token */ test_h5o_close(); /* Test generic close function */ test_h5o_refcount(); /* Test incrementing and decrementing reference count */ diff --git a/test/th5s.c b/test/th5s.c index 04ac2e6a380..6eeec1c6c01 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -102,8 +102,8 @@ struct space4_struct { #define CONFIG_8 1 #define CONFIG_16 2 #define CONFIG_32 3 -#define POWER8 256 /* 2^8 */ -#define POWER16 65536 /* 2^16 */ +#define POWER8 256 /* 2^8 */ +#define POWER16 65536 /* 2^16 */ #define POWER32 4294967296 /* 2^32 */ /**************************************************************** diff --git a/test/tmisc.c b/test/tmisc.c index 40a1df596f2..b0ecd00c1b2 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -1254,8 +1254,8 @@ test_misc8(void) int * wdata; /* Data to write */ int * tdata; /* Temporary pointer to data write */ #ifdef VERIFY_DATA - int *rdata; /* Data to read */ - int *tdata2; /* Temporary pointer to data to read */ + int *rdata; /* Data to read */ + int *tdata2; /* Temporary pointer to data to read */ #endif /* VERIFY_DATA */ unsigned u, v; /* Local index variables */ int mdc_nelmts; /* Metadata number of elements */ @@ -2962,7 +2962,7 @@ test_misc18(void) hid_t did1, did2; /* Dataset IDs */ hid_t aid; /* Attribute ID */ #ifndef H5_NO_DEPRECATED_SYMBOLS - H5O_info1_t old_oinfo; /* (deprecated) information about object */ + H5O_info1_t old_oinfo; /* (deprecated) information about object */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ H5O_info2_t oinfo; /* Data model information about object */ H5O_native_info_t ninfo; /* Native file format information about object */ @@ -5784,9 +5784,9 @@ test_misc(void) test_misc19(); /* Test incrementing & decrementing ref count on IDs */ test_misc20(); /* Test problems with truncated dimensions in version 2 of storage layout message */ #ifdef H5_HAVE_FILTER_SZIP - test_misc21(); /* Test that "late" allocation time is treated the same as "incremental", for chunked - datasets w/a filters */ - test_misc22(); /* check szip bits per pixel */ + test_misc21(); /* Test that "late" allocation time is treated the same as "incremental", for chunked + datasets w/a filters */ + test_misc22(); /* check szip bits per pixel */ #endif /* H5_HAVE_FILTER_SZIP */ test_misc23(); /* Test intermediate group creation */ test_misc24(); /* Test inappropriate API opens of objects */ diff --git a/test/tsohm.c b/test/tsohm.c index 872875d956b..1e68628465c 100644 --- a/test/tsohm.c +++ b/test/tsohm.c @@ -3817,10 +3817,10 @@ test_sohm(void) { MESSAGE(5, ("Testing Shared Object Header Messages\n")); - test_sohm_fcpl(); /* Test SOHMs and file creation plists */ - test_sohm_fcpl_errors(); /* Bogus H5P* calls for SOHMs */ - test_sohm_size1(); /* Tests the sizes of files with one SOHM */ -#if 0 /* TODO: REVEALS BUG TO BE FIXED - SEE JIRA HDFFV-10645 */ + test_sohm_fcpl(); /* Test SOHMs and file creation plists */ + test_sohm_fcpl_errors(); /* Bogus H5P* calls for SOHMs */ + test_sohm_size1(); /* Tests the sizes of files with one SOHM */ +#if 0 /* TODO: REVEALS BUG TO BE FIXED - SEE JIRA HDFFV-10645 */ test_sohm_size_consistency_open_create(); #endif /* Jira HDFFV-10645 */ test_sohm_attrs(); /* Tests shared messages in attributes */ diff --git a/test/use_disable_mdc_flushes.c b/test/use_disable_mdc_flushes.c index 1f0e3d4202b..a12ea31ae0a 100644 --- a/test/use_disable_mdc_flushes.c +++ b/test/use_disable_mdc_flushes.c @@ -33,9 +33,9 @@ const char *progname_g = "use_disable_mdc_flushes"; /* program name */ /* these two definitions must match each other */ #define UC_DATATYPE H5T_NATIVE_SHORT /* use case HDF5 data type */ -#define UC_CTYPE short /* use case C data type */ -#define UC_RANK 3 /* use case dataset rank */ -#define Chunksize_DFT 256 /* chunksize default */ +#define UC_CTYPE short /* use case C data type */ +#define UC_RANK 3 /* use case dataset rank */ +#define Chunksize_DFT 256 /* chunksize default */ #define Hgoto_error(val) \ { \ ret_value = val; \ diff --git a/test/vfd.c b/test/vfd.c index 5bf433f9741..6a109bb2f70 100644 --- a/test/vfd.c +++ b/test/vfd.c @@ -2162,12 +2162,12 @@ static herr_t test_ros3(void) { #ifdef H5_HAVE_ROS3_VFD - hid_t fid = -1; /* file ID */ - hid_t fapl_id = -1; /* file access property list ID */ - hid_t fapl_id_out = -1; /* from H5Fget_access_plist */ - hid_t driver_id = -1; /* ID for this VFD */ - unsigned long driver_flags = 0; /* VFD feature flags */ - char filename[1024]; /* filename */ + hid_t fid = -1; /* file ID */ + hid_t fapl_id = -1; /* file access property list ID */ + hid_t fapl_id_out = -1; /* from H5Fget_access_plist */ + hid_t driver_id = -1; /* ID for this VFD */ + unsigned long driver_flags = 0; /* VFD feature flags */ + char filename[1024]; /* filename */ H5FD_ros3_fapl_t test_ros3_fa; H5FD_ros3_fapl_t ros3_fa_0 = { /* version = */ H5FD_CURR_ROS3_FAPL_T_VERSION, diff --git a/test/vol.c b/test/vol.c index 6076fcaeecf..045e27117ae 100644 --- a/test/vol.c +++ b/test/vol.c @@ -174,13 +174,13 @@ static const H5VL_class_t fake_vol_g = { static herr_t test_vol_registration(void) { - hid_t native_id = H5I_INVALID_HID; - hid_t lapl_id = H5I_INVALID_HID; - hid_t vipl_id = H5I_INVALID_HID; - herr_t ret = SUCCEED; - htri_t is_registered = FAIL; - hid_t vol_id = H5I_INVALID_HID; - hid_t vol_id2 = H5I_INVALID_HID; + hid_t native_id = H5I_INVALID_HID; + hid_t lapl_id = H5I_INVALID_HID; + hid_t vipl_id = H5I_INVALID_HID; + herr_t ret = SUCCEED; + htri_t is_registered = FAIL; + hid_t vol_id = H5I_INVALID_HID; + hid_t vol_id2 = H5I_INVALID_HID; H5VL_class_t *bad_fake_vol_class = NULL; TESTING("VOL registration"); @@ -210,9 +210,8 @@ test_vol_registration(void) TEST_ERROR; HDmemcpy(bad_fake_vol_class, &fake_vol_g, sizeof(H5VL_class_t)); bad_fake_vol_class->version = H5VL_VERSION + 1; - H5E_BEGIN_TRY { - vol_id = H5VLregister_connector(bad_fake_vol_class, H5P_DEFAULT); - } H5E_END_TRY; + H5E_BEGIN_TRY { vol_id = H5VLregister_connector(bad_fake_vol_class, H5P_DEFAULT); } + H5E_END_TRY; if (H5I_INVALID_HID != vol_id) FAIL_PUTS_ERROR("should not be able to register a connector with an incompatible version #"); HDfree(bad_fake_vol_class); diff --git a/testpar/t_chunk_alloc.c b/testpar/t_chunk_alloc.c index 8b9eb361bd6..b58858be263 100644 --- a/testpar/t_chunk_alloc.c +++ b/testpar/t_chunk_alloc.c @@ -24,7 +24,7 @@ static int mpi_size, mpi_rank; #define DSET_NAME "ExtendibleArray" #define CHUNK_SIZE 1000 /* #elements per chunk */ -#define CHUNK_FACTOR 200 /* default dataset size in terms of chunks */ +#define CHUNK_FACTOR 200 /* default dataset size in terms of chunks */ #define CLOSE 1 #define NO_CLOSE 0 diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c index fe73ba0fece..fe2a549ad56 100644 --- a/testpar/t_mpi.c +++ b/testpar/t_mpi.c @@ -162,9 +162,9 @@ test_mpio_overlap_writes(char *filename) return (nerrs); } -#define MB 1048576 /* 1024*1024 == 2**20 */ -#define GB 1073741824 /* 1024**3 == 2**30 */ -#define TWO_GB_LESS1 2147483647 /* 2**31 - 1 */ +#define MB 1048576 /* 1024*1024 == 2**20 */ +#define GB 1073741824 /* 1024**3 == 2**30 */ +#define TWO_GB_LESS1 2147483647 /* 2**31 - 1 */ #define FOUR_GB_LESS1 4294967295L /* 2**32 - 1 */ /* * Verify that MPI_Offset exceeding 2**31 can be computed correctly. diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index a821e6ffbb2..d1d0d9dbe50 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -37,10 +37,10 @@ enum H5TEST_COLL_CHUNK_API { #endif /* Constants definitions */ -#define DIM0 600 /* Default dataset sizes. */ +#define DIM0 600 /* Default dataset sizes. */ #define DIM1 1200 /* Values are from a monitor pixel sizes */ -#define ROW_FACTOR 8 /* Nominal row factor for dataset size */ -#define COL_FACTOR 16 /* Nominal column factor for dataset size */ +#define ROW_FACTOR 8 /* Nominal row factor for dataset size */ +#define COL_FACTOR 16 /* Nominal column factor for dataset size */ #define RANK 2 #define DATASETNAME1 "Data1" #define DATASETNAME2 "Data2" @@ -94,73 +94,73 @@ enum H5TEST_COLL_CHUNK_API { /*Constants for MPI derived data type generated from span tree */ -#define MSPACE1_RANK 1 /* Rank of the first dataset in memory */ +#define MSPACE1_RANK 1 /* Rank of the first dataset in memory */ #define MSPACE1_DIM 27000 /* Dataset size in memory */ -#define FSPACE_RANK 2 /* Dataset rank as it is stored in the file */ -#define FSPACE_DIM1 9 /* Dimension sizes of the dataset as it is stored in the file */ +#define FSPACE_RANK 2 /* Dataset rank as it is stored in the file */ +#define FSPACE_DIM1 9 /* Dimension sizes of the dataset as it is stored in the file */ #define FSPACE_DIM2 3600 /* We will read dataset back from the file to the dataset in memory with these dataspace parameters. */ #define MSPACE_RANK 2 #define MSPACE_DIM1 9 #define MSPACE_DIM2 3600 -#define FHCOUNT0 1 /* Count of the first dimension of the first hyperslab selection*/ +#define FHCOUNT0 1 /* Count of the first dimension of the first hyperslab selection*/ #define FHCOUNT1 768 /* Count of the second dimension of the first hyperslab selection*/ -#define FHSTRIDE0 4 /* Stride of the first dimension of the first hyperslab selection*/ -#define FHSTRIDE1 3 /* Stride of the second dimension of the first hyperslab selection*/ -#define FHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/ -#define FHBLOCK1 2 /* Block of the second dimension of the first hyperslab selection*/ -#define FHSTART0 0 /* start of the first dimension of the first hyperslab selection*/ -#define FHSTART1 1 /* start of the second dimension of the first hyperslab selection*/ +#define FHSTRIDE0 4 /* Stride of the first dimension of the first hyperslab selection*/ +#define FHSTRIDE1 3 /* Stride of the second dimension of the first hyperslab selection*/ +#define FHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/ +#define FHBLOCK1 2 /* Block of the second dimension of the first hyperslab selection*/ +#define FHSTART0 0 /* start of the first dimension of the first hyperslab selection*/ +#define FHSTART1 1 /* start of the second dimension of the first hyperslab selection*/ -#define SHCOUNT0 1 /* Count of the first dimension of the first hyperslab selection*/ -#define SHCOUNT1 1 /* Count of the second dimension of the first hyperslab selection*/ -#define SHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define SHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ -#define SHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/ +#define SHCOUNT0 1 /* Count of the first dimension of the first hyperslab selection*/ +#define SHCOUNT1 1 /* Count of the second dimension of the first hyperslab selection*/ +#define SHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define SHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ +#define SHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/ #define SHBLOCK1 768 /* Block of the second dimension of the first hyperslab selection*/ -#define SHSTART0 4 /* start of the first dimension of the first hyperslab selection*/ -#define SHSTART1 0 /* start of the second dimension of the first hyperslab selection*/ +#define SHSTART0 4 /* start of the first dimension of the first hyperslab selection*/ +#define SHSTART1 0 /* start of the second dimension of the first hyperslab selection*/ #define MHCOUNT0 6912 /* Count of the first dimension of the first hyperslab selection*/ -#define MHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define MHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ -#define MHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ +#define MHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define MHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ +#define MHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ -#define RFFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ +#define RFFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ #define RFFHCOUNT1 768 /* Count of the second dimension of the first hyperslab selection*/ -#define RFFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define RFFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ -#define RFFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ -#define RFFHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ -#define RFFHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ -#define RFFHSTART1 2 /* start of the second dimension of the first hyperslab selection*/ +#define RFFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define RFFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ +#define RFFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ +#define RFFHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ +#define RFFHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ +#define RFFHSTART1 2 /* start of the second dimension of the first hyperslab selection*/ -#define RFSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ +#define RFSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ #define RFSHCOUNT1 1536 /* Count of the second dimension of the first hyperslab selection*/ -#define RFSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define RFSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ -#define RFSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ -#define RFSHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ -#define RFSHSTART0 2 /* start of the first dimension of the first hyperslab selection*/ -#define RFSHSTART1 4 /* start of the second dimension of the first hyperslab selection*/ +#define RFSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define RFSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ +#define RFSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ +#define RFSHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ +#define RFSHSTART0 2 /* start of the first dimension of the first hyperslab selection*/ +#define RFSHSTART1 4 /* start of the second dimension of the first hyperslab selection*/ -#define RMFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ +#define RMFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ #define RMFHCOUNT1 768 /* Count of the second dimension of the first hyperslab selection*/ -#define RMFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define RMFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ -#define RMFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ -#define RMFHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ -#define RMFHSTART0 0 /* start of the first dimension of the first hyperslab selection*/ -#define RMFHSTART1 0 /* start of the second dimension of the first hyperslab selection*/ +#define RMFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define RMFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ +#define RMFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ +#define RMFHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ +#define RMFHSTART0 0 /* start of the first dimension of the first hyperslab selection*/ +#define RMFHSTART1 0 /* start of the second dimension of the first hyperslab selection*/ -#define RMSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ +#define RMSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ #define RMSHCOUNT1 1536 /* Count of the second dimension of the first hyperslab selection*/ -#define RMSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define RMSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ -#define RMSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ -#define RMSHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ -#define RMSHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ -#define RMSHSTART1 2 /* start of the second dimension of the first hyperslab selection*/ +#define RMSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define RMSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ +#define RMSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ +#define RMSHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ +#define RMSHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ +#define RMSHSTART1 2 /* start of the second dimension of the first hyperslab selection*/ #define NPOINTS \ 4 /* Number of points that will be selected \ diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index 9c5999b871d..f88cf19e0ce 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -194,10 +194,10 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti if (sp == 1 && argv[opt_ind][0] == '-' && argv[opt_ind][1] == '-') { /* long command line option */ - int i; - const char ch = '='; - char *arg = &argv[opt_ind][2]; - size_t arg_len = 0; + int i; + const char ch = '='; + char * arg = &argv[opt_ind][2]; + size_t arg_len = 0; opt_arg = strchr(&argv[opt_ind][2], ch); arg_len = HDstrlen(&argv[opt_ind][2]); @@ -224,7 +224,7 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti else if (l_opts[i].has_arg == require_arg) { if (opt_err) HDfprintf(rawerrorstream, "%s: option required for \"--%s\" flag\n", argv[0], - arg); + arg); opt_opt = '?'; } diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index f2d9271b2ef..02f53358dc8 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -274,8 +274,8 @@ typedef struct s1_t { /* File 65 macros */ #define STRATEGY H5F_FSPACE_STRATEGY_NONE /* File space handling strategy */ -#define THRESHOLD10 10 /* Free-space section threshold */ -#define FSPACE_PAGE_SIZE 8192 /* File space page size */ +#define THRESHOLD10 10 /* Free-space section threshold */ +#define FSPACE_PAGE_SIZE 8192 /* File space page size */ /* "FILE66" macros and for FILE69, FILE87 */ #define F66_XDIM 8 From 68407f16f152d5a10b34ed4cdad21cda7c5862c2 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 28 Jan 2021 13:25:03 -0600 Subject: [PATCH 09/25] Undo format version 11 changes --- .clang-format | 18 ++++- c++/test/tfilter.cpp | 2 +- c++/test/th5s.cpp | 2 +- examples/ph5example.c | 2 +- fortran/src/H5Pf.c | 2 +- hl/tools/gif2h5/gifread.c | 2 +- hl/tools/gif2h5/hdfgifwr.c | 2 +- src/H5.c | 4 +- src/H5AC.c | 18 ++--- src/H5ACmpio.c | 8 +-- src/H5ACproxy_entry.c | 8 +-- src/H5Adense.c | 2 +- src/H5Aint.c | 2 +- src/H5Aprivate.h | 8 +-- src/H5B2.c | 4 +- src/H5B2cache.c | 12 ++-- src/H5C.c | 52 +++++++------- src/H5CX.c | 28 ++++---- src/H5Cdbg.c | 6 +- src/H5Cimage.c | 16 ++--- src/H5Dchunk.c | 6 +- src/H5Defl.c | 6 +- src/H5Dint.c | 8 +-- src/H5Dmpio.c | 4 +- src/H5Dpkg.h | 6 +- src/H5Dvirtual.c | 8 +-- src/H5E.c | 4 +- src/H5EAcache.c | 20 +++--- src/H5EAtest.c | 4 +- src/H5Eint.c | 14 ++-- src/H5Epkg.h | 4 +- src/H5FAcache.c | 12 ++-- src/H5FAtest.c | 6 +- src/H5FDcore.c | 14 ++-- src/H5FDdirect.c | 4 +- src/H5FDlog.c | 16 ++--- src/H5FDmirror.c | 4 +- src/H5FDmpio.c | 4 +- src/H5FDsec2.c | 8 +-- src/H5FDspace.c | 2 +- src/H5FDsplitter.c | 2 +- src/H5FDstdio.c | 12 ++-- src/H5FS.c | 4 +- src/H5FScache.c | 16 ++--- src/H5Fint.c | 4 +- src/H5Fprivate.h | 64 ++++++++--------- src/H5Fsuper.c | 2 +- src/H5Gent.c | 2 +- src/H5Gprivate.h | 8 +-- src/H5Gpublic.h | 2 +- src/H5Groot.c | 4 +- src/H5Gtraverse.c | 2 +- src/H5HFcache.c | 8 +-- src/H5HG.c | 2 +- src/H5MF.c | 10 +-- src/H5MFsection.c | 4 +- src/H5MM.c | 26 +++---- src/H5MMprivate.h | 4 +- src/H5Ocache.c | 6 +- src/H5Odtype.c | 2 +- src/H5Oint.c | 40 +++++------ src/H5Opkg.h | 4 +- src/H5Oprivate.h | 20 +++--- src/H5Oshared.h | 10 +-- src/H5PLpath.c | 2 +- src/H5Pdcpl.c | 2 +- src/H5Pfapl.c | 2 +- src/H5Ppkg.h | 2 +- src/H5SM.c | 4 +- src/H5Shyper.c | 6 +- src/H5Spkg.h | 12 ++-- src/H5T.c | 2 +- src/H5TS.c | 14 ++-- src/H5TSprivate.h | 4 +- src/H5Tpkg.h | 2 +- src/H5Tprivate.h | 6 +- src/H5Tref.c | 2 +- src/H5Tvlen.c | 6 +- src/H5VL.c | 3 +- src/H5VLint.c | 2 +- src/H5VLprivate.h | 2 +- src/H5VLpublic.h | 4 +- src/H5VM.c | 2 +- src/H5Z.c | 14 ++-- src/H5Znbit.c | 12 ++-- src/H5Zscaleoffset.c | 18 ++--- src/H5Zshuffle.c | 12 ++-- src/H5Ztrans.c | 2 +- src/H5detect.c | 2 +- src/H5make_libsettings.c | 2 +- src/H5private.h | 76 ++++++++++---------- src/H5public.h | 22 +++--- src/H5system.c | 2 +- src/H5timer.c | 6 +- src/H5win32defs.h | 2 +- test/accum.c | 4 +- test/btree2.c | 4 +- test/cache.c | 10 +-- test/cache_common.h | 2 +- test/cache_tagging.c | 106 ++++++++++++++-------------- test/chunk_info.c | 4 +- test/cross_read.c | 8 +-- test/dsets.c | 38 +++++----- test/dt_arith.c | 4 +- test/dtypes.c | 4 +- test/earray.c | 6 +- test/error_test.c | 2 +- test/farray.c | 2 +- test/fheap.c | 52 +++++++------- test/filter_plugin.c | 4 +- test/gen_bad_ohdr.c | 2 +- test/gen_bogus.c | 2 +- test/gen_cross.c | 4 +- test/links.c | 28 ++++---- test/mount.c | 2 +- test/objcopy.c | 6 +- test/s3comms.c | 8 +-- test/set_extent.c | 4 +- test/stab.c | 2 +- test/swmr.c | 4 +- test/swmr_generator.c | 2 +- test/swmr_remove_reader.c | 2 +- test/swmr_sparse_writer.c | 4 +- test/tattr.c | 16 ++--- test/tfile.c | 2 +- test/th5o.c | 4 +- test/th5s.c | 4 +- test/thread_id.c | 2 +- test/tmisc.c | 38 +++++----- test/tsohm.c | 18 ++--- test/ttsafe.c | 2 +- test/use_disable_mdc_flushes.c | 6 +- test/vds.c | 2 +- test/vfd.c | 4 +- testpar/t_2Gio.c | 6 +- testpar/t_cache.c | 4 +- testpar/t_chunk_alloc.c | 2 +- testpar/t_filter_read.c | 2 +- testpar/t_mpi.c | 6 +- testpar/t_shapesame.c | 2 +- testpar/testphdf5.h | 102 +++++++++++++------------- tools/lib/h5diff.c | 10 +-- tools/lib/h5diff_array.c | 2 +- tools/lib/h5tools_str.c | 4 +- tools/lib/h5tools_utils.c | 2 - tools/libtest/h5tools_test_utils.c | 6 +- tools/src/h5dump/h5dump.h | 2 +- tools/src/h5dump/h5dump_extern.h | 2 +- tools/test/h5dump/h5dumpgentest.c | 4 +- tools/test/perform/perf.c | 2 +- tools/test/perform/pio_standalone.h | 18 ++--- tools/test/perform/sio_standalone.h | 18 ++--- 152 files changed, 743 insertions(+), 728 deletions(-) diff --git a/.clang-format b/.clang-format index 5b7d76f3942..34b75631571 100644 --- a/.clang-format +++ b/.clang-format @@ -1,9 +1,12 @@ --- Language: Cpp BasedOnStyle: LLVM -AlignConsecutiveMacros: true AlignConsecutiveAssignments: true +#llvm11: AlignConsecutiveBitFields: false AlignConsecutiveDeclarations: true +AlignConsecutiveMacros: true +#llvm10-11: AlignOperands: true - Align +#llvm11: AllowShortEnumsOnASingleLine: true AlwaysBreakAfterReturnType: AllDefinitions # Can enable the following section when llvm 12.x is out #AttributeMacros: @@ -20,8 +23,11 @@ AlwaysBreakAfterReturnType: AllDefinitions # - H5_ATTR_FALLTHROUGH BraceWrapping: AfterFunction: true + #llvm10-11: AfterControlStatement: false - Never BeforeCatch: true BeforeElse: true + #llvm11: BeforeLambdaBody: false + #llvm11: BeforeWhile: false BreakBeforeBraces: Stroustrup BreakAfterJavaFieldAnnotations: true BreakStringLiterals: true @@ -44,11 +50,15 @@ IncludeCategories: SortPriority: 0 IncludeIsMainRegex: '(public)?$' IndentCaseLabels: true +#llvm11: IndentCaseBlocks: false IndentGotoLabels: false +#llvm11: IndentExternBlock: AfterExternBlock IndentWidth: 4 +#llvm11: InsertTrailingCommas: None MacroBlockBegin: "^BEGIN_FUNC" MacroBlockEnd: "^END_FUNC" ObjCBlockIndentWidth: 4 +#llvm11: ObjCBreakBeforeNestedBlockParam: true ReflowComments: true SortIncludes: false StatementMacros: @@ -74,5 +84,11 @@ StatementMacros: - H5_GCC_DIAG_OFF - H5_GCC_DIAG_ON - CATCH +#llvm10: TypenameMacros: +#llvm10: - STACK_OF +#llvm10: - LIST +#llvm11: WhitespaceSensitiveMacros: +#llvm11: - STRINGIZE +#llvm11: - PP_STRINGIZE ... diff --git a/c++/test/tfilter.cpp b/c++/test/tfilter.cpp index e583c3bbeeb..e7788e53472 100644 --- a/c++/test/tfilter.cpp +++ b/c++/test/tfilter.cpp @@ -222,7 +222,7 @@ test_szip_filter(H5File &file1) SKIPPED(); } -#else /* H5_HAVE_FILTER_SZIP */ +#else /* H5_HAVE_FILTER_SZIP */ SUBTEST("szip filter"); SKIPPED(); H5std_string fname = file1.getFileName(); diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp index 4cce6246092..8709c25f731 100644 --- a/c++/test/th5s.cpp +++ b/c++/test/th5s.cpp @@ -33,7 +33,7 @@ using namespace H5; #include "h5test.h" #include "h5cpputil.h" // C++ utilility header file -#include "H5srcdir.h" // srcdir querying header file +#include "H5srcdir.h" // srcdir querying header file const H5std_string TESTFILE("th5s.h5"); const H5std_string DATAFILE("th5s1.h5"); diff --git a/examples/ph5example.c b/examples/ph5example.c index da777a906a4..06c89191dbd 100644 --- a/examples/ph5example.c +++ b/examples/ph5example.c @@ -1087,7 +1087,7 @@ main(int argc, char **argv) return (nerrors); } -#else /* H5_HAVE_PARALLEL */ +#else /* H5_HAVE_PARALLEL */ /* dummy program since H5_HAVE_PARALLE is not configured in */ int main(void) diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 441af5940cb..d52f537d4ce 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -505,7 +505,7 @@ h5pget_version_c(hid_t_f H5_ATTR_UNUSED *prp_id, int_f *boot, int_f *freelist, i return 0; } -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ int_f h5pget_version_c(hid_t_f *prp_id, int_f *boot, int_f *freelist, int_f *stab, int_f *shhdr) /******/ diff --git a/hl/tools/gif2h5/gifread.c b/hl/tools/gif2h5/gifread.c index a4210c3132a..705e6f3965f 100644 --- a/hl/tools/gif2h5/gifread.c +++ b/hl/tools/gif2h5/gifread.c @@ -354,7 +354,7 @@ ReadDataSubBlocks(GIFBYTE **MemGif2, /* GIF image file input FILE stream #ifdef COMMENTED_OUT *ptr1++ = dataSize; /* Write the data count */ #endif /* COMMENTED_OUT */ - while (dataSize--) /* Read/write the Plain Text data */ + while (dataSize--) /* Read/write the Plain Text data */ *ptr1++ = *(*MemGif2)++; /* Check if there is another data sub-block */ diff --git a/hl/tools/gif2h5/hdfgifwr.c b/hl/tools/gif2h5/hdfgifwr.c index 63e92a5842a..7be68dcebd1 100644 --- a/hl/tools/gif2h5/hdfgifwr.c +++ b/hl/tools/gif2h5/hdfgifwr.c @@ -73,7 +73,7 @@ static unsigned long cur_accum = 0; static int cur_bits = 0; #define MAXCODE(n_bits) ((1 << (n_bits)) - 1) -#define XV_BITS 12 /* BITS was already defined on some systems */ +#define XV_BITS 12 /* BITS was already defined on some systems */ #define HSIZE 5003 /* 80% occupancy */ typedef unsigned char char_type; diff --git a/src/H5.c b/src/H5.c index f4b9a8dc929..81c7eb7ba73 100644 --- a/src/H5.c +++ b/src/H5.c @@ -404,7 +404,7 @@ H5_term_library(void) HDfprintf(stderr, " %s\n", loop); #ifndef NDEBUG HDabort(); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end if */ } /* end if */ @@ -1116,7 +1116,7 @@ H5is_library_threadsafe(hbool_t *is_ts) /* At this time, it is impossible for this to fail. */ #ifdef H5_HAVE_THREADSAFE *is_ts = TRUE; -#else /* H5_HAVE_THREADSAFE */ +#else /* H5_HAVE_THREADSAFE */ *is_ts = FALSE; #endif /* H5_HAVE_THREADSAFE */ diff --git a/src/H5AC.c b/src/H5AC.c index aab99e58f30..7e39f090093 100644 --- a/src/H5AC.c +++ b/src/H5AC.c @@ -374,7 +374,7 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co H5C_create(H5AC__DEFAULT_MAX_CACHE_SIZE, H5AC__DEFAULT_MIN_CLEAN_SIZE, (H5AC_NTYPES - 1), H5AC_class_s, H5AC__check_if_write_permitted, TRUE, NULL, NULL); #ifdef H5_HAVE_PARALLEL - } /* end else */ + } /* end else */ #endif /* H5_HAVE_PARALLEL */ if (NULL == f->shared->cache) @@ -432,7 +432,7 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co aux_ptr = H5FL_FREE(H5AC_aux_t, aux_ptr); } /* end if */ } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ FUNC_LEAVE_NOAPI(ret_value) } /* H5AC_create() */ @@ -466,7 +466,7 @@ H5AC_dest(H5F_t *f) hbool_t curr_logging; /* TRUE if currently logging */ #ifdef H5_HAVE_PARALLEL H5AC_aux_t *aux_ptr = NULL; -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -585,7 +585,7 @@ H5AC_dest(H5F_t *f) aux_ptr->magic = 0; aux_ptr = H5FL_FREE(H5AC_aux_t, aux_ptr); - } /* end if */ + } /* end if */ #endif /* H5_HAVE_PARALLEL */ done: @@ -1104,7 +1104,7 @@ H5AC_move_entry(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t ne { #ifdef H5_HAVE_PARALLEL H5AC_aux_t *aux_ptr; -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1414,7 +1414,7 @@ H5AC_protect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *udata, unsi #ifdef H5_HAVE_PARALLEL HDassert(0 == (flags & (unsigned)(~(H5C__READ_ONLY_FLAG | H5C__FLUSH_LAST_FLAG | H5C__FLUSH_COLLECTIVELY_FLAG)))); -#else /* H5_HAVE_PARALLEL */ +#else /* H5_HAVE_PARALLEL */ HDassert(0 == (flags & (unsigned)(~(H5C__READ_ONLY_FLAG | H5C__FLUSH_LAST_FLAG)))); #endif /* H5_HAVE_PARALLEL */ @@ -1631,7 +1631,7 @@ H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing, un hbool_t deleted; #ifdef H5_HAVE_PARALLEL H5AC_aux_t *aux_ptr = NULL; -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1674,7 +1674,7 @@ H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing, un if (deleted && aux_ptr->mpi_rank == 0) if (H5AC__log_deleted_entry((H5AC_info_t *)thing) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "H5AC__log_deleted_entry() failed") - } /* end if */ + } /* end if */ #endif /* H5_HAVE_PARALLEL */ if (H5C_unprotect(f, addr, thing, flags) < 0) @@ -2163,7 +2163,7 @@ H5AC__check_if_write_permitted(const H5F_t write_permitted = aux_ptr->write_permitted; else write_permitted = FALSE; - } /* end if */ + } /* end if */ #endif /* H5_HAVE_PARALLEL */ *write_permitted_ptr = write_permitted; diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c index 1d2444149b0..a806b351565 100644 --- a/src/H5ACmpio.c +++ b/src/H5ACmpio.c @@ -760,7 +760,7 @@ H5AC__log_dirtied_entry(const H5AC_info_t *entry_ptr) #if H5AC_DEBUG_DIRTY_BYTES_CREATION aux_ptr->unprotect_dirty_bytes += entry_ptr->size; aux_ptr->unprotect_dirty_bytes_updates += 1; -#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ +#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ } /* end if */ /* the entry is dirty. If it exists on the cleaned entries list, @@ -776,7 +776,7 @@ H5AC__log_dirtied_entry(const H5AC_info_t *entry_ptr) aux_ptr->unprotect_dirty_bytes += entry_ptr->size; aux_ptr->unprotect_dirty_bytes_updates += 1; #endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ - } /* end else */ + } /* end else */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -1090,7 +1090,7 @@ H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr) #if H5AC_DEBUG_DIRTY_BYTES_CREATION aux_ptr->move_dirty_bytes += entry_size; aux_ptr->move_dirty_bytes_updates += 1; -#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ +#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ } /* end else */ /* insert / reinsert the entry in the dirty slist */ @@ -1104,7 +1104,7 @@ H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr) aux_ptr->move_dirty_bytes += entry_size; aux_ptr->move_dirty_bytes_updates += 1; #endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ - } /* end else-if */ + } /* end else-if */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5ACproxy_entry.c b/src/H5ACproxy_entry.c index 4426189ebec..76e885f09ac 100644 --- a/src/H5ACproxy_entry.c +++ b/src/H5ACproxy_entry.c @@ -521,7 +521,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing) case H5AC_NOTIFY_ACTION_AFTER_LOAD: #ifdef NDEBUG HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid notify action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Invalid action?!?"); #endif /* NDEBUG */ break; @@ -529,7 +529,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing) case H5AC_NOTIFY_ACTION_AFTER_FLUSH: #ifdef NDEBUG HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid notify action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Invalid action?!?"); #endif /* NDEBUG */ break; @@ -605,10 +605,10 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "unknown notify action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Adense.c b/src/H5Adense.c index 1efe45d1e2b..3d992027fd1 100644 --- a/src/H5Adense.c +++ b/src/H5Adense.c @@ -1100,7 +1100,7 @@ H5A__dense_iterate_bt2_cb(const void *_record, void *_bt2_udata) HDassert("unknown attribute op type" && 0); #ifdef NDEBUG HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unsupported attribute op type") -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ /* Release the space allocated for the attribute */ diff --git a/src/H5Aint.c b/src/H5Aint.c index e940d057697..addd70e8824 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -1812,7 +1812,7 @@ H5A__attr_iterate_table(const H5A_attr_table_t *atable, hsize_t skip, hsize_t *l HDassert("unknown attribute op type" && 0); #ifdef NDEBUG HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unsupported attribute op type") -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ /* Increment the number of entries passed through */ diff --git a/src/H5Aprivate.h b/src/H5Aprivate.h index 69fba408da2..41641546a24 100644 --- a/src/H5Aprivate.h +++ b/src/H5Aprivate.h @@ -43,8 +43,8 @@ typedef herr_t (*H5A_lib_iterate_t)(const H5A_t *attr, void *op_data); /* Describe kind of callback to make for each attribute */ typedef enum H5A_attr_iter_op_type_t { #ifndef H5_NO_DEPRECATED_SYMBOLS - H5A_ATTR_OP_APP, /* Application callback */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + H5A_ATTR_OP_APP, /* Application callback */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ H5A_ATTR_OP_APP2, /* Revised application callback */ H5A_ATTR_OP_LIB /* Library internal callback */ } H5A_attr_iter_op_type_t; @@ -53,8 +53,8 @@ typedef struct H5A_attr_iter_op_t { H5A_attr_iter_op_type_t op_type; union { #ifndef H5_NO_DEPRECATED_SYMBOLS - H5A_operator1_t app_op; /* Application callback for each attribute */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + H5A_operator1_t app_op; /* Application callback for each attribute */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ H5A_operator2_t app_op2; /* Revised application callback for each attribute */ H5A_lib_iterate_t lib_op; /* Library internal callback for each attribute */ } u; diff --git a/src/H5B2.c b/src/H5B2.c index ecf95cbcd74..2b889dc32dd 100644 --- a/src/H5B2.c +++ b/src/H5B2.c @@ -1313,9 +1313,9 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data) */ #ifdef OLD_WAY HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "key not found in leaf node") -#else /* OLD_WAY */ +#else /* OLD_WAY */ HGOTO_DONE(FAIL) -#endif /* OLD_WAY */ +#endif /* OLD_WAY */ } /* end if */ else { /* Make callback for current record */ diff --git a/src/H5B2cache.c b/src/H5B2cache.c index 106542e7aab..ce910850aa8 100644 --- a/src/H5B2cache.c +++ b/src/H5B2cache.c @@ -486,9 +486,9 @@ H5B2__cache_hdr_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ } /* end if */ else @@ -904,9 +904,9 @@ H5B2__cache_int_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ } /* end if */ else @@ -1283,9 +1283,9 @@ H5B2__cache_leaf_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ } /* end if */ else diff --git a/src/H5C.c b/src/H5C.c index 24519eb693a..db3933b83b9 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -576,7 +576,7 @@ void H5C_def_auto_resize_rpt_fcn(H5C_t *cache_ptr, #ifndef NDEBUG int32_t version, -#else /* NDEBUG */ +#else /* NDEBUG */ int32_t H5_ATTR_UNUSED version, #endif /* NDEBUG */ double hit_rate, enum H5C_resize_status status, size_t old_max_cache_size, @@ -806,7 +806,7 @@ H5C_prep_for_file_close(H5F_t *f) */ if (H5C__serialize_cache(f) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "serialization of the cache failed") - } /* end if */ + } /* end if */ #endif /* H5_HAVE_PARALLEL */ done: @@ -1310,7 +1310,7 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u hbool_t flush_last; #ifdef H5_HAVE_PARALLEL hbool_t coll_access = FALSE; /* whether access to the cache entry is done collectively */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ hbool_t set_flush_marker; hbool_t write_permitted = TRUE; size_t empty_space; @@ -2092,7 +2092,7 @@ H5C_resize_entry(void *thing, size_t new_size) H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr->coll_list_len), (cache_ptr->coll_list_size), (entry_ptr->size), (new_size)) } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ /* update statistics just before changing the entry size */ H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size); @@ -2228,7 +2228,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign hbool_t flush_last; #ifdef H5_HAVE_PARALLEL hbool_t coll_access = FALSE; /* whether access to the cache entry is done collectively */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ hbool_t write_permitted; hbool_t was_loaded = FALSE; /* Whether the entry was loaded as a result of the protect */ size_t empty_space; @@ -2348,7 +2348,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign H5C__MOVE_TO_TOP_IN_COLL_LIST(cache_ptr, entry_ptr, NULL) } /* end else-if */ } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ #if H5C_DO_TAGGING_SANITY_CHECKS { @@ -3359,7 +3359,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) if (!dirtied) clear_entry = TRUE; } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ if (!entry_ptr->is_protected) @@ -3538,7 +3538,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Can't clear entry") } /* end else if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ } H5C__UPDATE_STATS_FOR_UNPROTECT(cache_ptr) @@ -3899,7 +3899,7 @@ H5C_create_flush_dependency(void *parent_thing, void *child_thing) for (u = 0; u < child_entry->flush_dep_nparents; u++) HDassert(child_entry->flush_dep_parent[u] != parent_entry); - } /* end block */ + } /* end block */ #endif /* NDEBUG */ /* More sanity checks */ @@ -5823,7 +5823,7 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) HDassert(cache_ptr->slist_size == (size_t)((ssize_t)initial_slist_size + cache_ptr->slist_size_increase)); } /* end if */ -#endif /* H5C_DO_SANITY_CHECKS */ +#endif /* H5C_DO_SANITY_CHECKS */ /* Since we are doing a destroy, we must make a pass through * the hash table and try to flush - destroy all entries that @@ -6321,7 +6321,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) HDassert(cache_ptr->slist_ring_len[ring] == 0); HDassert(cache_ptr->slist_ring_size[ring] == 0); - } /* end if */ + } /* end if */ #endif /* H5C_DO_SANITY_CHECKS */ done: @@ -6763,7 +6763,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) H5C__REMOVE_FROM_COLL_LIST(cache_ptr, entry_ptr, FAIL) } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ H5C__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, FAIL) @@ -7130,8 +7130,8 @@ H5C__load_entry(H5F_t *f, int mpi_rank = 0; /* MPI process rank */ MPI_Comm comm = MPI_COMM_NULL; /* File MPI Communicator */ int mpi_code; /* MPI error code */ -#endif /* H5_HAVE_PARALLEL */ - void *ret_value = NULL; /* Return value */ +#endif /* H5_HAVE_PARALLEL */ + void *ret_value = NULL; /* Return value */ FUNC_ENTER_STATIC @@ -7176,7 +7176,7 @@ H5C__load_entry(H5F_t *f, HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "Can't get MPI rank") if ((comm = H5F_mpi_get_comm(f)) == MPI_COMM_NULL) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "get_comm request failed") - } /* end if */ + } /* end if */ #endif /* H5_HAVE_PARALLEL */ /* Get the on-disk entry image */ @@ -7206,7 +7206,7 @@ H5C__load_entry(H5F_t *f, image = (uint8_t *)new_image; #if H5C_DO_MEMORY_SANITY_CHECKS H5MM_memcpy(image + len, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE); -#endif /* H5C_DO_MEMORY_SANITY_CHECKS */ +#endif /* H5C_DO_MEMORY_SANITY_CHECKS */ } /* end if */ #ifdef H5_HAVE_PARALLEL @@ -7227,7 +7227,7 @@ H5C__load_entry(H5F_t *f, if (MPI_SUCCESS != (mpi_code = MPI_Bcast(image, buf_size, MPI_BYTE, 0, comm))) HMPI_GOTO_ERROR(NULL, "MPI_Bcast failed", mpi_code) } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ /* If the entry could be read speculatively and the length is still * changing, check for updating the actual size @@ -7275,9 +7275,9 @@ H5C__load_entry(H5F_t *f, (mpi_code = MPI_Bcast(image + len, buf_size, MPI_BYTE, 0, comm))) HMPI_GOTO_ERROR(NULL, "MPI_Bcast failed", mpi_code) } /* end if */ -#endif /* H5_HAVE_PARALLEL */ - } /* end if */ - } /* end if (actual_len != len) */ +#endif /* H5_HAVE_PARALLEL */ + } /* end if */ + } /* end if (actual_len != len) */ else { /* The length has stabilized */ len_changed = FALSE; @@ -8533,7 +8533,7 @@ H5C__serialize_cache(H5F_t *f) scan_ptr = scan_ptr->il_next; } /* end while */ } /* end block */ -#endif /* NDEBUG */ +#endif /* NDEBUG */ /* set cache_ptr->serialization_in_progress to TRUE, and back * to FALSE at the end of the function. Must maintain this flag @@ -8599,7 +8599,7 @@ H5C__serialize_cache(H5F_t *f) scan_ptr = scan_ptr->il_next; } /* end while */ } /* end block */ -#endif /* NDEBUG */ +#endif /* NDEBUG */ done: cache_ptr->serialization_in_progress = FALSE; @@ -8776,7 +8776,7 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring) #ifndef NDEBUG /* Increment serialization counter (to detect multiple serializations) */ entry_ptr->serialization_count++; -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end if */ } /* end if */ @@ -8845,7 +8845,7 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring) #ifndef NDEBUG /* Increment serialization counter (to detect multiple serializations) */ entry_ptr->serialization_count++; -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end if */ } /* end if */ else { @@ -8910,7 +8910,7 @@ H5C__serialize_single_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry H5MM_memcpy(((uint8_t *)entry_ptr->image_ptr) + image_size, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE); #endif /* H5C_DO_MEMORY_SANITY_CHECKS */ - } /* end if */ + } /* end if */ /* Generate image for entry */ if (H5C__generate_image(f, cache_ptr, entry_ptr) < 0) @@ -9217,7 +9217,7 @@ H5C_remove_entry(void *_entry) if (entry->coll_access) { entry->coll_access = FALSE; H5C__REMOVE_FROM_COLL_LIST(cache, entry, FAIL) - } /* end if */ + } /* end if */ #endif /* H5_HAVE_PARALLEL */ H5C__UPDATE_RP_FOR_EVICTION(cache, entry, FAIL) diff --git a/src/H5CX.c b/src/H5CX.c index cbef635bf67..478df9b0259 100644 --- a/src/H5CX.c +++ b/src/H5CX.c @@ -213,7 +213,7 @@ typedef struct H5CX_t { MPI_Datatype ftype; /* MPI datatype for file, when using collective I/O */ hbool_t mpi_file_flushing; /* Whether an MPI-opened file is being flushed */ hbool_t rank0_bcast; /* Whether a dataset meets read-with-rank0-and-bcast requirements */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ /* Cached DXPL properties */ size_t max_temp_buf; /* Maximum temporary buffer size */ @@ -241,8 +241,8 @@ typedef struct H5CX_t { hbool_t mpio_chunk_opt_num_valid; /* Whether collective chunk threshold is valid */ unsigned mpio_chunk_opt_ratio; /* Collective chunk ratio (H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME) */ hbool_t mpio_chunk_opt_ratio_valid; /* Whether collective chunk ratio is valid */ -#endif /* H5_HAVE_PARALLEL */ - H5Z_EDC_t err_detect; /* Error detection info (H5D_XFER_EDC_NAME) */ +#endif /* H5_HAVE_PARALLEL */ + H5Z_EDC_t err_detect; /* Error detection info (H5D_XFER_EDC_NAME) */ hbool_t err_detect_valid; /* Whether error detection info is valid */ H5Z_cb_t filter_cb; /* Filter callback function (H5D_XFER_FILTER_CB_NAME) */ hbool_t filter_cb_valid; /* Whether filter callback function is valid */ @@ -298,8 +298,8 @@ typedef struct H5CX_t { (H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME) */ hbool_t mpio_coll_rank0_bcast_set; /* Whether instrumented "collective chunk multi ratio ind" value is set */ -#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ +#endif /* H5_HAVE_PARALLEL */ /* Cached LCPL properties */ H5T_cset_t encoding; /* Link name character encoding */ @@ -370,10 +370,10 @@ typedef struct H5CX_dxpl_cache_t { uint32_t mpio_global_no_coll_cause; /* Global reason for breaking collective I/O (H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME) */ H5FD_mpio_chunk_opt_t - mpio_chunk_opt_mode; /* Collective chunk option (H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME) */ - unsigned mpio_chunk_opt_num; /* Collective chunk thrreshold (H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME) */ - unsigned mpio_chunk_opt_ratio; /* Collective chunk ratio (H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME) */ -#endif /* H5_HAVE_PARALLEL */ + mpio_chunk_opt_mode; /* Collective chunk option (H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME) */ + unsigned mpio_chunk_opt_num; /* Collective chunk thrreshold (H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME) */ + unsigned mpio_chunk_opt_ratio; /* Collective chunk ratio (H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME) */ +#endif /* H5_HAVE_PARALLEL */ H5Z_EDC_t err_detect; /* Error detection info (H5D_XFER_EDC_NAME) */ H5Z_cb_t filter_cb; /* Filter callback function (H5D_XFER_FILTER_CB_NAME) */ H5Z_data_xform_t * data_transform; /* Data transform info (H5D_XFER_XFORM_NAME) */ @@ -437,7 +437,7 @@ hbool_t H5_PKG_INIT_VAR = FALSE; #ifndef H5_HAVE_THREADSAFE static H5CX_node_t *H5CX_head_g = NULL; /* Pointer to head of context stack */ -#endif /* H5_HAVE_THREADSAFE */ +#endif /* H5_HAVE_THREADSAFE */ /* Define a "default" dataset transfer property list cache structure to use for default DXPLs */ static H5CX_dxpl_cache_t H5CX_def_dxpl_cache; @@ -1381,8 +1381,8 @@ H5CX_set_apl(hid_t *acspl_id, const H5P_libclass_t *libclass, if (H5P_USER_TRUE == md_coll_read) is_collective = TRUE; } /* end if */ -#endif /* H5_HAVE_PARALLEL */ - } /* end else */ +#endif /* H5_HAVE_PARALLEL */ + } /* end else */ #ifdef H5_HAVE_PARALLEL /* Check for collective operation */ @@ -1408,7 +1408,7 @@ H5CX_set_apl(hid_t *acspl_id, const H5P_libclass_t *libclass, MPI_Barrier(mpi_comm); } /* end if */ } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -1469,7 +1469,7 @@ H5CX_set_loc(hid_t done: FUNC_LEAVE_NOAPI(ret_value) -#else /* H5_HAVE_PARALLEL */ +#else /* H5_HAVE_PARALLEL */ FUNC_ENTER_NOAPI_NOINIT_NOERR FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5Cdbg.c b/src/H5Cdbg.c index 3cd6e6c350e..a8917eaecd0 100644 --- a/src/H5Cdbg.c +++ b/src/H5Cdbg.c @@ -434,7 +434,7 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name, double average_entries_skipped_per_calls_to_msic = 0.0f; double average_dirty_pf_entries_skipped_per_call_to_msic = 0.0f; double average_entries_scanned_per_calls_to_msic = 0.0f; -#endif /* H5C_COLLECT_CACHE_STATS */ +#endif /* H5C_COLLECT_CACHE_STATS */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -489,7 +489,7 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name, if (aggregate_max_pins < cache_ptr->max_pins[i]) aggregate_max_pins = cache_ptr->max_pins[i]; #endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ - } /* end for */ + } /* end for */ if ((total_hits > 0) || (total_misses > 0)) hit_rate = (double)100.0f * ((double)(total_hits)) / ((double)(total_hits + total_misses)); @@ -738,7 +738,7 @@ H5C_stats__reset(H5C_t *cache_ptr) #else /* NDEBUG */ #if H5C_COLLECT_CACHE_STATS H5C_stats__reset(H5C_t *cache_ptr) -#else /* H5C_COLLECT_CACHE_STATS */ +#else /* H5C_COLLECT_CACHE_STATS */ H5C_stats__reset(H5C_t H5_ATTR_UNUSED *cache_ptr) #endif /* H5C_COLLECT_CACHE_STATS */ #endif /* NDEBUG */ diff --git a/src/H5Cimage.c b/src/H5Cimage.c index 31359693680..b3f6c1254ff 100644 --- a/src/H5Cimage.c +++ b/src/H5Cimage.c @@ -361,7 +361,7 @@ H5C__construct_cache_image_buffer(H5F_t *f, H5C_t *cache_ptr) fake_cache_ptr->image_entries = (H5C_image_entry_t *)H5MM_xfree(fake_cache_ptr->image_entries); fake_cache_ptr = (H5C_t *)H5MM_xfree(fake_cache_ptr); - } /* end block */ + } /* end block */ #endif /* NDEBUG */ done: @@ -908,7 +908,7 @@ H5C_get_cache_image_config(const H5C_t *cache_ptr, H5C_cache_image_ctl_t *config herr_t #if H5C_COLLECT_CACHE_STATS H5C_image_stats(H5C_t *cache_ptr, hbool_t print_header) -#else /* H5C_COLLECT_CACHE_STATS */ +#else /* H5C_COLLECT_CACHE_STATS */ H5C_image_stats(H5C_t *cache_ptr, hbool_t H5_ATTR_UNUSED print_header) #endif /* H5C_COLLECT_CACHE_STATS */ { @@ -918,7 +918,7 @@ H5C_image_stats(H5C_t *cache_ptr, hbool_t H5_ATTR_UNUSED print_header) int64_t total_misses = 0; double hit_rate; double prefetch_use_rate; -#endif /* H5C_COLLECT_CACHE_STATS */ +#endif /* H5C_COLLECT_CACHE_STATS */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1024,7 +1024,7 @@ H5C__read_cache_image(H5F_t *f, H5C_t *cache_ptr) HMPI_GOTO_ERROR(FAIL, "can't receive cache image MPI_Bcast", mpi_result) } /* end else-if */ } /* end block */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -1607,7 +1607,7 @@ H5C_set_cache_image_config(const H5F_t *f, H5C_t *cache_ptr, H5C_cache_image_ctl HDassert(!(cache_ptr->image_ctl.generate_image)); } /* end else */ #ifdef H5_HAVE_PARALLEL - } /* end else */ + } /* end else */ #endif /* H5_HAVE_PARALLEL */ done: @@ -2088,7 +2088,7 @@ H5C__destroy_pf_entry_child_flush_deps(H5C_t *cache_ptr, H5C_cache_entry_t *pf_e u++; } /* end while */ HDassert(found); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end if */ } /* end if */ @@ -3172,7 +3172,7 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr) * we add code to store and restore adaptive resize status. */ HDassert(lru_rank_holes <= H5C__MAX_EPOCH_MARKERS); - } /* end block */ + } /* end block */ #endif /* NDEBUG */ /* Check to see if the cache is oversize, and evict entries as @@ -3480,7 +3480,7 @@ H5C__write_cache_image(H5F_t *f, const H5C_t *cache_ptr) #ifdef H5_HAVE_PARALLEL } /* end if */ } /* end block */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 081206eb162..60bf57e08a8 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -2429,7 +2429,7 @@ H5D__chunk_cacheable(const H5D_io_info_t *io_info, haddr_t caddr, hbool_t write_ #ifdef H5_HAVE_PARALLEL } /* end else */ #endif /* H5_HAVE_PARALLEL */ - } /* end else */ + } /* end else */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -4427,7 +4427,7 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_ /* Check for the chunk expanding too much to encode in a 32-bit value */ if (orig_chunk_size > ((size_t)0xffffffff)) HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk too large for 32-bit length") -#endif /* H5_SIZEOF_SIZE_T > 4 */ +#endif /* H5_SIZEOF_SIZE_T > 4 */ } /* end if */ } /* end if */ @@ -4629,7 +4629,7 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_ #ifdef H5_HAVE_PARALLEL } /* end else */ #endif /* H5_HAVE_PARALLEL */ - } /* end if */ + } /* end if */ /* Insert the chunk record into the index */ if (need_insert && ops->insert) diff --git a/src/H5Defl.c b/src/H5Defl.c index 77ea0565c04..1ab677a9a39 100644 --- a/src/H5Defl.c +++ b/src/H5Defl.c @@ -272,8 +272,8 @@ H5D__efl_read(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size tempto_read = MIN((size_t)(efl->slot[u].size - skip), (hsize_t)size); H5_CHECK_OVERFLOW(tempto_read, hsize_t, size_t); to_read = (size_t)tempto_read; -#else /* NDEBUG */ - to_read = MIN((size_t)(efl->slot[u].size - skip), (hsize_t)size); +#else /* NDEBUG */ + to_read = MIN((size_t)(efl->slot[u].size - skip), (hsize_t)size); #endif /* NDEBUG */ if ((n = HDread(fd, buf, to_read)) < 0) HGOTO_ERROR(H5E_EFL, H5E_READERROR, FAIL, "read error in external raw data file") @@ -364,7 +364,7 @@ H5D__efl_write(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t siz tempto_write = MIN(efl->slot[u].size - skip, (hsize_t)size); H5_CHECK_OVERFLOW(tempto_write, hsize_t, size_t); to_write = (size_t)tempto_write; -#else /* NDEBUG */ +#else /* NDEBUG */ to_write = MIN((size_t)(efl->slot[u].size - skip), size); #endif /* NDEBUG */ if ((size_t)HDwrite(fd, buf, to_write) != to_write) diff --git a/src/H5Dint.c b/src/H5Dint.c index 813a7c7e512..3416e9f9614 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -2001,7 +2001,7 @@ H5D_close(H5D_t *dataset) HDassert("not implemented yet" && 0); #ifdef NDEBUG HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout") -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ /*lint !e788 All appropriate cases are covered */ /* Destroy any cached layout information for the dataset */ @@ -2165,7 +2165,7 @@ H5D_mult_refresh_close(hid_t dset_id) HDassert("not implemented yet" && 0); #ifdef NDEBUG HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout") -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ /*lint !e788 All appropriate cases are covered */ /* Destroy any cached layout information for the dataset */ @@ -2375,7 +2375,7 @@ H5D__alloc_storage(const H5D_io_info_t *io_info, H5D_time_alloc_t time_alloc, hb HDassert("not implemented yet" && 0); #ifdef NDEBUG HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout") -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ /*lint !e788 All appropriate cases are covered */ /* Check if we need to initialize the space */ @@ -2497,7 +2497,7 @@ H5D__init_storage(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_t HDassert("not implemented yet" && 0); #ifdef NDEBUG HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout") -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ /*lint !e788 All appropriate cases are covered */ done: diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index 4bca0cb9d8b..df7c82927bf 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -424,7 +424,7 @@ H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space, co #ifdef H5_HAVE_INSTRUMENTED_LIBRARY H5CX_test_set_mpio_coll_rank0_bcast(TRUE); #endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ - } /* end if */ + } /* end if */ /* Set the return value, based on the global cause */ ret_value = global_cause[0] > 0 ? FALSE : TRUE; @@ -843,7 +843,7 @@ H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf else temp_not_link_io = TRUE; #endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ - } /* end else */ + } /* end else */ #ifdef H5_HAVE_INSTRUMENTED_LIBRARY { diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index 095445b9bc7..fa83fda7a61 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -216,9 +216,9 @@ typedef struct H5D_io_info_t { /* QAK: Delete the f_sh field when oloc has a shared file pointer? */ H5F_shared_t *f_sh; /* Pointer to shared file struct that dataset is within */ #ifdef H5_HAVE_PARALLEL - MPI_Comm comm; /* MPI communicator for file */ - hbool_t using_mpi_vfd; /* Whether the file is using an MPI-based VFD */ -#endif /* H5_HAVE_PARALLEL */ + MPI_Comm comm; /* MPI communicator for file */ + hbool_t using_mpi_vfd; /* Whether the file is using an MPI-based VFD */ +#endif /* H5_HAVE_PARALLEL */ H5D_storage_t * store; /* Dataset storage info */ H5D_layout_ops_t layout_ops; /* Dataset layout I/O operation function pointers */ H5D_io_ops_t io_ops; /* I/O operation function pointers */ diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 79270b80d65..2588d1cf6bf 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -833,8 +833,8 @@ herr_t H5D__virtual_delete(H5F_t *f, H5O_storage_t *storage) { #ifdef NOT_YET - int heap_rc; /* Reference count of global heap object */ -#endif /* NOT_YET */ + int heap_rc; /* Reference count of global heap object */ +#endif /* NOT_YET */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -2821,8 +2821,8 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsiz HDassert((tot_nelmts + (hsize_t)select_nelmts) >= nelmts); } /* end block */ #endif /* NDEBUG */ - } /* end if */ - } /* end if */ + } /* end if */ + } /* end if */ done: /* Cleanup I/O operation */ diff --git a/src/H5E.c b/src/H5E.c index 7be3d34478d..22f47ea9b43 100644 --- a/src/H5E.c +++ b/src/H5E.c @@ -306,14 +306,14 @@ H5E__set_default_auto(H5E_t *stk) #ifndef H5_NO_DEPRECATED_SYMBOLS #ifdef H5_USE_16_API_DEFAULT stk->auto_op.vers = 1; -#else /* H5_USE_16_API */ +#else /* H5_USE_16_API */ stk->auto_op.vers = 2; #endif /* H5_USE_16_API_DEFAULT */ stk->auto_op.func1 = stk->auto_op.func1_default = (H5E_auto1_t)H5Eprint1; stk->auto_op.func2 = stk->auto_op.func2_default = (H5E_auto2_t)H5Eprint2; stk->auto_op.is_default = TRUE; -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ stk->auto_op.func2 = (H5E_auto2_t)H5Eprint2; #endif /* H5_NO_DEPRECATED_SYMBOLS */ diff --git a/src/H5EAcache.c b/src/H5EAcache.c index a41c25c183c..6316ded6d01 100644 --- a/src/H5EAcache.c +++ b/src/H5EAcache.c @@ -555,9 +555,9 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ } /* end if */ else @@ -939,10 +939,10 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ CATCH @@ -1346,10 +1346,10 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ CATCH @@ -1750,10 +1750,10 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ CATCH @@ -2125,10 +2125,10 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ CATCH diff --git a/src/H5EAtest.c b/src/H5EAtest.c index 9a7db423ecd..0a85729064e 100644 --- a/src/H5EAtest.c +++ b/src/H5EAtest.c @@ -263,8 +263,8 @@ BEGIN_FUNC(STATIC, NOERR, herr_t, SUCCEED, -, #ifndef NDEBUG H5EA__test_ctx_t *ctx = (H5EA__test_ctx_t *)_ctx; /* Callback context to destroy */ #endif /* NDEBUG */ - uint64_t * elmt = (uint64_t *)_elmt; /* Convenience pointer to native elements */ - const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */ + uint64_t * elmt = (uint64_t *)_elmt; /* Convenience pointer to native elements */ + const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */ /* Sanity checks */ HDassert(raw); diff --git a/src/H5Eint.c b/src/H5Eint.c index 2580fa4fa3a..c743ddb36fd 100644 --- a/src/H5Eint.c +++ b/src/H5Eint.c @@ -440,10 +440,10 @@ H5E__print(const H5E_t *estack, FILE *stream, hbool_t bk_compatible) walk_op.u.func1 = H5E__walk1_cb; if (H5E__walk(estack, H5E_WALK_DOWNWARD, &walk_op, (void *)&eprint) < 0) HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't walk error stack") -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ HDassert(0 && "version 1 error stack print without deprecated symbols!"); #endif /* H5_NO_DEPRECATED_SYMBOLS */ - } /* end if */ + } /* end if */ else { walk_op.vers = 2; walk_op.u.func2 = H5E__walk2_cb; @@ -539,10 +539,10 @@ H5E__walk(const H5E_t *estack, H5E_direction_t direction, const H5E_walk_op_t *o if (ret_value < 0) HERROR(H5E_ERROR, H5E_CANTLIST, "can't walk error stack"); } /* end if */ -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ HDassert(0 && "version 1 error stack walk without deprecated symbols!"); -#endif /* H5_NO_DEPRECATED_SYMBOLS */ - } /* end if */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ + } /* end if */ else { HDassert(op->vers == 2); if (op->u.func2) { @@ -939,7 +939,7 @@ H5E_dump_api_stack(hbool_t is_api) #ifdef H5_NO_DEPRECATED_SYMBOLS if (estack->auto_op.func2) (void)((estack->auto_op.func2)(H5E_DEFAULT, estack->auto_data)); -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ if (estack->auto_op.vers == 1) { if (estack->auto_op.func1) (void)((estack->auto_op.func1)(estack->auto_data)); @@ -949,7 +949,7 @@ H5E_dump_api_stack(hbool_t is_api) (void)((estack->auto_op.func2)(H5E_DEFAULT, estack->auto_data)); } /* end else */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ - } /* end if */ + } /* end if */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Epkg.h b/src/H5Epkg.h index fe5e1277633..a1db8852ab5 100644 --- a/src/H5Epkg.h +++ b/src/H5Epkg.h @@ -73,7 +73,7 @@ typedef struct { H5E_auto1_t func1_default; /* The saved library's default function - old style. */ H5E_auto2_t func2_default; /* The saved library's default function - new style. */ } H5E_auto_op_t; -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ typedef struct { H5E_auto2_t func2; /* Only the new style callback function is available. */ } H5E_auto_op_t; @@ -85,7 +85,7 @@ typedef struct { union { #ifndef H5_NO_DEPRECATED_SYMBOLS H5E_walk1_t func1; /* Old-style callback, NO error stack param. */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ H5E_walk2_t func2; /* New-style callback, with error stack param. */ } u; } H5E_walk_op_t; diff --git a/src/H5FAcache.c b/src/H5FAcache.c index b9c2f9347f0..37723996af9 100644 --- a/src/H5FAcache.c +++ b/src/H5FAcache.c @@ -478,9 +478,9 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ } /* end if */ else @@ -862,9 +862,9 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ } /* end if */ @@ -1205,10 +1205,10 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ CATCH diff --git a/src/H5FAtest.c b/src/H5FAtest.c index de9e6d7d07a..4da7d6fd5d7 100644 --- a/src/H5FAtest.c +++ b/src/H5FAtest.c @@ -200,7 +200,7 @@ BEGIN_FUNC(STATIC, NOERR, herr_t, SUCCEED, -, #ifndef NDEBUG H5FA__test_ctx_t *ctx = (H5FA__test_ctx_t *)_ctx; /* Callback context to destroy */ #endif /* NDEBUG */ - const uint64_t *elmt = (const uint64_t *)_elmt; /* Convenience pointer to native elements */ + const uint64_t *elmt = (const uint64_t *)_elmt; /* Convenience pointer to native elements */ /* Sanity checks */ HDassert(raw); @@ -242,8 +242,8 @@ BEGIN_FUNC(STATIC, NOERR, herr_t, SUCCEED, -, #ifndef NDEBUG H5FA__test_ctx_t *ctx = (H5FA__test_ctx_t *)_ctx; /* Callback context to destroy */ #endif /* NDEBUG */ - uint64_t * elmt = (uint64_t *)_elmt; /* Convenience pointer to native elements */ - const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */ + uint64_t * elmt = (uint64_t *)_elmt; /* Convenience pointer to native elements */ + const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */ /* Sanity checks */ HDassert(raw); diff --git a/src/H5FDcore.c b/src/H5FDcore.c index 512dc1eba38..61f46c7b47c 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -88,7 +88,7 @@ typedef struct H5FD_core_t { DWORD dwVolumeSerialNumber; HANDLE hFile; /* Native windows file handle */ -#endif /* H5_HAVE_WIN32_API */ +#endif /* H5_HAVE_WIN32_API */ hbool_t dirty; /* changes not saved? */ H5FD_file_image_callbacks_t fi_callbacks; /* file image callbacks */ H5SL_t * dirty_list; /* dirty parts of the file */ @@ -831,11 +831,11 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr file->nFileIndexHigh = fileinfo.nFileIndexHigh; file->nFileIndexLow = fileinfo.nFileIndexLow; file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber; -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ file->device = sb.st_dev; file->inode = sb.st_ino; #endif /* H5_HAVE_WIN32_API */ - } /* end if */ + } /* end if */ /* If an existing file is opened, load the whole file into memory. */ if (!(H5F_ACC_CREAT & flags)) { @@ -1071,7 +1071,7 @@ H5FD__core_cmp(const H5FD_t *_f1, const H5FD_t *_f2) HGOTO_DONE(-1) if (f1->device > f2->device) HGOTO_DONE(1) -#else /* H5_DEV_T_IS_SCALAR */ +#else /* H5_DEV_T_IS_SCALAR */ /* If dev_t isn't a scalar value on this system, just use memcmp to * determine if the values are the same or not. The actual return value * shouldn't really matter... @@ -1088,7 +1088,7 @@ H5FD__core_cmp(const H5FD_t *_f1, const H5FD_t *_f2) HGOTO_DONE(1) #endif /*H5_HAVE_WIN32_API*/ - } /* end if */ + } /* end if */ else { if (NULL == f1->name && NULL == f2->name) { if (f1 < f2) @@ -1335,7 +1335,7 @@ H5FD__core_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU temp_nbytes = file->eof - addr; H5_CHECK_OVERFLOW(temp_nbytes, hsize_t, size_t); nbytes = MIN(size, (size_t)temp_nbytes); -#else /* NDEBUG */ +#else /* NDEBUG */ nbytes = MIN(size, (size_t)(file->eof - addr)); #endif /* NDEBUG */ @@ -1607,7 +1607,7 @@ H5FD__core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing bError = SetEndOfFile(file->hFile); if (0 == bError) HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ if (-1 == HDftruncate(file->fd, (HDoff_t)new_eof)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") #endif /* H5_HAVE_WIN32_API */ diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c index eb2590faaeb..605ca712753 100644 --- a/src/H5FDdirect.c +++ b/src/H5FDdirect.c @@ -660,7 +660,7 @@ H5FD__direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2) HGOTO_DONE(-1) if (f1->device > f2->device) HGOTO_DONE(1) -#else /* H5_DEV_T_IS_SCALAR */ +#else /* H5_DEV_T_IS_SCALAR */ /* If dev_t isn't a scalar value on this system, just use memcmp to * determine if the values are the same or not. The actual return value * shouldn't really matter... @@ -1276,7 +1276,7 @@ H5FD__direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_AT (void)SetFilePointer((HANDLE)filehandle, li.LowPart, &li.HighPart, FILE_BEGIN); if (SetEndOfFile((HANDLE)filehandle) == 0) HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ if (-1 == HDftruncate(file->fd, (HDoff_t)file->eoa)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") #endif /* H5_HAVE_WIN32_API */ diff --git a/src/H5FDlog.c b/src/H5FDlog.c index 99b0b8d8f34..fc2cb12c0b5 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -570,7 +570,7 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) file->nFileIndexHigh = fileinfo.nFileIndexHigh; file->nFileIndexLow = fileinfo.nFileIndexLow; file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber; -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ file->device = sb.st_dev; file->inode = sb.st_ino; #endif /* H5_HAVE_WIN32_API */ @@ -861,7 +861,7 @@ H5FD__log_cmp(const H5FD_t *_f1, const H5FD_t *_f2) HGOTO_DONE(-1) if (f1->device > f2->device) HGOTO_DONE(1) -#else /* H5_DEV_T_IS_SCALAR */ +#else /* H5_DEV_T_IS_SCALAR */ /* If dev_t isn't a scalar value on this system, just use memcmp to * determine if the values are the same or not. The actual return value * shouldn't really matter... @@ -1182,7 +1182,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had #ifndef H5_HAVE_PREADWRITE H5_timer_t seek_timer; /* Timer for seek operation */ H5_timevals_t seek_times; /* Elapsed time for seek operation */ -#endif /* H5_HAVE_PREADWRITE */ +#endif /* H5_HAVE_PREADWRITE */ HDoff_t offset = (HDoff_t)addr; herr_t ret_value = SUCCEED; /* Return value */ @@ -1250,7 +1250,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had HDfprintf(file->logfp, "\n"); } /* end if */ } /* end if */ -#endif /* H5_HAVE_PREADWRITE */ +#endif /* H5_HAVE_PREADWRITE */ /* Start timer for read operation */ if (file->fa.flags & H5FD_LOG_TIME_READ) { @@ -1280,7 +1280,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had if (bytes_read > 0) offset += bytes_read; #else - bytes_read = HDread(file->fd, buf, bytes_in); + bytes_read = HDread(file->fd, buf, bytes_in); #endif /* H5_HAVE_PREADWRITE */ } while (-1 == bytes_read && EINTR == errno); @@ -1396,7 +1396,7 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha #ifndef H5_HAVE_PREADWRITE H5_timer_t seek_timer; /* Timer for seek operation */ H5_timevals_t seek_times; /* Elapsed time for seek operation */ -#endif /* H5_HAVE_PREADWRITE */ +#endif /* H5_HAVE_PREADWRITE */ HDoff_t offset = (HDoff_t)addr; herr_t ret_value = SUCCEED; /* Return value */ @@ -1472,7 +1472,7 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha HDfprintf(file->logfp, "\n"); } /* end if */ } /* end if */ -#endif /* H5_HAVE_PREADWRITE */ +#endif /* H5_HAVE_PREADWRITE */ /* Start timer for write operation */ if (file->fa.flags & H5FD_LOG_TIME_WRITE) { @@ -1648,7 +1648,7 @@ H5FD__log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_ if (0 == SetEndOfFile(file->hFile)) HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") } -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ /* Truncate/extend the file */ if (-1 == HDftruncate(file->fd, (HDoff_t)file->eoa)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") diff --git a/src/H5FDmirror.c b/src/H5FDmirror.c index c79ce858297..17d03d221c4 100644 --- a/src/H5FDmirror.c +++ b/src/H5FDmirror.c @@ -126,7 +126,7 @@ typedef struct H5FD_mirror_t { } while (0) #else #define LOG_XMIT_BYTES(label, buf, len) /* no-op */ -#endif /* MIRROR_DEBUG_XMIT_BYTE */ +#endif /* MIRROR_DEBUG_XMIT_BYTE */ #if MIRROR_DEBUG_OP_CALLS #define LOG_OP_CALL(name) \ @@ -136,7 +136,7 @@ typedef struct H5FD_mirror_t { } while (0) #else #define LOG_OP_CALL(name) /* no-op */ -#endif /* MIRROR_DEBUG_OP_CALLS */ +#endif /* MIRROR_DEBUG_OP_CALLS */ /* Prototypes */ static herr_t H5FD__mirror_term(void); diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index a4e0bafb5ed..c16e01e5fe5 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -200,7 +200,7 @@ H5FD_mpio_init(void) { #ifdef H5FDmpio_DEBUG static int H5FD_mpio_Debug_inited = 0; -#endif /* H5FDmpio_DEBUG */ +#endif /* H5FDmpio_DEBUG */ const char *s; /* String for environment variables */ hid_t ret_value = H5I_INVALID_HID; /* Return value */ @@ -229,7 +229,7 @@ H5FD_mpio_init(void) } /* end while */ } /* end if */ H5FD_mpio_Debug_inited++; - } /* end if */ + } /* end if */ #endif /* H5FDmpio_DEBUG */ /* Set return value */ diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index 02323c6190b..7789d393144 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -377,7 +377,7 @@ H5FD__sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr file->nFileIndexHigh = fileinfo.nFileIndexHigh; file->nFileIndexLow = fileinfo.nFileIndexLow; file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber; -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ file->device = sb.st_dev; file->inode = sb.st_ino; #endif /* H5_HAVE_WIN32_API */ @@ -507,7 +507,7 @@ H5FD__sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2) HGOTO_DONE(-1) if (f1->device > f2->device) HGOTO_DONE(1) -#else /* H5_DEV_T_IS_SCALAR */ +#else /* H5_DEV_T_IS_SCALAR */ /* If dev_t isn't a scalar value on this system, just use memcmp to * determine if the values are the same or not. The actual return value * shouldn't really matter... @@ -742,7 +742,7 @@ H5FD__sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU if (bytes_read > 0) offset += bytes_read; #else - bytes_read = HDread(file->fd, buf, bytes_in); + bytes_read = HDread(file->fd, buf, bytes_in); #endif /* H5_HAVE_PREADWRITE */ } while (-1 == bytes_read && EINTR == errno); @@ -945,7 +945,7 @@ H5FD__sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR bError = SetEndOfFile(file->hFile); if (0 == bError) HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ if (-1 == HDftruncate(file->fd, (HDoff_t)file->eoa)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") #endif /* H5_HAVE_WIN32_API */ diff --git a/src/H5FDspace.c b/src/H5FDspace.c index 98210a4e81b..38a96fbf8e3 100644 --- a/src/H5FDspace.c +++ b/src/H5FDspace.c @@ -333,7 +333,7 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size) HDfprintf(stderr, "%s: LEAKED MEMORY!!! type = %u, addr = %a, size = %Hu\n", FUNC, (unsigned)type, addr, size); #endif /* H5FD_ALLOC_DEBUG */ - } /* end else */ + } /* end else */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c index 4d6554c5e9d..189c054f7b6 100644 --- a/src/H5FDsplitter.c +++ b/src/H5FDsplitter.c @@ -94,7 +94,7 @@ typedef struct H5FD_splitter_t { } while (0) #else #define H5FD_SPLITTER_LOG_CALL(name) /* no-op */ -#endif /* H5FD_SPLITTER_DEBUG_OP_CALLS */ +#endif /* H5FD_SPLITTER_DEBUG_OP_CALLS */ /* Private functions */ diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index c66765a214a..4650c39982b 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -115,7 +115,7 @@ typedef struct H5FD_stdio_t { DWORD nFileIndexHigh; DWORD dwVolumeSerialNumber; - HANDLE hFile; /* Native windows file handle */ + HANDLE hFile; /* Native windows file handle */ #endif /* H5_HAVE_WIN32_API */ } H5FD_stdio_t; @@ -338,7 +338,7 @@ H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr static const char *func = "H5FD_stdio_open"; /* Function Name for error reporting */ #ifdef H5_HAVE_WIN32_API struct _BY_HANDLE_FILE_INFORMATION fileinfo; -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ struct stat sb; #endif /* H5_HAVE_WIN32_API */ @@ -431,7 +431,7 @@ H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr /* Get the file descriptor (needed for truncate and some Windows information) */ #ifdef H5_HAVE_WIN32_API file->fd = _fileno(file->fp); -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ file->fd = fileno(file->fp); #endif /* H5_HAVE_WIN32_API */ if (file->fd < 0) { @@ -458,7 +458,7 @@ H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr file->nFileIndexHigh = fileinfo.nFileIndexHigh; file->nFileIndexLow = fileinfo.nFileIndexLow; file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber; -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ if (fstat(file->fd, &sb) < 0) { free(file); fclose(f); @@ -549,7 +549,7 @@ H5FD_stdio_cmp(const H5FD_t *_f1, const H5FD_t *_f2) return -1; if (f1->device > f2->device) return 1; -#else /* H5_DEV_T_IS_SCALAR */ +#else /* H5_DEV_T_IS_SCALAR */ /* If dev_t isn't a scalar value on this system, just use memcmp to * determine if the values are the same or not. The actual return value * shouldn't really matter... @@ -1075,7 +1075,7 @@ H5FD_stdio_truncate(H5FD_t *_file, hid_t /*UNUSED*/ dxpl_id, hbool_t /*UNUSED*/ if (0 == bError) H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "unable to truncate/extend file properly", -1) -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ /* Reset seek offset to beginning of file, so that file isn't re-extended later */ rewind(file->fp); diff --git a/src/H5FS.c b/src/H5FS.c index d75711cb8d3..4a050a63a07 100644 --- a/src/H5FS.c +++ b/src/H5FS.c @@ -362,7 +362,7 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr) #ifdef H5FS_DEBUG HDfprintf(stderr, "%s: Done expunging free space section info from cache\n", FUNC); -#endif /* H5FS_DEBUG */ +#endif /* H5FS_DEBUG */ } /* end if */ else { #ifdef H5FS_DEBUG @@ -513,7 +513,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace) */ #ifdef H5FS_DEBUG HDfprintf(stderr, "%s: Section info can't 'go away', header will own it\n", FUNC); -#endif /* H5FS_DEBUG */ +#endif /* H5FS_DEBUG */ } /* end if */ else { #ifdef H5FS_DEBUG diff --git a/src/H5FScache.c b/src/H5FScache.c index 3f8ce2bca75..bf91e2214bf 100644 --- a/src/H5FScache.c +++ b/src/H5FScache.c @@ -820,10 +820,10 @@ H5FS__cache_hdr_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_FSPACE, H5E_BADVALUE, FAIL, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -1005,10 +1005,10 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l if (fspace->serial_sect_count > 0) { hsize_t old_tot_sect_count; /* Total section count from header */ hsize_t H5_ATTR_NDEBUG_UNUSED - old_serial_sect_count; /* Total serializable section count from header */ - hsize_t H5_ATTR_NDEBUG_UNUSED old_ghost_sect_count; /* Total ghost section count from header */ - hsize_t H5_ATTR_NDEBUG_UNUSED old_tot_space; /* Total space managed from header */ - unsigned sect_cnt_size; /* The size of the section size counts */ + old_serial_sect_count; /* Total serializable section count from header */ + hsize_t H5_ATTR_NDEBUG_UNUSED old_ghost_sect_count; /* Total ghost section count from header */ + hsize_t H5_ATTR_NDEBUG_UNUSED old_tot_space; /* Total space managed from header */ + unsigned sect_cnt_size; /* The size of the section size counts */ /* Compute the size of the section counts */ sect_cnt_size = H5VM_limit_enc_size((uint64_t)fspace->serial_sect_count); @@ -1358,9 +1358,9 @@ H5FS__cache_sinfo_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_FSPACE, H5E_BADVALUE, FAIL, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ } /* end if */ diff --git a/src/H5Fint.c b/src/H5Fint.c index 60755135eee..1d7a86f98e2 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -2623,8 +2623,8 @@ H5F__build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *n hid_t new_fapl_id = H5I_INVALID_HID; /* ID for duplicated FAPL */ #ifdef H5_HAVE_SYMLINK /* This has to be declared here to avoid unfreed resources on errors */ - char *realname = NULL; /* Fully resolved path name of file */ -#endif /* H5_HAVE_SYMLINK */ + char *realname = NULL; /* Fully resolved path name of file */ +#endif /* H5_HAVE_SYMLINK */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index 7445d368289..621943358bc 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -30,8 +30,8 @@ typedef struct H5F_t H5F_t; /* Private headers needed by this file */ #include "H5MMprivate.h" /* Memory management */ #ifdef H5_HAVE_PARALLEL -#include "H5Pprivate.h" /* Property lists */ -#endif /* H5_HAVE_PARALLEL */ +#include "H5Pprivate.h" /* Property lists */ +#endif /* H5_HAVE_PARALLEL */ #include "H5VMprivate.h" /* Vectors and arrays */ #include "H5VLprivate.h" /* Virtual Object Layer */ @@ -532,33 +532,33 @@ typedef struct H5F_t H5F_t; #define H5F_DEFAULT_CSET H5T_CSET_ASCII /* ========= File Creation properties ============ */ -#define H5F_CRT_USER_BLOCK_NAME "block_size" /* Size of the file user block in bytes */ +#define H5F_CRT_USER_BLOCK_NAME "block_size" /* Size of the file user block in bytes */ #define H5F_CRT_SYM_LEAF_NAME "symbol_leaf" /* 1/2 rank for symbol table leaf nodes */ #define H5F_CRT_SYM_LEAF_DEF 4 -#define H5F_CRT_BTREE_RANK_NAME "btree_rank" /* 1/2 rank for btree internal nodes */ +#define H5F_CRT_BTREE_RANK_NAME "btree_rank" /* 1/2 rank for btree internal nodes */ #define H5F_CRT_ADDR_BYTE_NUM_NAME "addr_byte_num" /* Byte number in an address */ -#define H5F_CRT_OBJ_BYTE_NUM_NAME "obj_byte_num" /* Byte number for object size */ +#define H5F_CRT_OBJ_BYTE_NUM_NAME "obj_byte_num" /* Byte number for object size */ #define H5F_CRT_SUPER_VERS_NAME "super_version" /* Version number of the superblock */ /* Number of shared object header message indexes */ #define H5F_CRT_SHMSG_NINDEXES_NAME "num_shmsg_indexes" #define H5F_CRT_SHMSG_INDEX_TYPES_NAME "shmsg_message_types" /* Types of message in each index */ /* Minimum size of messages in each index */ #define H5F_CRT_SHMSG_INDEX_MINSIZE_NAME "shmsg_message_minsize" -#define H5F_CRT_SHMSG_LIST_MAX_NAME "shmsg_list_max" /* Shared message list maximum size */ -#define H5F_CRT_SHMSG_BTREE_MIN_NAME "shmsg_btree_min" /* Shared message B-tree minimum size */ -#define H5F_CRT_FILE_SPACE_STRATEGY_NAME "file_space_strategy" /* File space handling strategy */ -#define H5F_CRT_FREE_SPACE_PERSIST_NAME "free_space_persist" /* Free-space persisting status */ +#define H5F_CRT_SHMSG_LIST_MAX_NAME "shmsg_list_max" /* Shared message list maximum size */ +#define H5F_CRT_SHMSG_BTREE_MIN_NAME "shmsg_btree_min" /* Shared message B-tree minimum size */ +#define H5F_CRT_FILE_SPACE_STRATEGY_NAME "file_space_strategy" /* File space handling strategy */ +#define H5F_CRT_FREE_SPACE_PERSIST_NAME "free_space_persist" /* Free-space persisting status */ #define H5F_CRT_FREE_SPACE_THRESHOLD_NAME "free_space_threshold" /* Free space section threshold */ #define H5F_CRT_FILE_SPACE_PAGE_SIZE_NAME "file_space_page_size" /* File space page size */ /* ========= File Access properties ============ */ #define H5F_ACS_META_CACHE_INIT_CONFIG_NAME \ - "mdc_initCacheCfg" /* Initial metadata cache resize configuration */ + "mdc_initCacheCfg" /* Initial metadata cache resize configuration */ #define H5F_ACS_DATA_CACHE_NUM_SLOTS_NAME "rdcc_nslots" /* Size of raw data chunk cache(slots) */ #define H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME "rdcc_nbytes" /* Size of raw data chunk cache(bytes) */ -#define H5F_ACS_PREEMPT_READ_CHUNKS_NAME "rdcc_w0" /* Preemption read chunks first */ -#define H5F_ACS_ALIGN_THRHD_NAME "threshold" /* Threshold for alignment */ -#define H5F_ACS_ALIGN_NAME "align" /* Alignment */ +#define H5F_ACS_PREEMPT_READ_CHUNKS_NAME "rdcc_w0" /* Preemption read chunks first */ +#define H5F_ACS_ALIGN_THRHD_NAME "threshold" /* Threshold for alignment */ +#define H5F_ACS_ALIGN_NAME "align" /* Alignment */ #define H5F_ACS_META_BLOCK_SIZE_NAME \ "meta_block_size" /* Minimum metadata allocation block size (when aggregating metadata allocations) */ #define H5F_ACS_SIEVE_BUF_SIZE_NAME \ @@ -566,25 +566,25 @@ typedef struct H5F_t H5F_t; #define H5F_ACS_SDATA_BLOCK_SIZE_NAME \ "sdata_block_size" /* Minimum "small data" allocation block size (when aggregating "small" raw data \ allocations) */ -#define H5F_ACS_GARBG_COLCT_REF_NAME "gc_ref" /* Garbage-collect references */ -#define H5F_ACS_FILE_DRV_NAME "vfd_info" /* File driver ID & info */ +#define H5F_ACS_GARBG_COLCT_REF_NAME "gc_ref" /* Garbage-collect references */ +#define H5F_ACS_FILE_DRV_NAME "vfd_info" /* File driver ID & info */ #define H5F_ACS_VOL_CONN_NAME "vol_connector_info" /* VOL connector ID & info */ -#define H5F_ACS_CLOSE_DEGREE_NAME "close_degree" /* File close degree */ -#define H5F_ACS_FAMILY_OFFSET_NAME "family_offset" /* Offset position in file for family file driver */ +#define H5F_ACS_CLOSE_DEGREE_NAME "close_degree" /* File close degree */ +#define H5F_ACS_FAMILY_OFFSET_NAME "family_offset" /* Offset position in file for family file driver */ #define H5F_ACS_FAMILY_NEWSIZE_NAME \ "family_newsize" /* New member size of family driver. (private property only used by h5repart) */ #define H5F_ACS_FAMILY_TO_SINGLE_NAME \ "family_to_single" /* Whether to convert family to a single-file driver. (private property only used by \ h5repart) */ -#define H5F_ACS_MULTI_TYPE_NAME "multi_type" /* Data type in multi file driver */ -#define H5F_ACS_LIBVER_LOW_BOUND_NAME "libver_low_bound" /* 'low' bound of library format versions */ +#define H5F_ACS_MULTI_TYPE_NAME "multi_type" /* Data type in multi file driver */ +#define H5F_ACS_LIBVER_LOW_BOUND_NAME "libver_low_bound" /* 'low' bound of library format versions */ #define H5F_ACS_LIBVER_HIGH_BOUND_NAME "libver_high_bound" /* 'high' bound of library format versions */ #define H5F_ACS_WANT_POSIX_FD_NAME \ "want_posix_fd" /* Internal: query the file descriptor from the core VFD, instead of the memory address \ */ #define H5F_ACS_METADATA_READ_ATTEMPTS_NAME "metadata_read_attempts" /* # of metadata read attempts */ -#define H5F_ACS_OBJECT_FLUSH_CB_NAME "object_flush_cb" /* Object flush callback */ -#define H5F_ACS_EFC_SIZE_NAME "efc_size" /* Size of external file cache */ +#define H5F_ACS_OBJECT_FLUSH_CB_NAME "object_flush_cb" /* Object flush callback */ +#define H5F_ACS_EFC_SIZE_NAME "efc_size" /* Size of external file cache */ #define H5F_ACS_FILE_IMAGE_INFO_NAME \ "file_image_info" /* struct containing initial file image and callback info */ #define H5F_ACS_CLEAR_STATUS_FLAGS_NAME \ @@ -594,7 +594,7 @@ typedef struct H5F_t H5F_t; /* Private property used only by h5clear */ #define H5F_ACS_SKIP_EOF_CHECK_NAME "skip_eof_check" /* Skip EOF check */ /* Private property used only by h5clear */ -#define H5F_ACS_USE_MDC_LOGGING_NAME "use_mdc_logging" /* Whether to use metadata cache logging */ +#define H5F_ACS_USE_MDC_LOGGING_NAME "use_mdc_logging" /* Whether to use metadata cache logging */ #define H5F_ACS_MDC_LOG_LOCATION_NAME "mdc_log_location" /* Name of metadata cache log location */ #define H5F_ACS_START_MDC_LOG_ON_ACCESS_NAME \ "start_mdc_log_on_access" /* Whether logging starts on file create/open */ @@ -618,7 +618,7 @@ typedef struct H5F_t H5F_t; #ifdef H5_HAVE_PARALLEL #define H5F_ACS_MPI_PARAMS_COMM_NAME "mpi_params_comm" /* the MPI communicator */ #define H5F_ACS_MPI_PARAMS_INFO_NAME "mpi_params_info" /* the MPI info struct */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ /* ======================== File Mount properties ====================*/ #define H5F_MNT_SYM_LOCAL_NAME "local" /* Whether absolute symlinks local to file. */ @@ -640,7 +640,7 @@ typedef struct H5F_t H5F_t; 3 /* With file locking and consistency flags (at least this version for SWMR support) */ #define HDF5_SUPERBLOCK_VERSION_LATEST HDF5_SUPERBLOCK_VERSION_3 /* The maximum super block format */ #define HDF5_SUPERBLOCK_VERSION_V18_LATEST \ - HDF5_SUPERBLOCK_VERSION_2 /* The latest superblock version for v18 */ + HDF5_SUPERBLOCK_VERSION_2 /* The latest superblock version for v18 */ #define HDF5_FREESPACE_VERSION 0 /* of the Free-Space Info */ #define HDF5_OBJECTDIR_VERSION 0 /* of the Object Directory format */ #define HDF5_SHAREDHEADER_VERSION 0 /* of the Shared-Header Info */ @@ -649,12 +649,12 @@ typedef struct H5F_t H5F_t; /* B-tree internal 'K' values */ #define HDF5_BTREE_SNODE_IK_DEF 16 #define HDF5_BTREE_CHUNK_IK_DEF \ - 32 /* Note! this value is assumed \ - to be 32 for version 0 \ - of the superblock and \ - if it is changed, the code \ - must compensate. -QAK \ - */ + 32 /* Note! this value is assumed \ + to be 32 for version 0 \ + of the superblock and \ + if it is changed, the code \ + must compensate. -QAK \ + */ #define HDF5_BTREE_IK_MAX_ENTRIES 65536 /* 2^16 - 2 bytes for storing entries (children) */ /* See format specification on version 1 B-trees */ @@ -691,7 +691,7 @@ typedef struct H5F_t H5F_t; #define H5F_PAGED_AGGR(F) (F->shared->fs_strategy == H5F_FSPACE_STRATEGY_PAGE && F->shared->fs_page_size) /* Metadata read attempt values */ -#define H5F_METADATA_READ_ATTEMPTS 1 /* Default # of read attempts for non-SWMR access */ +#define H5F_METADATA_READ_ATTEMPTS 1 /* Default # of read attempts for non-SWMR access */ #define H5F_SWMR_METADATA_READ_ATTEMPTS 100 /* Default # of read attempts for SWMR access */ /* Macros to define signatures of all objects in the file */ @@ -807,7 +807,7 @@ typedef enum H5F_mem_page_t { } H5F_mem_page_t; /* Aliases for H5F_mem_page_t enum values */ -#define H5F_MEM_PAGE_META H5F_MEM_PAGE_SUPER /* Small-sized meta data */ +#define H5F_MEM_PAGE_META H5F_MEM_PAGE_SUPER /* Small-sized meta data */ #define H5F_MEM_PAGE_GENERIC H5F_MEM_PAGE_LARGE_SUPER /* Large-sized generic: meta and raw */ /* Type of prefix for opening prefixed files */ diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c index 48346c572df..975da37ac54 100644 --- a/src/H5Fsuper.c +++ b/src/H5Fsuper.c @@ -328,7 +328,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) hbool_t skip_eof_check = FALSE; /* Whether to skip checking the EOF value */ #ifdef H5_HAVE_PARALLEL int mpi_size = 1; -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE_TAG(H5AC__SUPERBLOCK_TAG) diff --git a/src/H5Gent.c b/src/H5Gent.c index fb59d9766d5..c6eabf37fc8 100644 --- a/src/H5Gent.c +++ b/src/H5Gent.c @@ -421,7 +421,7 @@ H5G__ent_convert(H5F_t *f, H5HL_t *heap, const char *name, const H5O_link_t *lnk HDassert(!stab_exists); } /* end else */ #endif /* NDEBUG */ - } /* end if */ + } /* end if */ else if (obj_type == H5O_TYPE_UNKNOWN) { /* Try to retrieve symbol table information for caching */ H5O_loc_t targ_oloc; /* Location of link target */ diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h index a037e5462f3..14b7ae72370 100644 --- a/src/H5Gprivate.h +++ b/src/H5Gprivate.h @@ -167,16 +167,16 @@ typedef herr_t (*H5G_traverse_t)(H5G_loc_t *grp_loc /*in*/, const char *name, typedef enum H5G_link_iterate_op_type_t { #ifndef H5_NO_DEPRECATED_SYMBOLS H5G_LINK_OP_OLD, /* "Old" application callback */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ - H5G_LINK_OP_NEW /* "New" application callback */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ + H5G_LINK_OP_NEW /* "New" application callback */ } H5G_link_iterate_op_type_t; typedef struct { H5G_link_iterate_op_type_t op_type; union { #ifndef H5_NO_DEPRECATED_SYMBOLS - H5G_iterate_t op_old; /* "Old" application callback for each link */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + H5G_iterate_t op_old; /* "Old" application callback for each link */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ H5L_iterate2_t op_new; /* "New" application callback for each link */ } op_func; } H5G_link_iterate_t; diff --git a/src/H5Gpublic.h b/src/H5Gpublic.h index 6db23e0643a..fd0106b7baf 100644 --- a/src/H5Gpublic.h +++ b/src/H5Gpublic.h @@ -98,7 +98,7 @@ H5_DLL herr_t H5Grefresh(hid_t group_id); /* Macros for types of objects in a group (see H5G_obj_t definition) */ #define H5G_NTYPES 256 /* Max possible number of types */ -#define H5G_NLIBTYPES 8 /* Number of internal types */ +#define H5G_NLIBTYPES 8 /* Number of internal types */ #define H5G_NUSERTYPES (H5G_NTYPES - H5G_NLIBTYPES) #define H5G_USERTYPE(X) (8 + (X)) /* User defined types */ diff --git a/src/H5Groot.c b/src/H5Groot.c index 29cb46ee50c..d7fbb49ab53 100644 --- a/src/H5Groot.c +++ b/src/H5Groot.c @@ -246,8 +246,8 @@ H5G_mkroot(H5F_t *f, hbool_t create_root) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to verify symbol table") } /* end if */ #endif /* H5_STRICT_FORMAT_CHECKS */ - } /* end if */ - } /* end else */ + } /* end if */ + } /* end else */ /* Cache the root group's symbol table information in the root group symbol * table entry. It will have been allocated by now if it needs to be diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c index 13be47a470a..505718aa23b 100644 --- a/src/H5Gtraverse.c +++ b/src/H5Gtraverse.c @@ -198,7 +198,7 @@ H5G__traverse_ud(const H5G_loc_t *grp_loc /*in,out*/, const H5O_link_t *lnk, H5G else cb_return = (link_class->trav_func)(lnk->name, cur_grp, lnk->u.ud.udata, lnk->u.ud.size, H5CX_get_lapl(), H5CX_get_dxpl()); -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ cb_return = (link_class->trav_func)(lnk->name, cur_grp, lnk->u.ud.udata, lnk->u.ud.size, H5CX_get_lapl(), H5CX_get_dxpl()); #endif /* H5_NO_DEPRECATED_SYMBOLS */ diff --git a/src/H5HFcache.c b/src/H5HFcache.c index ef2c4b277ae..0e1304fd388 100644 --- a/src/H5HFcache.c +++ b/src/H5HFcache.c @@ -1302,9 +1302,9 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG H5HF_indirect_t *iblock = (H5HF_indirect_t *)_thing; /* Indirect block info */ uint8_t * image = (uint8_t *)_image; /* Pointer into raw data buffer */ #ifndef NDEBUG - unsigned nchildren = 0; /* Track # of children */ - size_t max_child = 0; /* Track max. child entry used */ -#endif /* NDEBUG */ + unsigned nchildren = 0; /* Track # of children */ + size_t max_child = 0; /* Track max. child entry used */ +#endif /* NDEBUG */ uint32_t metadata_chksum; /* Computed metadata checksum value */ size_t u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ @@ -1378,7 +1378,7 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG max_child = u; } /* end if */ #endif /* NDEBUG */ - } /* end for */ + } /* end for */ /* Compute checksum */ metadata_chksum = H5_checksum_metadata((uint8_t *)_image, (size_t)(image - (uint8_t *)_image), 0); diff --git a/src/H5HG.c b/src/H5HG.c index 0a6955e7c9e..a50d29f9156 100644 --- a/src/H5HG.c +++ b/src/H5HG.c @@ -548,7 +548,7 @@ H5HG_insert(H5F_t *f, size_t size, const void *obj, H5HG_t *hobj /*out*/) HDmemset(heap->obj[idx].begin + H5HG_SIZEOF_OBJHDR(f) + size, 0, need - (H5HG_SIZEOF_OBJHDR(f) + size)); #endif /* OLD_WAY */ - } /* end if */ + } /* end if */ heap_flags |= H5AC__DIRTIED_FLAG; /* Return value */ diff --git a/src/H5MF.c b/src/H5MF.c index d4c79df6133..2fe78a336a6 100644 --- a/src/H5MF.c +++ b/src/H5MF.c @@ -1202,7 +1202,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: After H5FS_sect_add()\n", FUNC); #endif /* H5MF_ALLOC_DEBUG_MORE */ - } /* end if */ + } /* end if */ else { htri_t merged; /* Whether node was merged */ H5MF_sect_ud_t udata; /* User data for callback */ @@ -1369,7 +1369,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: H5MF__aggr_try_extend = %t\n", FUNC, ret_value); -#endif /* H5MF_ALLOC_DEBUG_MORE */ +#endif /* H5MF_ALLOC_DEBUG_MORE */ } /* end if */ /* If no extension so far, try to extend into a free-space section */ @@ -1395,7 +1395,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi "error extending block in free space manager") #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: Try to H5FS_sect_try_extend = %t\n", FUNC, ret_value); -#endif /* H5MF_ALLOC_DEBUG_MORE */ +#endif /* H5MF_ALLOC_DEBUG_MORE */ } /* end if */ /* For paged aggregation and a metadata block: try to extend into page end threshold */ @@ -1406,7 +1406,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi ret_value = TRUE; #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: Try to extend into the page end threshold = %t\n", FUNC, ret_value); -#endif /* H5MF_ALLOC_DEBUG_MORE */ +#endif /* H5MF_ALLOC_DEBUG_MORE */ } /* end if */ } /* end if */ } /* allow_extend */ @@ -2944,7 +2944,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) HDassert(fs_stat.serial_sect_count > 0); HDassert(fs_stat.alloc_sect_size > 0); HDassert(fs_stat.alloc_sect_size == fs_stat.sect_size); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end if */ else { HDassert(!H5F_addr_defined(fs_stat.addr)); diff --git a/src/H5MFsection.c b/src/H5MFsection.c index 473c1dc5cd2..597da762dd9 100644 --- a/src/H5MFsection.c +++ b/src/H5MFsection.c @@ -648,7 +648,7 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata) #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: section is dropped\n", FUNC); #endif /* H5MF_ALLOC_DEBUG_MORE */ - } /* end if */ + } /* end if */ /* Adjust the section if it is not at page end but its size + prem is at page end */ else if (prem <= H5F_PGEND_META_THRES(udata->f)) { (*sect)->sect_info.size += prem; @@ -656,7 +656,7 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata) HDfprintf(stderr, "%s: section is adjusted {%a, %Hu}\n", FUNC, (*sect)->sect_info.addr, (*sect)->sect_info.size); #endif /* H5MF_ALLOC_DEBUG_MORE */ - } /* end if */ + } /* end if */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5MM.c b/src/H5MM.c index 1effd6a6fad..7b49c72cab0 100644 --- a/src/H5MM.c +++ b/src/H5MM.c @@ -53,7 +53,7 @@ struct H5MM_block_t; /* Forward declaration for typedef */ typedef struct H5MM_block_t { unsigned char - sig[H5MM_SIG_SIZE]; /* Signature for the block, to indicate it was allocated with H5MM* interface */ + sig[H5MM_SIG_SIZE]; /* Signature for the block, to indicate it was allocated with H5MM* interface */ struct H5MM_block_t *next; /* Pointer to next block in the list of allocated blocks */ struct H5MM_block_t *prev; /* Pointer to previous block in the list of allocated blocks */ union { @@ -70,7 +70,7 @@ typedef struct H5MM_block_t { /********************/ /* Local Prototypes */ /********************/ -#if defined H5_MEMORY_ALLOC_SANITY_CHECK +#if defined H5_MEMORY_ALLOC_SANITY_CHECK static hbool_t H5MM__is_our_block(void *mem); static void H5MM__sanity_check_block(const H5MM_block_t *block); static void H5MM__sanity_check(void *mem); @@ -271,7 +271,7 @@ H5MM_malloc(size_t size) H5MM_block_head_s.u.info.in_use = TRUE; H5MM_init_s = TRUE; - } /* end if */ + } /* end if */ #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ if (size) { @@ -309,10 +309,10 @@ H5MM_malloc(size_t size) } /* end if */ else ret_value = NULL; -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ ret_value = HDmalloc(size); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ - } /* end if */ + } /* end if */ else ret_value = NULL; @@ -352,10 +352,10 @@ H5MM_calloc(size_t size) #if defined H5_MEMORY_ALLOC_SANITY_CHECK if (NULL != (ret_value = H5MM_malloc(size))) HDmemset(ret_value, 0, size); -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ ret_value = HDcalloc((size_t)1, size); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ - } /* end if */ + } /* end if */ else ret_value = NULL; @@ -417,14 +417,14 @@ H5MM_realloc(void *mem, size_t size) } else ret_value = H5MM_xfree(mem); -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ ret_value = HDrealloc(mem, size); /* Some platforms do not return NULL if size is zero. */ if (0 == size) ret_value = NULL; #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ - } /* end else */ + } /* end else */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5MM_realloc() */ @@ -542,10 +542,10 @@ H5MM_xfree(void *mem) } else HDfree(mem); -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ HDfree(mem); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ - } /* end if */ + } /* end if */ FUNC_LEAVE_NOAPI(NULL) } /* end H5MM_xfree() */ @@ -642,8 +642,8 @@ H5MM_get_alloc_stats(H5_alloc_stats_t *stats) stats->total_alloc_blocks_count = H5MM_total_alloc_blocks_count_s; stats->curr_alloc_blocks_count = H5MM_curr_alloc_blocks_count_s; stats->peak_alloc_blocks_count = H5MM_peak_alloc_blocks_count_s; - } /* end if */ -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ + } /* end if */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ if (stats) HDmemset(stats, 0, sizeof(H5_alloc_stats_t)); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ diff --git a/src/H5MMprivate.h b/src/H5MMprivate.h index b4a59bac76e..d957686da7d 100644 --- a/src/H5MMprivate.h +++ b/src/H5MMprivate.h @@ -49,8 +49,8 @@ H5_DLL void * H5MM_xfree_const(const void *mem); H5_DLL void * H5MM_memcpy(void *dest, const void *src, size_t n); H5_DLL herr_t H5MM_get_alloc_stats(H5_alloc_stats_t *stats); #if defined H5_MEMORY_ALLOC_SANITY_CHECK -H5_DLL void H5MM_sanity_check_all(void); -H5_DLL void H5MM_final_sanity_check(void); +H5_DLL void H5MM_sanity_check_all(void); +H5_DLL void H5MM_final_sanity_check(void); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ #endif /* _H5MMprivate_H */ diff --git a/src/H5Ocache.c b/src/H5Ocache.c index a2ca561a0af..778e77e6dd0 100644 --- a/src/H5Ocache.c +++ b/src/H5Ocache.c @@ -995,10 +995,10 @@ H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -1284,7 +1284,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image unsigned chunkno; /* Current chunk's index */ #ifndef NDEBUG unsigned nullcnt; /* Count of null messages (for sanity checking gaps in chunks) */ -#endif /* NDEBUG */ +#endif /* NDEBUG */ hbool_t mesgs_modified = FALSE; /* Whether any messages were modified when the object header was deserialized */ herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5Odtype.c b/src/H5Odtype.c index c1effad749f..e2e23a9b64b 100644 --- a/src/H5Odtype.c +++ b/src/H5Odtype.c @@ -81,7 +81,7 @@ static herr_t H5O__dtype_debug(H5F_t *f, const void *_mesg, FILE *stream, int in if (H5T__upgrade_version((DT), (VERS)) < 0) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade " CLASS " encoding version") \ *(IOF) |= H5O_DECODEIO_DIRTY; \ - } /* end if */ + } /* end if */ #endif /* H5_STRICT_FORMAT_CHECKS */ /* This message derives from H5O message class */ diff --git a/src/H5Oint.c b/src/H5Oint.c index 066910f2c02..a49e71b9e83 100644 --- a/src/H5Oint.c +++ b/src/H5Oint.c @@ -102,25 +102,25 @@ const H5O_msg_class_t *const H5O_msg_class_g[] = { H5O_MSG_LAYOUT, /*0x0008 Data Layout */ #ifdef H5O_ENABLE_BOGUS H5O_MSG_BOGUS_VALID, /*0x0009 "Bogus valid" (for testing) */ -#else /* H5O_ENABLE_BOGUS */ +#else /* H5O_ENABLE_BOGUS */ NULL, /*0x0009 "Bogus valid" (for testing) */ -#endif /* H5O_ENABLE_BOGUS */ - H5O_MSG_GINFO, /*0x000A Group information */ - H5O_MSG_PLINE, /*0x000B Data storage -- filter pipeline */ - H5O_MSG_ATTR, /*0x000C Attribute */ - H5O_MSG_NAME, /*0x000D Object name */ - H5O_MSG_MTIME, /*0x000E Object modification date and time */ - H5O_MSG_SHMESG, /*0x000F File-wide shared message table */ - H5O_MSG_CONT, /*0x0010 Object header continuation */ - H5O_MSG_STAB, /*0x0011 Symbol table */ - H5O_MSG_MTIME_NEW, /*0x0012 New Object modification date and time */ - H5O_MSG_BTREEK, /*0x0013 Non-default v1 B-tree 'K' values */ - H5O_MSG_DRVINFO, /*0x0014 Driver info settings */ - H5O_MSG_AINFO, /*0x0015 Attribute information */ - H5O_MSG_REFCOUNT, /*0x0016 Object's ref. count */ - H5O_MSG_FSINFO, /*0x0017 Free-space manager info */ - H5O_MSG_MDCI, /*0x0018 Metadata cache image */ - H5O_MSG_UNKNOWN /*0x0019 Placeholder for unknown message */ +#endif /* H5O_ENABLE_BOGUS */ + H5O_MSG_GINFO, /*0x000A Group information */ + H5O_MSG_PLINE, /*0x000B Data storage -- filter pipeline */ + H5O_MSG_ATTR, /*0x000C Attribute */ + H5O_MSG_NAME, /*0x000D Object name */ + H5O_MSG_MTIME, /*0x000E Object modification date and time */ + H5O_MSG_SHMESG, /*0x000F File-wide shared message table */ + H5O_MSG_CONT, /*0x0010 Object header continuation */ + H5O_MSG_STAB, /*0x0011 Symbol table */ + H5O_MSG_MTIME_NEW, /*0x0012 New Object modification date and time */ + H5O_MSG_BTREEK, /*0x0013 Non-default v1 B-tree 'K' values */ + H5O_MSG_DRVINFO, /*0x0014 Driver info settings */ + H5O_MSG_AINFO, /*0x0015 Attribute information */ + H5O_MSG_REFCOUNT, /*0x0016 Object's ref. count */ + H5O_MSG_FSINFO, /*0x0017 Free-space manager info */ + H5O_MSG_MDCI, /*0x0018 Metadata cache image */ + H5O_MSG_UNKNOWN /*0x0019 Placeholder for unknown message */ }; /* Format version bounds for object header */ @@ -1075,7 +1075,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks) H5O_chunk_proxy_t *chk_proxy; /* Proxy for chunk, to bring it into memory */ #ifndef NDEBUG size_t chkcnt = oh->nchunks; /* Count of chunks (for sanity checking) */ -#endif /* NDEBUG */ +#endif /* NDEBUG */ /* Bring the chunk into the cache */ /* (which adds to the object header) */ @@ -1123,7 +1123,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks) (oh->nmesgs + udata.common.merged_null_msgs) != udata.v1_pfx_nmesgs) HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "corrupt object header - incorrect # of messages") #endif /* H5_STRICT_FORMAT_CHECKS */ - } /* end if */ + } /* end if */ #ifdef H5O_DEBUG H5O__assert(oh); diff --git a/src/H5Opkg.h b/src/H5Opkg.h index fac5269c9cf..eece6b07b75 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -277,10 +277,10 @@ struct H5O_t { /* (This is to simulate a bug in earlier * versions of the library) */ -#endif /* H5O_ENABLE_BAD_MESG_COUNT */ +#endif /* H5O_ENABLE_BAD_MESG_COUNT */ #ifndef NDEBUG size_t ndecode_dirtied; /* Number of messages dirtied by decoding */ -#endif /* NDEBUG */ +#endif /* NDEBUG */ /* Chunk management information (not stored) */ size_t rc; /* Reference count of [continuation] chunks using this structure */ diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index d2aed18ffc5..dd7f9c71fff 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -37,14 +37,14 @@ typedef struct H5O_fill_t H5O_fill_t; #include "H5Spublic.h" /* Dataspace functions */ /* Private headers needed by this file */ -#include "H5private.h" /* Generic Functions */ +#include "H5private.h" /* Generic Functions */ #include "H5ACprivate.h" /* Metadata cache */ -#include "H5Fprivate.h" /* File access */ +#include "H5Fprivate.h" /* File access */ #include "H5HGprivate.h" /* Global Heaps */ #include "H5SLprivate.h" /* Skip lists */ -#include "H5Tprivate.h" /* Datatype functions */ +#include "H5Tprivate.h" /* Datatype functions */ #include "H5VLprivate.h" /* Virtual Object Layer */ -#include "H5Zprivate.h" /* I/O pipeline filters */ +#include "H5Zprivate.h" /* I/O pipeline filters */ /* Forward references of package typedefs */ typedef struct H5O_msg_class_t H5O_msg_class_t; @@ -67,8 +67,8 @@ typedef struct H5O_mesg_t H5O_mesg_t; /* Object header macros */ #define H5O_MESG_MAX_SIZE 65536 /*max obj header message size */ -#define H5O_ALL (-1) /* Operate on all messages of type */ -#define H5O_FIRST (-2) /* Operate on first message of type */ +#define H5O_ALL (-1) /* Operate on all messages of type */ +#define H5O_FIRST (-2) /* Operate on first message of type */ /* Flags needed when encoding messages */ #define H5O_MSG_NO_FLAGS_SET 0x00u @@ -96,10 +96,10 @@ typedef struct H5O_mesg_t H5O_mesg_t; /* #define H5O_ENABLE_BOGUS */ /* ========= Object Creation properties ============ */ -#define H5O_CRT_ATTR_MAX_COMPACT_NAME "max compact attr" /* Max. # of attributes to store compactly */ -#define H5O_CRT_ATTR_MIN_DENSE_NAME "min dense attr" /* Min. # of attributes to store densely */ +#define H5O_CRT_ATTR_MAX_COMPACT_NAME "max compact attr" /* Max. # of attributes to store compactly */ +#define H5O_CRT_ATTR_MIN_DENSE_NAME "min dense attr" /* Min. # of attributes to store densely */ #define H5O_CRT_OHDR_FLAGS_NAME "object header flags" /* Object header flags */ -#define H5O_CRT_PIPELINE_NAME "pline" /* Filter pipeline */ +#define H5O_CRT_PIPELINE_NAME "pline" /* Filter pipeline */ #define H5O_CRT_PIPELINE_DEF \ { \ {0, NULL, H5O_NULL_ID, {{0, HADDR_UNDEF}}}, H5O_PLINE_VERSION_1, 0, 0, NULL \ @@ -376,7 +376,7 @@ typedef struct H5O_link_t { * External File List Message * (Data structure in memory) */ -#define H5O_EFL_ALLOC 16 /*number of slots to alloc at once */ +#define H5O_EFL_ALLOC 16 /*number of slots to alloc at once */ #define H5O_EFL_UNLIMITED H5F_UNLIMITED /*max possible file size */ typedef struct H5O_efl_entry_t { diff --git a/src/H5Oshared.h b/src/H5Oshared.h index a8f76aa6ae0..aafa0692242 100644 --- a/src/H5Oshared.h +++ b/src/H5Oshared.h @@ -72,10 +72,10 @@ H5O_SHARED_DECODE(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *iofla #ifdef H5_STRICT_FORMAT_CHECKS if (*ioflags & H5O_DECODEIO_DIRTY) HGOTO_ERROR(H5E_OHDR, H5E_UNSUPPORTED, NULL, "unable to mark shared message dirty") -#else /* H5_STRICT_FORMAT_CHECKS */ +#else /* H5_STRICT_FORMAT_CHECKS */ *ioflags &= ~H5O_DECODEIO_DIRTY; #endif /* H5_STRICT_FORMAT_CHECKS */ - } /* end if */ + } /* end if */ else { /* Decode native message directly */ if (NULL == (ret_value = H5O_SHARED_DECODE_REAL(f, open_oh, mesg_flags, ioflags, p_size, p))) @@ -237,7 +237,7 @@ H5O_SHARED_DELETE(H5F_t *f, H5O_t *open_oh, void *_mesg) /* Decrement the reference count on the native message directly */ if (H5O_SHARED_DELETE_REAL(f, open_oh, _mesg) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement ref count for native message") - } /* end else */ + } /* end else */ #endif /* H5O_SHARED_DELETE_REAL */ done: @@ -288,7 +288,7 @@ H5O_SHARED_LINK(H5F_t *f, H5O_t *open_oh, void *_mesg) /* Increment the reference count on the native message directly */ if (H5O_SHARED_LINK_REAL(f, open_oh, _mesg) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "unable to increment ref count for native message") - } /* end else */ + } /* end else */ #endif /* H5O_SHARED_LINK_REAL */ done: @@ -333,7 +333,7 @@ H5O_SHARED_COPY_FILE(H5F_t *file_src, void *_native_src, H5F_t *file_dst, hbool_ if (NULL == (dst_mesg = H5O_SHARED_COPY_FILE_REAL(file_src, H5O_SHARED_TYPE, _native_src, file_dst, recompute_size, cpy_info, udata))) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy native message to another file") -#else /* H5O_SHARED_COPY_FILE_REAL */ +#else /* H5O_SHARED_COPY_FILE_REAL */ /* No copy file callback defined, just copy the message itself */ if (NULL == (dst_mesg = (H5O_SHARED_TYPE->copy)(_native_src, NULL))) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy native message") diff --git a/src/H5PLpath.c b/src/H5PLpath.c index ff4dc0e7f71..3879dc6b6cb 100644 --- a/src/H5PLpath.c +++ b/src/H5PLpath.c @@ -693,7 +693,7 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo FUNC_LEAVE_NOAPI(ret_value) } /* end H5PL__find_plugin_in_path() */ -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ static herr_t H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *found, const char *dir, const void **plugin_info) diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 418d5e3112b..8c525e50852 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -313,7 +313,7 @@ static const H5O_layout_t H5D_def_layout_compact_g = H5D_DEF_LAYOUT_COMPACT; static const H5O_layout_t H5D_def_layout_contig_g = H5D_DEF_LAYOUT_CONTIG; static const H5O_layout_t H5D_def_layout_chunk_g = H5D_DEF_LAYOUT_CHUNK; static const H5O_layout_t H5D_def_layout_virtual_g = H5D_DEF_LAYOUT_VIRTUAL; -#else /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ +#else /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ static H5O_layout_t H5D_def_layout_compact_g = H5D_DEF_LAYOUT_COMPACT; static H5O_layout_t H5D_def_layout_contig_g = H5D_DEF_LAYOUT_CONTIG; static H5O_layout_t H5D_def_layout_chunk_g = H5D_DEF_LAYOUT_CHUNK; diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 09ff894cae2..ac6b988f030 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -493,7 +493,7 @@ static const hbool_t H5F_def_coll_md_write_flag_g = H5F_ACS_COLL_MD_WRITE_FLAG_DEF; /* Default setting for the collective metedata write flag */ static const MPI_Comm H5F_def_mpi_params_comm_g = H5F_ACS_MPI_PARAMS_COMM_DEF; /* Default MPI communicator */ static const MPI_Info H5F_def_mpi_params_info_g = H5F_ACS_MPI_PARAMS_INFO_DEF; /* Default MPI info struct */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ static const H5AC_cache_image_config_t H5F_def_mdc_initCacheImageCfg_g = H5F_ACS_META_CACHE_INIT_IMAGE_CONFIG_DEF; /* Default metadata cache image settings */ static const size_t H5F_def_page_buf_size_g = H5F_ACS_PAGE_BUFFER_SIZE_DEF; /* Default page buffer size */ diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h index 6dab94a1044..166f1f2e0e0 100644 --- a/src/H5Ppkg.h +++ b/src/H5Ppkg.h @@ -87,7 +87,7 @@ struct H5P_genclass_t { H5P_plist_type_t type; /* Type of property */ size_t nprops; /* Number of properties in class */ unsigned - plists; /* Number of property lists that have been created since the last modification to the class */ + plists; /* Number of property lists that have been created since the last modification to the class */ unsigned classes; /* Number of classes that have been derived since the last modification to the class */ unsigned ref_count; /* Number of outstanding ID's open on this class object */ hbool_t deleted; /* Whether this class has been deleted and is waiting for dependent classes & proplists diff --git a/src/H5SM.c b/src/H5SM.c index 31f0e103555..413d502d45b 100644 --- a/src/H5SM.c +++ b/src/H5SM.c @@ -1092,7 +1092,7 @@ H5SM_try_share(H5F_t *f, H5O_t *open_oh, unsigned defer_flags, unsigned type_id, if (defer_flags & H5SM_WAS_DEFERRED) #ifndef NDEBUG deferred_type = ((H5O_shared_t *)mesg)->type; -#else /* NDEBUG */ +#else /* NDEBUG */ if ((((H5O_shared_t *)mesg)->type != H5O_SHARE_TYPE_HERE) && (((H5O_shared_t *)mesg)->type != H5O_SHARE_TYPE_SOHM)) HGOTO_DONE(FALSE); @@ -1411,7 +1411,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t if (defer) HDmemset(&shared.u, 0, sizeof(shared.u)); #endif /* H5_USING_MEMCHECKER */ - } /* end if */ + } /* end if */ else { htri_t share_in_ohdr; /* Whether the new message can be shared in another object's header */ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 90d7d4fd3c0..c527cd56156 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -2125,7 +2125,7 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max /* Decrement number of blocks */ fast_dim_count--; } /* end while */ -#else /* NO_DUFFS_DEVICE */ +#else /* NO_DUFFS_DEVICE */ { size_t duffs_index; /* Counting index for Duff's device */ @@ -2168,7 +2168,7 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max } while (--duffs_index > 0); } /* end switch */ } -#endif /* NO_DUFFS_DEVICE */ +#endif /* NO_DUFFS_DEVICE */ #undef DUFF_GUTS /* Increment offset in destination buffer */ @@ -11748,7 +11748,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, for (u = 0; u < H5S_MAX_RANK; u++) HDassert(!udata.ps_span_info[u]); - } /* end block */ + } /* end block */ #endif /* NDEBUG */ FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Spkg.h b/src/H5Spkg.h index 3bca293a8fb..66929f99ade 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -286,7 +286,7 @@ typedef struct { H5S_sel_release_func_t release; /* Method to release current selection */ H5S_sel_is_valid_func_t is_valid; /* Method to determine if current selection is valid for dataspace */ H5S_sel_serial_size_func_t - serial_size; /* Method to determine number of bytes required to store current selection */ + serial_size; /* Method to determine number of bytes required to store current selection */ H5S_sel_serialize_func_t serialize; /* Method to store current selection in "serialized" form (a byte sequence suitable for storing on disk) */ H5S_sel_deserialize_func_t deserialize; /* Method to store create selection from "serialized" form (a byte @@ -294,7 +294,7 @@ typedef struct { H5S_sel_bounds_func_t bounds; /* Method to determine to smallest n-D bounding box containing the current selection */ H5S_sel_offset_func_t - offset; /* Method to determine linear offset of initial element in selection within dataspace */ + offset; /* Method to determine linear offset of initial element in selection within dataspace */ H5S_sel_unlim_dim_func_t unlim_dim; /* Method to get unlimited dimension of selection (or -1 for none) */ H5S_sel_num_elem_non_unlim_func_t num_elem_non_unlim; /* Method to get the number of elements in a slice through the unlimited dimension */ @@ -304,9 +304,9 @@ typedef struct { H5S_sel_shape_same_func_t shape_same; /* Method to determine if two dataspaces' selections are the same shape */ H5S_sel_intersect_block_func_t - intersect_block; /* Method to determine if a dataspaces' selection intersects a block */ - H5S_sel_adjust_u_func_t adjust_u; /* Method to adjust a selection by an offset */ - H5S_sel_adjust_s_func_t adjust_s; /* Method to adjust a selection by an offset (signed) */ + intersect_block; /* Method to determine if a dataspaces' selection intersects a block */ + H5S_sel_adjust_u_func_t adjust_u; /* Method to adjust a selection by an offset */ + H5S_sel_adjust_s_func_t adjust_s; /* Method to adjust a selection by an offset (signed) */ H5S_sel_project_scalar project_scalar; /* Method to construct scalar dataspace projection */ H5S_sel_project_simple project_simple; /* Method to construct simple dataspace projection */ H5S_sel_iter_init_func_t iter_init; /* Method to initialize iterator for current selection */ @@ -370,7 +370,7 @@ typedef struct H5S_sel_iter_class_t { H5S_sel_iter_next_block_func_t iter_next_block; /* Method to move selection iterator to the next block in the selection */ H5S_sel_iter_get_seq_list_func_t - iter_get_seq_list; /* Method to retrieve a list of offset/length sequences for selection iterator */ + iter_get_seq_list; /* Method to retrieve a list of offset/length sequences for selection iterator */ H5S_sel_iter_release_func_t iter_release; /* Method to release iterator for current selection */ } H5S_sel_iter_class_t; diff --git a/src/H5T.c b/src/H5T.c index 6f9fa13d4e3..295ec55aa4a 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -3435,7 +3435,7 @@ H5T__initiate_copy(const H5T_t *old_dt) (void)H5VL_object_inc_rc(new_dt->shared->owned_vol_obj); /* Reset vol_obj field */ - new_dt->vol_obj = NULL; + new_dt->vol_obj = NULL; /* Set return value */ ret_value = new_dt; diff --git a/src/H5TS.c b/src/H5TS.c index 6e3f0dfc12d..daa5813f858 100644 --- a/src/H5TS.c +++ b/src/H5TS.c @@ -65,7 +65,7 @@ static void H5TS__key_destructor(void *key_val); /* Global variable definitions */ #ifdef H5_HAVE_WIN_THREADS H5TS_once_t H5TS_first_init_g; -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ H5TS_once_t H5TS_first_init_g = PTHREAD_ONCE_INIT; #endif /* H5_HAVE_WIN_THREADS */ @@ -73,8 +73,8 @@ H5TS_once_t H5TS_first_init_g = PTHREAD_ONCE_INIT; H5TS_key_t H5TS_errstk_key_g; /* Error stack */ #ifdef H5_HAVE_CODESTACK H5TS_key_t H5TS_funcstk_key_g; /* Function stack */ -#endif /* H5_HAVE_CODESTACK */ -H5TS_key_t H5TS_apictx_key_g; /* API context */ +#endif /* H5_HAVE_CODESTACK */ +H5TS_key_t H5TS_apictx_key_g; /* API context */ /*******************/ /* Local Variables */ @@ -340,7 +340,7 @@ H5TS_mutex_lock(H5TS_mutex_t *mutex) #ifdef H5_HAVE_WIN_THREADS EnterCriticalSection(&mutex->CriticalSection); -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ /* Acquire the library lock */ ret_value = pthread_mutex_lock(&mutex->atomic_lock); if (ret_value) @@ -395,7 +395,7 @@ H5TS_mutex_unlock(H5TS_mutex_t *mutex) #ifdef H5_HAVE_WIN_THREADS /* Releases ownership of the specified critical section object. */ LeaveCriticalSection(&mutex->CriticalSection); -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ /* Decrement the lock count for this thread */ ret_value = pthread_mutex_lock(&mutex->atomic_lock); @@ -453,7 +453,7 @@ H5TS_cancel_count_inc(void) #ifdef H5_HAVE_WIN_THREADS /* unsupported */ -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ /* Acquire the thread's cancellation counter */ cancel_counter = (H5TS_cancel_t *)H5TS_get_thread_local_value(H5TS_cancel_key_s); @@ -526,7 +526,7 @@ H5TS_cancel_count_dec(void) #ifdef H5_HAVE_WIN_THREADS /* unsupported */ -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ /* Acquire the thread's cancellation counter */ cancel_counter = (H5TS_cancel_t *)H5TS_get_thread_local_value(H5TS_cancel_key_s); diff --git a/src/H5TSprivate.h b/src/H5TSprivate.h index dc851453a20..431e12e7371 100644 --- a/src/H5TSprivate.h +++ b/src/H5TSprivate.h @@ -117,8 +117,8 @@ extern H5TS_once_t H5TS_first_init_g; /* Library initialization */ extern H5TS_key_t H5TS_errstk_key_g; /* Error stacks */ #ifdef H5_HAVE_CODESTACK extern H5TS_key_t H5TS_funcstk_key_g; /* Function stacks */ -#endif /* H5_HAVE_CODESTACK */ -extern H5TS_key_t H5TS_apictx_key_g; /* API contexts */ +#endif /* H5_HAVE_CODESTACK */ +extern H5TS_key_t H5TS_apictx_key_g; /* API contexts */ /* Library-scope routines */ /* (Only used within H5private.h macros) */ diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index e9991d82780..8942b4f5e9d 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -339,7 +339,7 @@ typedef struct H5T_shared_t { size_t size; /*total size of an instance of this type */ unsigned version; /* Version of object header message to encode this object with */ hbool_t - force_conv; /* Set if this type always needs to be converted and H5T__conv_noop cannot be called */ + force_conv; /* Set if this type always needs to be converted and H5T__conv_noop cannot be called */ struct H5T_t * parent; /*parent type for derived datatypes */ H5VL_object_t *owned_vol_obj; /* Vol object owned by this type (free on close) */ union { diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h index e99895afc77..88a4fb4b50a 100644 --- a/src/H5Tprivate.h +++ b/src/H5Tprivate.h @@ -27,9 +27,9 @@ typedef struct H5T_t H5T_t; #include "H5MMpublic.h" /* Memory management */ /* Private headers needed by this file */ -#include "H5private.h" /* Generic Functions */ -#include "H5Gprivate.h" /* Groups */ -#include "H5Rprivate.h" /* References */ +#include "H5private.h" /* Generic Functions */ +#include "H5Gprivate.h" /* Groups */ +#include "H5Rprivate.h" /* References */ #include "H5VLprivate.h" /* VOL Drivers */ /* Macro for size of temporary buffers to contain a single element */ diff --git a/src/H5Tref.c b/src/H5Tref.c index 9c6477b5b41..d87401e7630 100644 --- a/src/H5Tref.c +++ b/src/H5Tref.c @@ -182,7 +182,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) /* Release owned file */ if (dt->shared->owned_vol_obj) { - if(H5VL_free_object(dt->shared->owned_vol_obj) < 0) + if (H5VL_free_object(dt->shared->owned_vol_obj) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCLOSEOBJ, FAIL, "unable to close owned VOL object") dt->shared->owned_vol_obj = NULL; } /* end if */ diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c index 4564e0a0f51..325b02e2cd3 100644 --- a/src/H5Tvlen.c +++ b/src/H5Tvlen.c @@ -284,7 +284,7 @@ H5T__vlen_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) /* Release owned file */ if (dt->shared->owned_vol_obj) { - if(H5VL_free_object(dt->shared->owned_vol_obj) < 0) + if (H5VL_free_object(dt->shared->owned_vol_obj) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close owned VOL object") dt->shared->owned_vol_obj = NULL; } /* end if */ @@ -637,7 +637,7 @@ H5T__vlen_mem_str_getptr(void *_vl) #ifdef H5_NO_ALIGNMENT_RESTRICTIONS char *s = *(char **)_vl; /* Pointer to the user's string information */ #else - char *s = NULL; /* Pointer to the user's string information */ + char * s = NULL; /* Pointer to the user's string information */ #endif FUNC_ENTER_STATIC_NOERR @@ -728,7 +728,7 @@ H5T__vlen_mem_str_read(H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, void *buf, #ifdef H5_NO_ALIGNMENT_RESTRICTIONS char *s = *(char **)_vl; /* Pointer to the user's string information */ #else - char *s; /* Pointer to the user's string information */ + char *s; /* Pointer to the user's string information */ #endif FUNC_ENTER_STATIC_NOERR diff --git a/src/H5VL.c b/src/H5VL.c index f90572ebfe7..98d660be17f 100644 --- a/src/H5VL.c +++ b/src/H5VL.c @@ -705,7 +705,8 @@ H5VLget_file_type(void *file_obj, hid_t connector_id, hid_t dtype_id) /* Create VOL object for file if necessary (force_conv will be TRUE if and * only if file needs to be passed to H5T_set_loc) */ - if (H5T_GET_FORCE_CONV(dtype) && (NULL == (file_vol_obj = H5VL_create_object_using_vol_id(H5I_FILE, file_obj, connector_id)))) + if (H5T_GET_FORCE_CONV(dtype) && + (NULL == (file_vol_obj = H5VL_create_object_using_vol_id(H5I_FILE, file_obj, connector_id)))) HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "can't create VOL object") /* Copy the datatype */ diff --git a/src/H5VLint.c b/src/H5VLint.c index 5c6bba06369..5d9169d882e 100644 --- a/src/H5VLint.c +++ b/src/H5VLint.c @@ -1020,7 +1020,7 @@ H5VL_free_object(H5VL_object_t *vol_obj) /* Check arguments */ HDassert(vol_obj); - if(--vol_obj->rc == 0) { + if (--vol_obj->rc == 0) { /* Decrement refcount on connector */ if (H5VL__conn_dec_rc(vol_obj->connector) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to decrement ref count on VOL connector") diff --git a/src/H5VLprivate.h b/src/H5VLprivate.h index afcb2259071..df860caef18 100644 --- a/src/H5VLprivate.h +++ b/src/H5VLprivate.h @@ -37,7 +37,7 @@ typedef struct H5VL_t { typedef struct H5VL_object_t { void * data; /* Pointer to connector-managed data for this object */ H5VL_t *connector; /* Pointer to VOL connector struct */ - size_t rc; /* Reference count */ + size_t rc; /* Reference count */ } H5VL_object_t; /* Internal structure to hold the connector ID & info for FAPLs */ diff --git a/src/H5VLpublic.h b/src/H5VLpublic.h index 6e35746ee1b..02ba0fb58d7 100644 --- a/src/H5VLpublic.h +++ b/src/H5VLpublic.h @@ -342,8 +342,8 @@ H5_DLL herr_t H5VLquery_optional(hid_t obj_id, H5VL_subclass_t subcls, int opt_t #endif /* Semi-public headers mainly for VOL connector authors */ -#include "H5VLconnector.h" /* VOL connector author routines */ +#include "H5VLconnector.h" /* VOL connector author routines */ #include "H5VLconnector_passthru.h" /* Pass-through VOL connector author routines */ -#include "H5VLnative.h" /* Native VOL connector macros, for VOL connector authors */ +#include "H5VLnative.h" /* Native VOL connector macros, for VOL connector authors */ #endif /* _H5VLpublic_H */ diff --git a/src/H5VM.c b/src/H5VM.c index 72ec04559d6..14737d2e0f7 100644 --- a/src/H5VM.c +++ b/src/H5VM.c @@ -486,7 +486,7 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, const hsize_t *dst_size, const #ifdef NO_INLINED_CODE dst_start = H5VM_hyper_stride(n, size, dst_size, dst_offset, dst_stride); src_start = H5VM_hyper_stride(n, size, src_size, src_offset, src_stride); -#else /* NO_INLINED_CODE */ +#else /* NO_INLINED_CODE */ /* in-line version of two calls to H5VM_hyper_stride() */ { hsize_t dst_acc; /*accumulator */ diff --git a/src/H5Z.c b/src/H5Z.c index 7f7a450276d..5814c9df65c 100644 --- a/src/H5Z.c +++ b/src/H5Z.c @@ -47,7 +47,7 @@ typedef struct H5Z_object_t { #ifdef H5_HAVE_PARALLEL hbool_t sanity_checked; /* Whether the sanity check for collectively calling H5Zunregister has been done */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ } H5Z_object_t; /* Enumerated type for dataset creation prelude callbacks */ @@ -181,7 +181,7 @@ H5Z_term_package(void) } /* end for */ } /* end for */ } /* end if */ -#endif /* H5Z_DEBUG */ +#endif /* H5Z_DEBUG */ /* Free the table of filters */ if (H5Z_table_g) { @@ -255,11 +255,11 @@ H5Zregister(const void *cls) /* Set cls_real to point to the translated structure */ cls_real = &cls_new; -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ /* Deprecated symbols not allowed, throw an error */ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid H5Z_class_t version number"); #endif /* H5_NO_DEPRECATED_SYMBOLS */ - } /* end if */ + } /* end if */ if (cls_real->id < 0 || cls_real->id > H5Z_FILTER_MAX) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number") @@ -327,7 +327,7 @@ H5Z_register(const H5Z_class2_t *cls) #ifdef H5Z_DEBUG HDmemset(H5Z_stat_table_g + i, 0, sizeof(H5Z_stats_t)); #endif /* H5Z_DEBUG */ - } /* end if */ + } /* end if */ /* Filter already registered */ else { /* Replace old contents */ @@ -587,7 +587,7 @@ H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void H5_ATTR_PARA H5F_t *f = (H5F_t *)obj_ptr; /* File object for operations */ #ifdef H5_HAVE_PARALLEL H5Z_object_t *object = (H5Z_object_t *)key; -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ int ret_value = FALSE; /* Return value */ FUNC_ENTER_STATIC @@ -632,7 +632,7 @@ H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void H5_ATTR_PARA if (H5P_USER_TRUE == coll_md_read) H5CX_set_coll_metadata_read(TRUE); } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ /* Call the flush routine for mounted file hierarchies */ if (H5F_flush_mounts((H5F_t *)obj_ptr) < 0) diff --git a/src/H5Znbit.c b/src/H5Znbit.c index ca5f74a6149..d85ebfe5a37 100644 --- a/src/H5Znbit.c +++ b/src/H5Znbit.c @@ -95,13 +95,13 @@ H5Z_class2_t H5Z_NBIT[1] = {{ }}; /* Local macros */ -#define H5Z_NBIT_ATOMIC 1 /* Atomic datatype class: integer/floating-point */ -#define H5Z_NBIT_ARRAY 2 /* Array datatype class */ -#define H5Z_NBIT_COMPOUND 3 /* Compound datatype class */ -#define H5Z_NBIT_NOOPTYPE 4 /* Other datatype class: nbit does no compression */ +#define H5Z_NBIT_ATOMIC 1 /* Atomic datatype class: integer/floating-point */ +#define H5Z_NBIT_ARRAY 2 /* Array datatype class */ +#define H5Z_NBIT_COMPOUND 3 /* Compound datatype class */ +#define H5Z_NBIT_NOOPTYPE 4 /* Other datatype class: nbit does no compression */ #define H5Z_NBIT_MAX_NPARMS 4096 /* Max number of parameters for filter */ -#define H5Z_NBIT_ORDER_LE 0 /* Little endian for datatype byte order */ -#define H5Z_NBIT_ORDER_BE 1 /* Big endian for datatype byte order */ +#define H5Z_NBIT_ORDER_LE 0 /* Little endian for datatype byte order */ +#define H5Z_NBIT_ORDER_BE 1 /* Big endian for datatype byte order */ /* Local variables */ diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c index d4a72a4ed18..96360eb7be5 100644 --- a/src/H5Zscaleoffset.c +++ b/src/H5Zscaleoffset.c @@ -103,14 +103,14 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ /* Local macros */ #define H5Z_SCALEOFFSET_TOTAL_NPARMS 20 /* Total number of parameters for filter */ -#define H5Z_SCALEOFFSET_PARM_SCALETYPE 0 /* "User" parameter for scale type */ -#define H5Z_SCALEOFFSET_PARM_SCALEFACTOR 1 /* "User" parameter for scale factor */ -#define H5Z_SCALEOFFSET_PARM_NELMTS 2 /* "Local" parameter for number of elements in the chunk */ -#define H5Z_SCALEOFFSET_PARM_CLASS 3 /* "Local" parameter for datatype class */ -#define H5Z_SCALEOFFSET_PARM_SIZE 4 /* "Local" parameter for datatype size */ -#define H5Z_SCALEOFFSET_PARM_SIGN 5 /* "Local" parameter for integer datatype sign */ -#define H5Z_SCALEOFFSET_PARM_ORDER 6 /* "Local" parameter for datatype byte order */ -#define H5Z_SCALEOFFSET_PARM_FILAVAIL 7 /* "Local" parameter for dataset fill value existence */ +#define H5Z_SCALEOFFSET_PARM_SCALETYPE 0 /* "User" parameter for scale type */ +#define H5Z_SCALEOFFSET_PARM_SCALEFACTOR 1 /* "User" parameter for scale factor */ +#define H5Z_SCALEOFFSET_PARM_NELMTS 2 /* "Local" parameter for number of elements in the chunk */ +#define H5Z_SCALEOFFSET_PARM_CLASS 3 /* "Local" parameter for datatype class */ +#define H5Z_SCALEOFFSET_PARM_SIZE 4 /* "Local" parameter for datatype size */ +#define H5Z_SCALEOFFSET_PARM_SIGN 5 /* "Local" parameter for integer datatype sign */ +#define H5Z_SCALEOFFSET_PARM_ORDER 6 /* "Local" parameter for datatype byte order */ +#define H5Z_SCALEOFFSET_PARM_FILAVAIL 7 /* "Local" parameter for dataset fill value existence */ #define H5Z_SCALEOFFSET_PARM_FILVAL 8 /* "Local" parameter for start location to store dataset fill value */ #define H5Z_SCALEOFFSET_CLS_INTEGER 0 /* Integer (datatype class) */ @@ -1232,7 +1232,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu */ minval_size = sizeof(unsigned long long) <= ((unsigned char *)*buf)[4] ? sizeof(unsigned long long) : ((unsigned char *)*buf)[4]; - minval = 0; + minval = 0; for (i = 0; i < minval_size; i++) { minval_mask = ((unsigned char *)*buf)[5 + i]; minval_mask <<= i * 8; diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c index dcd06a7e0a2..2e3ff97595c 100644 --- a/src/H5Zshuffle.c +++ b/src/H5Zshuffle.c @@ -122,8 +122,8 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] size_t numofelements; /* Number of elements in buffer */ size_t i; /* Local index variables */ #ifdef NO_DUFFS_DEVICE - size_t j; /* Local index variable */ -#endif /* NO_DUFFS_DEVICE */ + size_t j; /* Local index variable */ +#endif /* NO_DUFFS_DEVICE */ size_t leftover; /* Extra bytes at end of buffer */ size_t ret_value = 0; /* Return value */ @@ -165,7 +165,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] j--; } /* end for */ -#else /* NO_DUFFS_DEVICE */ +#else /* NO_DUFFS_DEVICE */ { size_t duffs_index; /* Counting index for Duff's device */ @@ -208,7 +208,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] } while (--duffs_index > 0); } /* end switch */ } -#endif /* NO_DUFFS_DEVICE */ +#endif /* NO_DUFFS_DEVICE */ #undef DUFF_GUTS } /* end for */ @@ -236,7 +236,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] j--; } /* end for */ -#else /* NO_DUFFS_DEVICE */ +#else /* NO_DUFFS_DEVICE */ { size_t duffs_index; /* Counting index for Duff's device */ @@ -279,7 +279,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] } while (--duffs_index > 0); } /* end switch */ } -#endif /* NO_DUFFS_DEVICE */ +#endif /* NO_DUFFS_DEVICE */ #undef DUFF_GUTS } /* end for */ diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c index cda518d02a3..e6d8d3ff91f 100644 --- a/src/H5Ztrans.c +++ b/src/H5Ztrans.c @@ -1033,7 +1033,7 @@ H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void *array, size_t array_size #if CHAR_MIN >= 0 else if (array_type == H5T_NATIVE_SCHAR) H5Z_XFORM_DO_OP5(signed char, array_size) -#else /* CHAR_MIN >= 0 */ +#else /* CHAR_MIN >= 0 */ else if (array_type == H5T_NATIVE_UCHAR) H5Z_XFORM_DO_OP5(unsigned char, array_size) #endif /* CHAR_MIN >= 0 */ diff --git a/src/H5detect.c b/src/H5detect.c index e383d9b273e..973cd97caa4 100644 --- a/src/H5detect.c +++ b/src/H5detect.c @@ -1140,7 +1140,7 @@ print_header(void) #ifdef H5_HAVE_GETPWUID struct passwd *pwd = NULL; #else - int pwd = 1; + int pwd = 1; #endif static const char *month_name[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; diff --git a/src/H5make_libsettings.c b/src/H5make_libsettings.c index 2afa531c693..617d1f5da1b 100644 --- a/src/H5make_libsettings.c +++ b/src/H5make_libsettings.c @@ -144,7 +144,7 @@ print_header(void) #ifdef H5_HAVE_GETPWUID struct passwd *pwd = NULL; #else - int pwd = 1; + int pwd = 1; #endif static const char *month_name[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; diff --git a/src/H5private.h b/src/H5private.h index 38742ed3563..600089da3fe 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -480,11 +480,11 @@ typedef unsigned char uint8_t; #if H5_SIZEOF_INT16_T >= 2 #elif H5_SIZEOF_SHORT >= 2 -typedef short int16_t; +typedef short int16_t; #undef H5_SIZEOF_INT16_T #define H5_SIZEOF_INT16_T H5_SIZEOF_SHORT #elif H5_SIZEOF_INT >= 2 -typedef int int16_t; +typedef int int16_t; #undef H5_SIZEOF_INT16_T #define H5_SIZEOF_INT16_T H5_SIZEOF_INT #else @@ -506,11 +506,11 @@ typedef unsigned uint16_t; #if H5_SIZEOF_INT32_T >= 4 #elif H5_SIZEOF_SHORT >= 4 -typedef short int32_t; +typedef short int32_t; #undef H5_SIZEOF_INT32_T #define H5_SIZEOF_INT32_T H5_SIZEOF_SHORT #elif H5_SIZEOF_INT >= 4 -typedef int int32_t; +typedef int int32_t; #undef H5_SIZEOF_INT32_T #define H5_SIZEOF_INT32_T H5_SIZEOF_INT #elif H5_SIZEOF_LONG >= 4 @@ -682,7 +682,7 @@ typedef struct { #endif /* HDabs */ #ifndef HDaccept #define HDaccept(A, B, C) accept((A), (B), (C)) /* mirror VFD */ -#endif /* HDaccept */ +#endif /* HDaccept */ #ifndef HDaccess #define HDaccess(F, M) access(F, M) #endif /* HDaccess */ @@ -709,7 +709,7 @@ typedef struct { #endif /* HDasin */ #ifndef HDasprintf #define HDasprintf asprintf /*varargs*/ -#endif /* HDasprintf */ +#endif /* HDasprintf */ #ifndef HDassert #define HDassert(X) assert(X) #endif /* HDassert */ @@ -736,7 +736,7 @@ typedef struct { #endif /* HDatol */ #ifndef HDbind #define HDbind(A, B, C) bind((A), (B), (C)) /* mirror VFD */ -#endif /* HDbind */ +#endif /* HDbind */ #ifndef HDbsearch #define HDbsearch(K, B, N, Z, F) bsearch(K, B, N, Z, F) #endif /* HDbsearch */ @@ -784,7 +784,7 @@ typedef struct { #endif /* HDclosedir */ #ifndef HDconnect #define HDconnect(A, B, C) connect((A), (B), (C)) /* mirror VFD */ -#endif /* HDconnect */ +#endif /* HDconnect */ #ifndef HDcos #define HDcos(X) cos(X) #endif /* HDcos */ @@ -1033,7 +1033,7 @@ typedef off_t h5_stat_size_t; #endif /* HDgetgroups */ #ifndef HDgethostbyaddr #define HDgethostbyaddr(A, B, C) gethostbyaddr((A), (B), (C)) /* mirror VFD */ -#endif /* HDgethostbyaddr */ +#endif /* HDgethostbyaddr */ #ifndef HDgethostname #define HDgethostname(N, L) gethostname(N, L) #endif /* HDgethostname */ @@ -1075,55 +1075,55 @@ typedef off_t h5_stat_size_t; #endif /* HDgmtime */ #ifndef HDhtonl #define HDhtonl(X) htonl((X)) /* mirror VFD */ -#endif /* HDhtonl */ +#endif /* HDhtonl */ #ifndef HDhtons #define HDhtons(X) htons((X)) /* mirror VFD */ -#endif /* HDhtons */ +#endif /* HDhtons */ #ifndef HDinet_addr #define HDinet_addr(C) inet_addr((C)) /* mirror VFD */ -#endif /* HDinet_addr */ +#endif /* HDinet_addr */ #ifndef HDinet_ntoa #define HDinet_ntoa(C) inet_ntoa((C)) /* mirror VFD */ -#endif /* HDinet_ntoa */ +#endif /* HDinet_ntoa */ #ifndef HDisalnum #define HDisalnum(C) isalnum((int)(C)) /*cast for solaris warning*/ -#endif /* HDisalnum */ +#endif /* HDisalnum */ #ifndef HDisalpha #define HDisalpha(C) isalpha((int)(C)) /*cast for solaris warning*/ -#endif /* HDisalpha */ +#endif /* HDisalpha */ #ifndef HDisatty #define HDisatty(F) isatty(F) #endif /* HDisatty */ #ifndef HDiscntrl #define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/ -#endif /* HDiscntrl */ +#endif /* HDiscntrl */ #ifndef HDisdigit #define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/ -#endif /* HDisdigit */ +#endif /* HDisdigit */ #ifndef HDisgraph #define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/ -#endif /* HDisgraph */ +#endif /* HDisgraph */ #ifndef HDislower #define HDislower(C) islower((int)(C)) /*cast for solaris warning*/ -#endif /* HDislower */ +#endif /* HDislower */ #ifndef HDisnan #define HDisnan(X) isnan(X) #endif /* HDisnan */ #ifndef HDisprint #define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/ -#endif /* HDisprint */ +#endif /* HDisprint */ #ifndef HDispunct #define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/ -#endif /* HDispunct */ +#endif /* HDispunct */ #ifndef HDisspace #define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/ -#endif /* HDisspace */ +#endif /* HDisspace */ #ifndef HDisupper #define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/ -#endif /* HDisupper */ +#endif /* HDisupper */ #ifndef HDisxdigit #define HDisxdigit(C) isxdigit((int)(C)) /*cast for solaris warning*/ -#endif /* HDisxdigit */ +#endif /* HDisxdigit */ #ifndef HDkill #define HDkill(P, S) kill(P, S) #endif /* HDkill */ @@ -1141,7 +1141,7 @@ typedef off_t h5_stat_size_t; #endif /* HDlink */ #ifndef HDlisten #define HDlisten(A, B) listen((A), (B)) /* mirror VFD */ -#endif /* HDlisten */ +#endif /* HDlisten */ #ifndef HDllround #define HDllround(V) llround(V) #endif /* HDround */ @@ -1225,10 +1225,10 @@ typedef off_t h5_stat_size_t; #endif /* HDnanosleep */ #ifndef HDntohl #define HDntohl(A) ntohl((A)) /* mirror VFD */ -#endif /* HDntohl */ +#endif /* HDntohl */ #ifndef HDntohs #define HDntohs(A) ntohs((A)) /* mirror VFD */ -#endif /* HDntohs */ +#endif /* HDntohs */ #ifndef HDopen #define HDopen(F, ...) open(F, __VA_ARGS__) #endif /* HDopen */ @@ -1300,7 +1300,7 @@ H5_DLL void HDsrand(unsigned int seed); #ifndef HDsrandom #define HDsrandom(S) srandom(S) #endif /* HDsrandom */ -#else /* H5_HAVE_RANDOM */ +#else /* H5_HAVE_RANDOM */ #ifndef HDrand #define HDrand() rand() #endif /* HDrand */ @@ -1378,7 +1378,7 @@ H5_DLL void HDsrand(unsigned int seed); #endif /* HDsetsid */ #ifndef HDsetsockopt #define HDsetsockopt(A, B, C, D, E) setsockopt((A), (B), (C), (D), (E)) /* mirror VFD */ -#endif /* HDsetsockopt */ +#endif /* HDsetsockopt */ #ifndef HDsetuid #define HDsetuid(U) setuid(U) #endif /* HDsetuid */ @@ -1387,7 +1387,7 @@ H5_DLL void HDsrand(unsigned int seed); #endif /* HDsetvbuf */ #ifndef HDshutdown #define HDshutdown(A, B) shutdown((A), (B)) /* mirror VFD */ -#endif /* HDshutdown */ +#endif /* HDshutdown */ #ifndef HDsigaction #define HDsigaction(S, A, O) sigaction((S), (A), (O)) #endif /* HDsigaction */ @@ -1435,13 +1435,13 @@ H5_DLL void HDsrand(unsigned int seed); #endif /* HDsleep */ #ifndef HDsnprintf #define HDsnprintf snprintf /*varargs*/ -#endif /* HDsnprintf */ +#endif /* HDsnprintf */ #ifndef HDsocket #define HDsocket(A, B, C) socket((A), (B), (C)) /* mirror VFD */ -#endif /* HDsocket */ +#endif /* HDsocket */ #ifndef HDsprintf #define HDsprintf sprintf /*varargs*/ -#endif /* HDsprintf */ +#endif /* HDsprintf */ #ifndef HDsqrt #define HDsqrt(X) sqrt(X) #endif /* HDsqrt */ @@ -1655,7 +1655,7 @@ H5_DLL int64_t HDstrtoll(const char *s, const char **rest, int base); * define these in terms of macros. */ #if !defined strdup && !defined H5_HAVE_STRDUP -extern char *strdup(const char *s); +extern char * strdup(const char *s); #endif #ifndef HDstrdup @@ -1941,7 +1941,7 @@ extern char H5libhdf5_settings[]; /* embedded library information */ #define H5TRACE11(R, T, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) /*void*/ #define H5TRACE12(R, T, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) /*void*/ #define H5TRACE_RETURN(V) /*void*/ -#endif /* H5_DEBUG_API */ +#endif /* H5_DEBUG_API */ H5_DLL double H5_trace(const double *calltime, const char *func, const char *type, ...); @@ -2071,10 +2071,10 @@ extern hbool_t H5_libterm_g; /* Is the library being shutdown? */ #define H5_PUSH_FUNC H5CS_push(FUNC); #define H5_POP_FUNC H5CS_pop(); -#else /* H5_HAVE_CODESTACK */ +#else /* H5_HAVE_CODESTACK */ #define H5_PUSH_FUNC /* void */ #define H5_POP_FUNC /* void */ -#endif /* H5_HAVE_CODESTACK */ +#endif /* H5_HAVE_CODESTACK */ #ifdef H5_HAVE_MPE extern hbool_t H5_MPEinit_g; /* Has the MPE Library been initialized? */ @@ -2127,7 +2127,7 @@ H5_DLL herr_t H5CX_pop(void); func_check = TRUE; \ } /* end if */ \ } /* end scope */ -#else /* NDEBUG */ +#else /* NDEBUG */ #define FUNC_ENTER_CHECK_NAME(asrt) #endif /* NDEBUG */ diff --git a/src/H5public.h b/src/H5public.h index 855ea6ffd17..940e5b21b63 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -92,9 +92,9 @@ extern "C" { #endif /* Version numbers */ -#define H5_VERS_MAJOR 1 /* For major interface/format changes */ -#define H5_VERS_MINOR 12 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 1 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_MAJOR 1 /* For major interface/format changes */ +#define H5_VERS_MINOR 12 /* For minor interface/format changes */ +#define H5_VERS_RELEASE 1 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "4" /* For pre-releases like snap0 */ /* Empty string for real releases. */ #define H5_VERS_INFO "HDF5 library version: 1.12.1-4" /* Full version string */ @@ -176,15 +176,15 @@ typedef long long ssize_t; */ #if H5_SIZEOF_INT64_T >= 8 #elif H5_SIZEOF_INT >= 8 -typedef int int64_t; +typedef int int64_t; #undef H5_SIZEOF_INT64_T #define H5_SIZEOF_INT64_T H5_SIZEOF_INT #elif H5_SIZEOF_LONG >= 8 -typedef long int64_t; +typedef long int64_t; #undef H5_SIZEOF_INT64_T #define H5_SIZEOF_INT64_T H5_SIZEOF_LONG #elif H5_SIZEOF_LONG_LONG >= 8 -typedef long long int64_t; +typedef long long int64_t; #undef H5_SIZEOF_INT64_T #define H5_SIZEOF_INT64_T H5_SIZEOF_LONG_LONG #else @@ -199,12 +199,12 @@ typedef long long int64_t; #define UINT64_MAX ((uint64_t)-1) #endif #elif H5_SIZEOF_INT >= 8 -typedef unsigned uint64_t; +typedef unsigned uint64_t; #define UINT64_MAX UINT_MAX #undef H5_SIZEOF_UINT64_T #define H5_SIZEOF_UINT64_T H5_SIZEOF_INT #elif H5_SIZEOF_LONG >= 8 -typedef unsigned long uint64_t; +typedef unsigned long uint64_t; #define UINT64_MAX ULONG_MAX #undef H5_SIZEOF_UINT64_T #define H5_SIZEOF_UINT64_T H5_SIZEOF_LONG @@ -289,15 +289,15 @@ typedef unsigned long long haddr_t; */ #if H5_SIZEOF_UINT32_T >= 4 #elif H5_SIZEOF_SHORT >= 4 -typedef short uint32_t; +typedef short uint32_t; #undef H5_SIZEOF_UINT32_T #define H5_SIZEOF_UINT32_T H5_SIZEOF_SHORT #elif H5_SIZEOF_INT >= 4 -typedef unsigned int uint32_t; +typedef unsigned int uint32_t; #undef H5_SIZEOF_UINT32_T #define H5_SIZEOF_UINT32_T H5_SIZEOF_INT #elif H5_SIZEOF_LONG >= 4 -typedef unsigned long uint32_t; +typedef unsigned long uint32_t; #undef H5_SIZEOF_UINT32_T #define H5_SIZEOF_UINT32_T H5_SIZEOF_LONG #else diff --git a/src/H5system.c b/src/H5system.c index fdc6c22865a..4026752039a 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -347,7 +347,7 @@ H5_make_time(struct tm *tm) * VS 2015 is removed, with _get_timezone replacing it. */ long timezone = 0; -#endif /* defined(H5_HAVE_VISUAL_STUDIO) && (_MSC_VER >= 1900) */ +#endif /* defined(H5_HAVE_VISUAL_STUDIO) && (_MSC_VER >= 1900) */ time_t ret_value = 0; /* Return value */ FUNC_ENTER_NOAPI_NOINIT diff --git a/src/H5timer.c b/src/H5timer.c index b637a168ed2..b53c3025304 100644 --- a/src/H5timer.c +++ b/src/H5timer.c @@ -164,7 +164,7 @@ H5_now(void) HDgettimeofday(&now_tv, NULL); now = now_tv.tv_sec; } -#else /* H5_HAVE_GETTIMEOFDAY */ +#else /* H5_HAVE_GETTIMEOFDAY */ now = HDtime(NULL); #endif /* H5_HAVE_GETTIMEOFDAY */ @@ -202,8 +202,8 @@ H5_now_usec(void) HDgettimeofday(&now_tv, NULL); now = (uint64_t)(now_tv.tv_sec * (1000 * 1000)) + (uint64_t)now_tv.tv_usec; } -#else /* H5_HAVE_GETTIMEOFDAY */ - now = (uint64_t)(HDtime(NULL) * (1000 * 1000)); +#else /* H5_HAVE_GETTIMEOFDAY */ + now = (uint64_t)(HDtime(NULL) * (1000 * 1000)); #endif /* H5_HAVE_GETTIMEOFDAY */ return (now); diff --git a/src/H5win32defs.h b/src/H5win32defs.h index 4db53274df6..d5096e57e10 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -199,7 +199,7 @@ H5_DLL float Wroundf(float arg); #define HDsetenv(N, V, O) Wsetenv(N, V, O) #define HDflock(F, L) Wflock(F, L) #define HDgetlogin() Wgetlogin() -#define HDsnprintf c99_snprintf /*varargs*/ +#define HDsnprintf c99_snprintf /*varargs*/ #define HDvsnprintf c99_vsnprintf /*varargs*/ /* Non-POSIX functions */ diff --git a/test/accum.c b/test/accum.c index a60964ad413..0b9fbadbda8 100644 --- a/test/accum.c +++ b/test/accum.c @@ -2100,8 +2100,8 @@ test_swmr_write_big(hbool_t newest_format) uint8_t wbuf[1024]; /* Buffer for reading & writing */ unsigned u; /* Local index variable */ #ifdef H5_HAVE_UNISTD_H - pid_t pid; /* Process ID */ -#endif /* H5_HAVE_UNISTD_H */ + pid_t pid; /* Process ID */ +#endif /* H5_HAVE_UNISTD_H */ int status; /* Status returned from child process */ char * driver = NULL; /* VFD string (from env variable) */ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ diff --git a/test/btree2.c b/test/btree2.c index 919a6ee5426..42f9a61c728 100644 --- a/test/btree2.c +++ b/test/btree2.c @@ -2690,7 +2690,7 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, record = 2862; /* Record to left of insertion point in right internal node (now) */ if (check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR -#endif /* NONE */ +#endif /* NONE */ record = 3137; /* Record to right of insertion point in right internal node (now) */ if (check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR @@ -2871,7 +2871,7 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam, cons record = 3049; /* Record to left of insertion point in middle internal node */ if (check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR -#endif /* NONE */ +#endif /* NONE */ record = 2822; /* Record to right of insertion point in middle internal node */ if (check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR diff --git a/test/cache.c b/test/cache.c index 0e923fda49b..b7269bab373 100644 --- a/test/cache.c +++ b/test/cache.c @@ -4449,7 +4449,7 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int test_entry_t *base_addr; test_entry_t *entry_ptr; -#if 0 /* JRM */ +#if 0 /* JRM */ /* This gets used a lot, so lets leave it in. */ HDfprintf(stdout, "check_flush_cache__multi_entry_test: test %d\n", @@ -4637,7 +4637,7 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i test_entry_t *base_addr; test_entry_t *entry_ptr; -#if 0 /* JRM */ +#if 0 /* JRM */ /* This is useful debugging code. Leave it in for now. */ HDfprintf(stdout, "check_flush_cache__pe_multi_entry_test: test %d\n", @@ -33871,7 +33871,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr) pass = FALSE; failure_mssg = "unexpected scan restart stats in cedds__expunge_dirty_entry_in_flush_test()."; } /* end if */ -#endif /* H5C_COLLECT_CACHE_STATS */ +#endif /* H5C_COLLECT_CACHE_STATS */ if (pass) reset_entries(); @@ -35232,7 +35232,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr) pass = FALSE; failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(1)."; } /* end if */ -#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ +#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ if (pass) /* protect and unprotect each entry once. Note @@ -35306,7 +35306,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr) pass = FALSE; failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(2)."; } /* end if */ -#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ +#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ if (pass) { /* protect and unprotect an entry that is not currently diff --git a/test/cache_common.h b/test/cache_common.h index 455acfbfa79..aa32858727f 100644 --- a/test/cache_common.h +++ b/test/cache_common.h @@ -393,7 +393,7 @@ typedef struct test_entry_t { unsigned flush_dep_npar; /* Number of flush dependency parents */ unsigned flush_dep_nchd; /* Number of flush dependency children */ unsigned - flush_dep_ndirty_chd; /* Number of dirty flush dependency children (including granchildren, etc.) */ + flush_dep_ndirty_chd; /* Number of dirty flush dependency children (including granchildren, etc.) */ hbool_t pinned_from_client; /* entry was pinned by client call */ hbool_t pinned_from_cache; /* entry was pinned by cache internally */ unsigned flush_order; /* Order that entry was flushed in */ diff --git a/test/cache_tagging.c b/test/cache_tagging.c index 61ada348d2a..97c9e8455ef 100644 --- a/test/cache_tagging.c +++ b/test/cache_tagging.c @@ -443,8 +443,8 @@ check_file_creation_tags(hid_t fcpl_id, int type) /* Variable Declarations */ hid_t fid = -1; /* File Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose test outout */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose test outout */ +#endif /* NDEBUG */ hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = 0; haddr_t sbe_tag = 0; @@ -548,10 +548,10 @@ check_file_open_tags(hid_t fcpl, int type) hid_t fid = -1; /* File Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ - hid_t fapl = -1; /* File access prop list */ - haddr_t root_tag; /* Root Group Tag */ - haddr_t sbe_tag; /* Sblock Extension Tag */ +#endif /* NDEBUG */ + hid_t fapl = -1; /* File access prop list */ + haddr_t root_tag; /* Root Group Tag */ + haddr_t sbe_tag; /* Sblock Extension Tag */ /* Testing Macro */ TESTING("tag application during file open"); @@ -677,8 +677,8 @@ check_group_creation_tags(void) hid_t fid = -1; /* File Identifier */ hid_t gid = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = HADDR_UNDEF; /* Root Group Tag */ haddr_t g_tag; /* Group Tag */ @@ -800,8 +800,8 @@ check_multi_group_creation_tags(void) hid_t fid = -1; /* File Identifier */ hid_t gid = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ char gname[16]; /* group name buffer */ int i = 0; /* iterator */ hid_t fapl = -1; /* File access prop list */ @@ -952,8 +952,8 @@ check_link_iteration_tags(void) hid_t sid = -1; /* Group Identifier */ hid_t did = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ int i = 0; /* iterator */ haddr_t root_tag = 0; /* Root Group Tag Value */ char dsetname[500]; /* Name of dataset */ @@ -1094,8 +1094,8 @@ check_dense_attribute_tags(void) hid_t did = -1; /* Group Identifier */ hid_t dcpl = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ int i = 0; /* iterator */ hid_t fapl = -1; /* File access property list */ haddr_t d_tag = 0; /* Dataset tag value */ @@ -1324,8 +1324,8 @@ check_group_open_tags(void) hid_t fid = -1; /* File Identifier */ hid_t gid = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file output */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file output */ +#endif /* NDEBUG */ hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = HADDR_UNDEF; haddr_t g_tag; @@ -1455,8 +1455,8 @@ check_attribute_creation_tags(hid_t fcpl, int type) hid_t gid = -1; /* Group Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = 0; /* Root group tag */ haddr_t g_tag = 0; @@ -1620,8 +1620,8 @@ check_attribute_open_tags(hid_t fcpl, int type) hid_t gid = -1; /* Group Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = 0; haddr_t g_tag = 0; @@ -1787,8 +1787,8 @@ check_attribute_rename_tags(hid_t fcpl, int type) hid_t aid = -1; /* Attribute Identifier */ hid_t sid = -1; /* Dataset Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ int * data = NULL; /* data buffer */ int i, j, k = 0; /* iterators */ hid_t fapl = -1; /* File access prop list */ @@ -2000,8 +2000,8 @@ check_attribute_delete_tags(hid_t fcpl, int type) hid_t aid = -1; /* Attribute Identifier */ hid_t sid = -1; /* Dataset Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ int * data = NULL; /* data buffer */ int i, j, k = 0; /* iterators */ hid_t fapl = -1; /* File access prop list */ @@ -2191,8 +2191,8 @@ check_dataset_creation_tags(hid_t fcpl, int type) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -2351,8 +2351,8 @@ check_dataset_creation_earlyalloc_tags(hid_t fcpl, int type) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -2517,8 +2517,8 @@ check_dataset_open_tags(void) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -2669,8 +2669,8 @@ check_dataset_write_tags(void) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -2836,8 +2836,8 @@ check_attribute_write_tags(hid_t fcpl, int type) hid_t aid = -1; /* Attribute Identifier */ hid_t sid = -1; /* Dataset Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ int * data = NULL; /* data buffer */ int i, j, k = 0; /* iterators */ hid_t fapl = -1; /* File access prop list */ @@ -3022,8 +3022,8 @@ check_dataset_read_tags(void) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -3184,8 +3184,8 @@ check_dataset_size_retrieval(void) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -3348,8 +3348,8 @@ check_dataset_extend_tags(void) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -3510,8 +3510,8 @@ check_object_info_tags(void) hid_t fid = -1; /* File Identifier */ hid_t gid = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file output */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file output */ +#endif /* NDEBUG */ hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = HADDR_UNDEF; haddr_t g_tag; @@ -3645,8 +3645,8 @@ check_object_copy_tags(void) hid_t fid = -1; /* File Identifier */ hid_t gid = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file output */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file output */ +#endif /* NDEBUG */ hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = HADDR_UNDEF; haddr_t g_tag; @@ -3795,8 +3795,8 @@ check_link_removal_tags(hid_t fcpl, int type) hid_t sid = -1; /* Dataspace Identifier */ hid_t gid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -3984,8 +3984,8 @@ check_link_getname_tags(void) hid_t sid = -1; /* Dataspace Identifier */ hid_t gid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -4161,8 +4161,8 @@ check_external_link_creation_tags(void) hid_t fid2 = -1; /* File Identifier */ hid_t gid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = 0; @@ -4288,8 +4288,8 @@ check_external_link_open_tags(void) hid_t gid = -1; /* Dataspace Identifier */ hid_t xid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ H5O_native_info_t ninfo; /* Native object info struct */ hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = 0; @@ -4462,7 +4462,7 @@ check_invalid_tag_application(void) H5HL_t *lheap = NULL; hid_t fapl = -1; /* File access prop list */ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ -#endif /* H5C_DO_TAGGING_SANITY_CHECKS */ +#endif /* H5C_DO_TAGGING_SANITY_CHECKS */ /* Testing Macro */ TESTING("failure on invalid tag application"); diff --git a/test/chunk_info.c b/test/chunk_info.c index 5d1d9f14101..cc35bfe7b54 100644 --- a/test/chunk_info.c +++ b/test/chunk_info.c @@ -67,7 +67,7 @@ const char *FILENAME[] = {"tchunk_info_earliest", "tchunk_info_v18", "tchunk_inf #define V2_BTREE_INDEX_DSET_NAME "Version 2 B-Tree Index Dataset" #define SKIP_FILTER_DSET_NAME "Dataset with Skipping One Filter" #define FILENAME_BUF_SIZE 256 /* Size for file names */ -#define RANK 2 /* Rank for datasets */ +#define RANK 2 /* Rank for datasets */ /* Dimension of the dataset */ #define NX 24 @@ -489,7 +489,7 @@ test_get_chunk_info_highest_v18(hid_t fapl) Bytef * z_dst; /*destination buffer */ uLongf z_dst_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(CHK_SIZE); uLong z_src_nbytes = (uLong)CHK_SIZE; -#endif /* end H5_HAVE_FILTER_DEFLATE */ +#endif /* end H5_HAVE_FILTER_DEFLATE */ void * inbuf = NULL; /* Pointer to new buffer */ hsize_t chunk_size = CHK_SIZE; /* Size of a chunk, can be compressed or not */ hsize_t ii, jj; /* Array indices */ diff --git a/test/cross_read.c b/test/cross_read.c index 74557527301..22c6828c33d 100644 --- a/test/cross_read.c +++ b/test/cross_read.c @@ -275,7 +275,7 @@ check_file(char *filename) TESTING("dataset of LE FLOAT with Deflate filter"); #ifdef H5_HAVE_FILTER_DEFLATE nerrors += check_data_f(DATASETNAME16, fid); -#else /*H5_HAVE_FILTER_DEFLATE*/ +#else /*H5_HAVE_FILTER_DEFLATE*/ SKIPPED(); HDputs(not_supported); #endif /*H5_HAVE_FILTER_DEFLATE*/ @@ -283,7 +283,7 @@ check_file(char *filename) TESTING("dataset of BE FLOAT with Deflate filter"); #ifdef H5_HAVE_FILTER_DEFLATE nerrors += check_data_f(DATASETNAME17, fid); -#else /*H5_HAVE_FILTER_DEFLATE*/ +#else /*H5_HAVE_FILTER_DEFLATE*/ SKIPPED(); HDputs(not_supported); #endif /*H5_HAVE_FILTER_DEFLATE*/ @@ -291,7 +291,7 @@ check_file(char *filename) TESTING("dataset of LE FLOAT with Szip filter"); #ifdef H5_HAVE_FILTER_SZIP nerrors += check_data_f(DATASETNAME18, fid); -#else /*H5_HAVE_FILTER_SZIP*/ +#else /*H5_HAVE_FILTER_SZIP*/ SKIPPED(); HDputs(not_supported); #endif /*H5_HAVE_FILTER_SZIP*/ @@ -299,7 +299,7 @@ check_file(char *filename) TESTING("dataset of BE FLOAT with Szip filter"); #ifdef H5_HAVE_FILTER_SZIP nerrors += check_data_f(DATASETNAME19, fid); -#else /*H5_HAVE_FILTER_SZIP*/ +#else /*H5_HAVE_FILTER_SZIP*/ SKIPPED(); HDputs(not_supported); #endif /*H5_HAVE_FILTER_SZIP*/ diff --git a/test/dsets.c b/test/dsets.c index 2c50c09fd58..a7b67ef567f 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -193,15 +193,15 @@ const char *FILENAME[] = {"dataset", /* 0 */ #define DATA_NOT_CORRUPTED 0 /* Parameters for the "set local" test */ -#define BOGUS2_PERM_NPARMS 2 /* Number of "permanent" parameters */ +#define BOGUS2_PERM_NPARMS 2 /* Number of "permanent" parameters */ #define BOGUS2_PARAM_1 13 /* (No particular meaning, just for checking value) */ #define BOGUS2_PARAM_2 35 /* (No particular meaning, just for checking value) */ -#define BOGUS2_ALL_NPARMS 4 /* Total number of parameter = permanent + "local" parameters */ +#define BOGUS2_ALL_NPARMS 4 /* Total number of parameter = permanent + "local" parameters */ /* Dimensionality for conversion buffer test */ -#define DIM1 100 /* Dim. Size of data member # 1 */ +#define DIM1 100 /* Dim. Size of data member # 1 */ #define DIM2 5000 /* Dim. Size of data member # 2 */ -#define DIM3 10 /* Dim. Size of data member # 3 */ +#define DIM3 10 /* Dim. Size of data member # 3 */ /* Parameters for internal filter test */ #define FILTER_CHUNK_DIM1 2 @@ -2412,7 +2412,7 @@ test_get_filter_info(void) if (((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) != 0) || ((flags & H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) TEST_ERROR - } /* end else */ + } /* end else */ #endif /* H5_HAVE_FILTER_SZIP */ /* Verify that get_filter_info throws an error when given a bad filter */ @@ -2454,7 +2454,7 @@ test_filters(hid_t file, hid_t #ifdef H5_HAVE_FILTER_DEFLATE hsize_t deflate_size; /* Size of dataset with deflate filter */ -#endif /* H5_HAVE_FILTER_DEFLATE */ +#endif /* H5_HAVE_FILTER_DEFLATE */ #ifdef H5_HAVE_FILTER_SZIP hsize_t szip_size; /* Size of dataset with szip filter */ @@ -2466,7 +2466,7 @@ test_filters(hid_t file, hid_t #if defined(H5_HAVE_FILTER_DEFLATE) || defined(H5_HAVE_FILTER_SZIP) hsize_t combo_size; /* Size of dataset with multiple filters */ -#endif /* defined(H5_HAVE_FILTER_DEFLATE) || defined(H5_HAVE_FILTER_SZIP) */ +#endif /* defined(H5_HAVE_FILTER_DEFLATE) || defined(H5_HAVE_FILTER_SZIP) */ /* test the H5Zget_filter_info function */ if (test_get_filter_info() < 0) @@ -2569,7 +2569,7 @@ test_filters(hid_t file, hid_t /* Clean up objects used for this test */ if (H5Pclose(dc) < 0) goto error; -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ TESTING("deflate filter"); SKIPPED(); HDputs(" Deflate filter not enabled"); @@ -2611,7 +2611,7 @@ test_filters(hid_t file, hid_t SKIPPED(); } -#else /* H5_HAVE_FILTER_SZIP */ +#else /* H5_HAVE_FILTER_SZIP */ TESTING("szip filter"); SKIPPED(); HDputs(" Szip filter not enabled"); @@ -2686,7 +2686,7 @@ test_filters(hid_t file, hid_t /* Clean up objects used for this test */ if (H5Pclose(dc) < 0) goto error; -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ TESTING("shuffle+deflate+fletcher32 filters"); SKIPPED(); HDputs(" Deflate filter not enabled"); @@ -2764,7 +2764,7 @@ test_filters(hid_t file, hid_t SKIPPED(); } -#else /* H5_HAVE_FILTER_SZIP */ +#else /* H5_HAVE_FILTER_SZIP */ TESTING("shuffle+szip+fletcher32 filters"); SKIPPED(); HDputs(" szip filter not enabled"); @@ -2820,7 +2820,7 @@ test_missing_filter(hid_t file) H5_FAILED(); HDprintf(" Line %d: Can't unregister deflate filter\n", __LINE__); goto error; - } /* end if */ + } /* end if */ #endif /* H5_HAVE_FILTER_DEFLATE */ /* Verify deflate filter is not registered currently */ if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != FALSE) { @@ -3006,7 +3006,7 @@ test_missing_filter(hid_t file) H5_FAILED(); HDprintf(" Line %d: Deflate filter not available\n", __LINE__); goto error; - } /* end if */ + } /* end if */ #endif /* H5_HAVE_FILTER_DEFLATE */ /* Pop API context */ @@ -6257,7 +6257,7 @@ test_can_apply_szip(hid_t const hsize_t chunk_dims[2] = {250, 2048}; /* Chunk dimensions */ const hsize_t chunk_dims2[2] = {2, 1}; /* Chunk dimensions */ herr_t ret; /* Status value */ -#endif /* H5_HAVE_FILTER_SZIP */ +#endif /* H5_HAVE_FILTER_SZIP */ TESTING("dataset szip filter 'can apply' callback"); @@ -6409,7 +6409,7 @@ test_can_apply_szip(hid_t SKIPPED(); HDputs(" Szip encoding is not enabled."); } -#else /* H5_HAVE_FILTER_SZIP */ +#else /* H5_HAVE_FILTER_SZIP */ SKIPPED(); HDputs(" Szip filter is not enabled."); #endif /* H5_HAVE_FILTER_SZIP */ @@ -10668,7 +10668,7 @@ test_fixed_array(hid_t fapl) #ifdef H5_HAVE_FILTER_DEFLATE unsigned compress; /* Whether chunks should be compressed */ -#endif /* H5_HAVE_FILTER_DEFLATE */ +#endif /* H5_HAVE_FILTER_DEFLATE */ h5_stat_size_t empty_size; /* Size of an empty file */ h5_stat_size_t file_size; /* Size of each file created */ @@ -11087,7 +11087,7 @@ test_fixed_array(hid_t fapl) } /* end for */ #ifdef H5_HAVE_FILTER_DEFLATE - } /* end for */ + } /* end for */ #endif /* H5_HAVE_FILTER_DEFLATE */ /* Release buffers */ @@ -11179,7 +11179,7 @@ test_single_chunk(hid_t fapl) #ifdef H5_HAVE_FILTER_DEFLATE unsigned compress; /* Whether chunks should be compressed */ -#endif /* H5_HAVE_FILTER_DEFLATE */ +#endif /* H5_HAVE_FILTER_DEFLATE */ size_t n, i; /* local index variables */ herr_t ret; /* Generic return value */ @@ -11391,7 +11391,7 @@ test_single_chunk(hid_t fapl) } /* end for */ #ifdef H5_HAVE_FILTER_DEFLATE - } /* end for */ + } /* end for */ #endif /* H5_HAVE_FILTER_DEFLATE */ /* Release buffers */ diff --git a/test/dt_arith.c b/test/dt_arith.c index 49c1e8c6383..7b2274c340e 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -5165,7 +5165,7 @@ run_int_fp_conv(const char *name) #if H5_SIZEOF_LONG_LONG != H5_SIZEOF_LONG #if H5_LLONG_TO_LDOUBLE_CORRECT nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_LLONG, H5T_NATIVE_LDOUBLE); -#else /* H5_LLONG_TO_LDOUBLE_CORRECT */ +#else /* H5_LLONG_TO_LDOUBLE_CORRECT */ { char str[256]; /*hello string */ @@ -5177,7 +5177,7 @@ run_int_fp_conv(const char *name) #endif /* H5_LLONG_TO_LDOUBLE_CORRECT */ #if H5_LLONG_TO_LDOUBLE_CORRECT nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_ULLONG, H5T_NATIVE_LDOUBLE); -#else /* H5_LLONG_TO_LDOUBLE_CORRECT */ +#else /* H5_LLONG_TO_LDOUBLE_CORRECT */ { char str[256]; /*hello string */ diff --git a/test/dtypes.c b/test/dtypes.c index e973f924f96..13cf6e85588 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -6486,7 +6486,7 @@ test_int_float_except(void) hid_t dxpl; /* Dataset transfer property list */ except_info_t e; /* Exception information */ unsigned u; /* Local index variables */ -#endif /* H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4 */ +#endif /* H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4 */ TESTING("exceptions for int <-> float conversions"); @@ -6602,7 +6602,7 @@ test_int_float_except(void) TEST_ERROR PASSED(); -#else /* H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4 */ +#else /* H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4 */ SKIPPED(); HDputs(" Test skipped due to int or float not 4 bytes."); #endif /* H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4 */ diff --git a/test/earray.c b/test/earray.c index 21db0d87e1d..4ef79ee2606 100644 --- a/test/earray.c +++ b/test/earray.c @@ -375,7 +375,7 @@ check_stats(const H5EA_t *ea, const earray_state_t *state) "\n", earray_stats.stored.data_blk_size, state->data_blk_size); TEST_ERROR - } /* end if */ + } /* end if */ #endif /* NOT_YET */ if (earray_stats.stored.nsuper_blks != state->nsuper_blks) { HDfprintf(stdout, @@ -391,7 +391,7 @@ check_stats(const H5EA_t *ea, const earray_state_t *state) "\n", earray_stats.stored.super_blk_size, state->super_blk_size); TEST_ERROR - } /* end if */ + } /* end if */ #endif /* NOT_YET */ /* All tests passed */ @@ -757,7 +757,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE PASSED(); } -#else /* NDEBUG */ +#else /* NDEBUG */ SKIPPED(); HDputs(" Not tested when assertions are disabled"); #endif /* NDEBUG */ diff --git a/test/error_test.c b/test/error_test.c index a47fa853d46..4fa7bc99da0 100644 --- a/test/error_test.c +++ b/test/error_test.c @@ -132,7 +132,7 @@ test_error(hid_t file) #ifdef H5_USE_16_API if (old_func != (H5E_auto_t)H5Eprint) TEST_ERROR; -#else /* H5_USE_16_API */ +#else /* H5_USE_16_API */ if (old_func != (H5E_auto2_t)H5Eprint2) TEST_ERROR; #endif /* H5_USE_16_API */ diff --git a/test/farray.c b/test/farray.c index 5758a3f6d40..46889a33cc5 100644 --- a/test/farray.c +++ b/test/farray.c @@ -481,7 +481,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE PASSED(); } -#else /* NDEBUG */ +#else /* NDEBUG */ SKIPPED(); HDputs(" Not tested when assertions are disabled"); #endif /* NDEBUG */ diff --git a/test/fheap.c b/test/fheap.c index bcf8fd09f18..33f71106957 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -9423,14 +9423,14 @@ test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_ H5HF_t * fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ - unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the */ + unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the */ /* first indirect blocks */ - unsigned row; /* Current row in indirect block */ - h5_stat_size_t empty_size; /* Size of a file with an empty heap */ - size_t obj_size; /* Size of object */ - size_t fill_size; /* Size of objects for "bulk" filled blocks */ - fheap_heap_state_t state; /* State of fractal heap */ - unsigned u; /* Local index variable */ + unsigned row; /* Current row in indirect block */ + h5_stat_size_t empty_size; /* Size of a file with an empty heap */ + size_t obj_size; /* Size of object */ + size_t fill_size; /* Size of objects for "bulk" filled blocks */ + fheap_heap_state_t state; /* State of fractal heap */ + unsigned u; /* Local index variable */ /* Test description */ const char *base_desc = "filling direct blocks and skipping row of non-root indirect blocks, then " "backfill and extend, then remove all objects %s"; @@ -9556,7 +9556,7 @@ test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -9702,8 +9702,8 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5 haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ - unsigned row; /* Current row in indirect block */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + unsigned row; /* Current row in indirect block */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -9865,7 +9865,7 @@ test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ unsigned max_dblock_rows; /* Max. # of rows (of direct blocks) in the root indirect block */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ @@ -10021,7 +10021,7 @@ test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ unsigned max_dblock_rows; /* Max. # of rows (of direct blocks) in the root indirect block */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ @@ -10478,7 +10478,7 @@ test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(h haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -10631,7 +10631,7 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped( haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -10788,7 +10788,7 @@ test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -10952,7 +10952,7 @@ test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_s haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -11120,7 +11120,7 @@ test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5 haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -11283,7 +11283,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_blo haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -11466,7 +11466,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -11686,7 +11686,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_star haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -11886,7 +11886,7 @@ test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -12417,7 +12417,7 @@ test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t * haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -14951,8 +14951,8 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ #ifdef NOT_YET - h5_stat_size_t file_size; /* Size of file currently */ -#endif /* NOT_YET */ + h5_stat_size_t file_size; /* Size of file currently */ +#endif /* NOT_YET */ unsigned char heap_id[HEAP_ID_LEN]; /* Heap ID for object */ size_t obj_size; /* Size of object */ size_t robj_size; /* Size of object read */ @@ -15124,8 +15124,8 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ #ifdef NOT_YET - h5_stat_size_t file_size; /* Size of file currently */ -#endif /* NOT_YET */ + h5_stat_size_t file_size; /* Size of file currently */ +#endif /* NOT_YET */ unsigned char heap_id1[HEAP_ID_LEN]; /* Heap ID for object #1 */ unsigned char heap_id2[HEAP_ID_LEN]; /* Heap ID for object #2 */ size_t obj_size; /* Size of object */ diff --git a/test/filter_plugin.c b/test/filter_plugin.c index cf2272c3516..7956ab3c622 100644 --- a/test/filter_plugin.c +++ b/test/filter_plugin.c @@ -463,7 +463,7 @@ test_dataset_write_with_filters(hid_t fid) /* Clean up objects used for this test */ if (H5Pclose(dcpl_id) < 0) TEST_ERROR; -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ SKIPPED(); HDputs(" Deflate filter not enabled"); #endif /* H5_HAVE_FILTER_DEFLATE */ @@ -649,7 +649,7 @@ test_dataset_read_with_filters(hid_t fid) if (H5Dclose(did) < 0) TEST_ERROR; -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ SKIPPED(); HDputs(" Deflate filter not enabled"); #endif /* H5_HAVE_FILTER_DEFLATE */ diff --git a/test/gen_bad_ohdr.c b/test/gen_bad_ohdr.c index 641beac25b8..ca635a1003e 100644 --- a/test/gen_bad_ohdr.c +++ b/test/gen_bad_ohdr.c @@ -112,7 +112,7 @@ main(void) H5Fclose(fid); } H5E_END_TRY; -#else /* H5O_ENABLE_BAD_MESG_COUNT */ +#else /* H5O_ENABLE_BAD_MESG_COUNT */ HDputs("H5O_BAD_MESG_COUNT compiler macro not defined!"); #endif /* H5O_ENABLE_BAD_MESG_COUNT */ return 1; diff --git a/test/gen_bogus.c b/test/gen_bogus.c index ad858983bd1..b21adeb4c7a 100644 --- a/test/gen_bogus.c +++ b/test/gen_bogus.c @@ -179,7 +179,7 @@ main(void) H5Fclose(fid); } H5E_END_TRY; -#else /* H5O_ENABLE_BOGUS */ +#else /* H5O_ENABLE_BOGUS */ HDputs("H5O_ENABLE_BOGUS compiler macro not defined!"); #endif /* H5O_ENABLE_BOGUS */ return 1; diff --git a/test/gen_cross.c b/test/gen_cross.c index 28ddf5456e5..030cc658e31 100644 --- a/test/gen_cross.c +++ b/test/gen_cross.c @@ -925,7 +925,7 @@ create_deflate_dsets_float(hid_t fid, hid_t fsid, hid_t msid) if (H5Pclose(dcpl) < 0) TEST_ERROR -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ const char *not_supported = "Deflate filter is not enabled. Can't create the dataset."; HDputs(not_supported); @@ -1328,7 +1328,7 @@ main(void) /* Create a dataset of FLOAT with szip filter */ if (create_szip_dsets_float(file, filespace, memspace) < 0) TEST_ERROR; -#else /* H5_HAVE_FILTER_SZIP */ +#else /* H5_HAVE_FILTER_SZIP */ HDputs("Szip filter is not enabled. Can't create the dataset."); #endif /* H5_HAVE_FILTER_SZIP */ diff --git a/test/links.c b/test/links.c index 11b760cab31..f0932dc2323 100644 --- a/test/links.c +++ b/test/links.c @@ -9800,8 +9800,8 @@ external_set_elink_cb(hid_t fapl, hbool_t new_format) base_driver == H5FD_MPIO || base_driver == H5FD_CORE) ? H5P_DEFAULT : fapl; - op_data.fam_size = ELINK_CB_FAM_SIZE; - op_data.code = 0; + op_data.fam_size = ELINK_CB_FAM_SIZE; + op_data.code = 0; /* Create family fapl */ if ((fam_fapl = H5Pcopy(fapl)) < 0) @@ -12316,7 +12316,7 @@ external_symlink(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) char * tmpname = NULL; char * cwdpath = NULL; hbool_t have_posix_compat_vfd; /* Whether VFD used is compatible w/POSIX I/O calls */ -#endif /* H5_HAVE_SYMLINK */ +#endif /* H5_HAVE_SYMLINK */ if (new_format) TESTING("external links w/symlink files (w/new group format)") @@ -12570,7 +12570,7 @@ external_symlink(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) return FAIL; -#else /* H5_HAVE_SYMLINK */ +#else /* H5_HAVE_SYMLINK */ SKIPPED(); HDputs(" Current file system or operating system doesn't support symbolic links"); @@ -19182,8 +19182,8 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u unsigned v; /* Local index variable */ hsize_t skip; /* # of links to skip in group */ #ifndef H5_NO_DEPRECATED_SYMBOLS - int gskip; /* # of links to skip in group, with H5Giterate */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + int gskip; /* # of links to skip in group, with H5Giterate */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ herr_t ret; /* Generic return value */ /* Iterate over links in group */ @@ -19291,7 +19291,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u if (nvisit != (max_links / 2)) TEST_ERROR - } /* end else */ + } /* end else */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ /* Iterate over links in group, stopping in the middle */ @@ -19670,8 +19670,8 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links unsigned v; /* Local index variable */ hsize_t skip; /* # of links to skip in group */ #ifndef H5_NO_DEPRECATED_SYMBOLS - int gskip; /* # of links to skip in group, with H5Giterate */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + int gskip; /* # of links to skip in group, with H5Giterate */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ herr_t ret; /* Generic return value */ /* Iterate over links in group */ @@ -19779,7 +19779,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links if (nvisit != (max_links / 2)) TEST_ERROR - } /* end else */ + } /* end else */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ /* Iterate over links in group, stopping in the middle */ @@ -22502,12 +22502,12 @@ main(void) nerrors += ud_hard_links(fapl2) < 0 ? 1 : 0; /* requires new format groups */ #ifndef H5_NO_DEPRECATED_SYMBOLS nerrors += ud_hard_links_deprec(fapl2) < 0 ? 1 : 0; /* requires new format groups */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ - nerrors += ud_link_reregister(fapl2) < 0 ? 1 : 0; /* requires new format groups */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ + nerrors += ud_link_reregister(fapl2) < 0 ? 1 : 0; /* requires new format groups */ #ifndef H5_NO_DEPRECATED_SYMBOLS nerrors += ud_link_reregister_deprec(fapl2) < 0 ? 1 : 0; /* requires new format groups */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ - } /* end if */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ + } /* end if */ nerrors += ud_callbacks(my_fapl, new_format) < 0 ? 1 : 0; #ifndef H5_NO_DEPRECATED_SYMBOLS nerrors += ud_callbacks_deprec(my_fapl, new_format) < 0 ? 1 : 0; diff --git a/test/mount.c b/test/mount.c index 5d345a89415..395a19a300c 100644 --- a/test/mount.c +++ b/test/mount.c @@ -1194,7 +1194,7 @@ test_interlink(hid_t fapl) FAIL_STACK_ERROR if (H5Tclose(type) < 0) FAIL_STACK_ERROR -#else /* NOT_NOW */ +#else /* NOT_NOW */ SKIPPED(); HDputs(" Test skipped due file pointer sharing issue (Jira 7638)."); #endif /* NOT_NOW */ diff --git a/test/objcopy.c b/test/objcopy.c index 31744af952a..876e7deba04 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -4495,7 +4495,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid #ifndef H5_HAVE_FILTER_DEFLATE SKIPPED(); HDputs(" Deflation filter not available"); -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ /* set initial data values */ for (i = 0; i < DIM_SIZE_1; i++) for (j = 0; j < DIM_SIZE_2; j++) @@ -4920,7 +4920,7 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h #ifndef H5_HAVE_FILTER_DEFLATE SKIPPED(); HDputs(" Deflation filter not available"); -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ /* set initial data values */ for (i = 0; i < DIM_SIZE_1; i++) for (j = 0; j < DIM_SIZE_2; j++) @@ -7274,7 +7274,7 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, #ifndef H5_HAVE_FILTER_DEFLATE SKIPPED(); HDputs(" Deflation filter not available"); -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ /* set initial data values */ for (i = 0; i < DIM_SIZE_1; i++) { for (j = 0; j < DIM_SIZE_2; j++) { diff --git a/test/s3comms.c b/test/s3comms.c index 36f6f49d77e..c6173fd5205 100644 --- a/test/s3comms.c +++ b/test/s3comms.c @@ -291,7 +291,7 @@ jserr_str(const char *expected, const char *actual, const char *reason) if ((long)(actual) == (long)(expected)) { \ JSERR_LONG((expected), (actual), (reason)) \ goto error; \ - } /* JSVERIFY_NOT */ + } /* JSVERIFY_NOT */ #endif /* JSVERIFY_NOT unused */ /*---------------------------------------------------------------------------- @@ -348,7 +348,7 @@ jserr_str(const char *expected, const char *actual, const char *reason) if ((long)(actual) == (long)(expected)) { \ JSERR_LONG((expected), (actual), (reason)) \ goto error; \ - } /* JSVERIFY_NOT */ + } /* JSVERIFY_NOT */ #endif /* JSVERIFY_NOT unused */ /*---------------------------------------------------------------------------- @@ -372,7 +372,7 @@ jserr_str(const char *expected, const char *actual, const char *reason) #define S3_TEST_RESOURCE_TEXT_PUBLIC "Poe_Raven.txt" #define S3_TEST_RESOURCE_MISSING "missing.csv" -#define S3_TEST_RUN_TIMEOUT 0 /* run tests that might hang */ +#define S3_TEST_RUN_TIMEOUT 0 /* run tests that might hang */ #define S3_TEST_MAX_URL_SIZE 256 /* char array size */ /* Global variables for aws test profile. @@ -1290,7 +1290,7 @@ test_HMAC_SHA256(void) HDfprintf(stdout, "ERROR:\n!!! \"%s\"\n != \"%s\"\n", cases[i].exp, dest); TEST_ERROR; } -#else /* VERBOSE not defined */ +#else /* VERBOSE not defined */ /* simple pass/fail test */ JSVERIFY(0, HDstrncmp(cases[i].exp, dest, HDstrlen(cases[i].exp)), NULL); diff --git a/test/set_extent.c b/test/set_extent.c index 672d5ff4f09..2ad4fd5074d 100644 --- a/test/set_extent.c +++ b/test/set_extent.c @@ -243,11 +243,11 @@ do_ranks(hid_t fapl, hbool_t new_format) #ifdef H5_HAVE_FILTER_DEFLATE if (H5Pset_deflate(dcpl, 9) < 0) TEST_ERROR -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ if (H5Pclose(dcpl) < 0) TEST_ERROR continue; -#endif /* H5_HAVE_FILTER_DEFLATE */ +#endif /* H5_HAVE_FILTER_DEFLATE */ } /* end if */ if (config & CONFIG_FILL) { diff --git a/test/stab.c b/test/stab.c index e68c0003711..739a1ba9d51 100644 --- a/test/stab.c +++ b/test/stab.c @@ -1271,7 +1271,7 @@ old_api(hid_t fapl) TEST_ERROR PASSED(); -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ /* Shut compiler up */ fapl = fapl; diff --git a/test/swmr.c b/test/swmr.c index ded0115cb99..61d312ba954 100644 --- a/test/swmr.c +++ b/test/swmr.c @@ -2351,7 +2351,7 @@ test_start_swmr_write_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t H5_ATTR_UNUSE return 0; } /* test_start_swmr_write_concur() */ -#else /* defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */ +#else /* defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */ static int test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format) @@ -6508,7 +6508,7 @@ test_refresh_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t H5_ATTR_UNUSED new_for return 0; } /* test_refresh_concur() */ -#else /* defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */ +#else /* defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */ static int test_refresh_concur(hid_t in_fapl, hbool_t new_format) diff --git a/test/swmr_generator.c b/test/swmr_generator.c index 9e7c0502e59..931da947ff7 100644 --- a/test/swmr_generator.c +++ b/test/swmr_generator.c @@ -96,7 +96,7 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp #ifdef FILLVAL_WORKS symbol_t fillval; /* Dataset fill value */ #endif /* FILLVAL_WORKS */ - unsigned u, v; /* Local index variable */ + unsigned u, v; /* Local index variable */ HDassert(filename); HDassert(index_type); diff --git a/test/swmr_remove_reader.c b/test/swmr_remove_reader.c index 1700ece3b72..9017793e4d4 100644 --- a/test/swmr_remove_reader.c +++ b/test/swmr_remove_reader.c @@ -122,7 +122,7 @@ check_dataset(hid_t fid, unsigned verbose, const char *sym_name, symbol_t *recor * not work with SWMR currently (see note in swmr_generator.c), we * simply initialize rec_id to 0. */ record->rec_id = (uint64_t)ULLONG_MAX - 1; -#else /* FILLVAL_WORKS */ +#else /* FILLVAL_WORKS */ record->rec_id = (uint64_t)0; #endif /* FILLVAL_WORKS */ if (H5Dread(dsid, symbol_tid, rec_sid, file_sid, H5P_DEFAULT, record) < 0) diff --git a/test/swmr_sparse_writer.c b/test/swmr_sparse_writer.c index a253de53c2e..4706b7ae1b9 100644 --- a/test/swmr_sparse_writer.c +++ b/test/swmr_sparse_writer.c @@ -149,8 +149,8 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f symbol_t record; /* The record to add to the dataset */ unsigned long rec_to_flush; /* # of records left to write before flush */ #ifdef OUT - volatile int dummy; /* Dummy varialbe for busy sleep */ -#endif /* OUT */ + volatile int dummy; /* Dummy varialbe for busy sleep */ +#endif /* OUT */ hsize_t dim[2] = {1, 0}; /* Dataspace dimensions */ unsigned long u, v; /* Local index variables */ diff --git a/test/tattr.c b/test/tattr.c index 346c1b9f770..7bc215dc2dc 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -5436,10 +5436,10 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl) #ifdef LATER h5_stat_size_t empty_size; /* Size of empty file */ h5_stat_size_t file_size; /* Size of file after operating on it */ -#endif /* LATER */ - unsigned curr_dset; /* Current dataset to work on */ - unsigned u; /* Local index variable */ - herr_t ret; /* Generic return value */ +#endif /* LATER */ + unsigned curr_dset; /* Current dataset to work on */ + unsigned u; /* Local index variable */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Deleting Object w/Dense Attribute Storage and Creation Order Info\n")); @@ -5602,7 +5602,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl) CHECK(file_size, FAIL, "h5_get_file_size"); VERIFY(file_size, empty_size, "h5_get_file_size"); #endif /* LATER */ - } /* end for */ + } /* end for */ /* Close property list */ ret = H5Pclose(dcpl); @@ -6861,8 +6861,8 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx unsigned v; /* Local index variable */ hsize_t skip; /* # of attributes to skip on object */ #ifndef H5_NO_DEPRECATED_SYMBOLS - unsigned oskip; /* # of attributes to skip on object, with H5Aiterate1 */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + unsigned oskip; /* # of attributes to skip on object, with H5Aiterate1 */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ int old_nerrs; /* Number of errors when entering this check */ herr_t ret; /* Generic return value */ @@ -7054,7 +7054,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx nvisit++; VERIFY(skip, (max_attrs / 2), "H5Aiterate1"); - } /* end else */ + } /* end else */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ /* Iterate over attributes on object, stopping in the middle */ diff --git a/test/tfile.c b/test/tfile.c index 94b3ea3ac50..3d75f9b7252 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -7846,7 +7846,7 @@ test_file(void) #ifndef H5_NO_DEPRECATED_SYMBOLS test_file_ishdf5(env_h5_drvr); /* Test detecting HDF5 files correctly */ test_deprec(); /* Test deprecated routines */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ ret = H5Pclose(fapl_id); CHECK(ret, FAIL, "H5Pclose"); diff --git a/test/th5o.c b/test/th5o.c index a1849f0cff4..8b67159f2d9 100644 --- a/test/th5o.c +++ b/test/th5o.c @@ -1736,8 +1736,8 @@ test_h5o(void) test_h5o_open(); /* Test generic open function */ #ifndef H5_NO_DEPRECATED_SYMBOLS - test_h5o_open_by_addr(); /* Test opening objects by address */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + test_h5o_open_by_addr(); /* Test opening objects by address */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ test_h5o_open_by_token(); /* Test opening objects by token */ test_h5o_close(); /* Test generic close function */ test_h5o_refcount(); /* Test incrementing and decrementing reference count */ diff --git a/test/th5s.c b/test/th5s.c index 6eeec1c6c01..04ac2e6a380 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -102,8 +102,8 @@ struct space4_struct { #define CONFIG_8 1 #define CONFIG_16 2 #define CONFIG_32 3 -#define POWER8 256 /* 2^8 */ -#define POWER16 65536 /* 2^16 */ +#define POWER8 256 /* 2^8 */ +#define POWER16 65536 /* 2^16 */ #define POWER32 4294967296 /* 2^32 */ /**************************************************************** diff --git a/test/thread_id.c b/test/thread_id.c index e39b67402d4..d8ddaf8c681 100644 --- a/test/thread_id.c +++ b/test/thread_id.c @@ -314,7 +314,7 @@ main(void) return failed ? EXIT_FAILURE : EXIT_SUCCESS; } -#else /*H5_HAVE_THREADSAFE && !H5_HAVE_WIN_THREADS*/ +#else /*H5_HAVE_THREADSAFE && !H5_HAVE_WIN_THREADS*/ int main(void) { diff --git a/test/tmisc.c b/test/tmisc.c index b0ecd00c1b2..2d842beccdc 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -1254,9 +1254,9 @@ test_misc8(void) int * wdata; /* Data to write */ int * tdata; /* Temporary pointer to data write */ #ifdef VERIFY_DATA - int *rdata; /* Data to read */ - int *tdata2; /* Temporary pointer to data to read */ -#endif /* VERIFY_DATA */ + int *rdata; /* Data to read */ + int *tdata2; /* Temporary pointer to data to read */ +#endif /* VERIFY_DATA */ unsigned u, v; /* Local index variables */ int mdc_nelmts; /* Metadata number of elements */ size_t rdcc_nelmts; /* Raw data number of elements */ @@ -1578,7 +1578,7 @@ test_misc8(void) if (storage_size >= (MISC8_DIM0 * MISC8_DIM1 * H5Tget_size(H5T_NATIVE_INT))) TestErrPrintf("Error on line %d: data wasn't compressed! storage_size=%u\n", __LINE__, (unsigned)storage_size); -#else /* Compression is not configured */ +#else /* Compression is not configured */ if (storage_size != (MISC8_DIM0 * MISC8_DIM1 * H5Tget_size(H5T_NATIVE_INT))) TestErrPrintf("Error on line %d: wrong storage size! storage_size=%u\n", __LINE__, (unsigned)storage_size); @@ -1612,7 +1612,7 @@ test_misc8(void) if (storage_size >= (MISC8_DIM0 * MISC8_DIM1 * H5Tget_size(H5T_NATIVE_INT))) TestErrPrintf("Error on line %d: data wasn't compressed! storage_size=%u\n", __LINE__, (unsigned)storage_size); -#else /* Compression is not configured */ +#else /* Compression is not configured */ if (storage_size != (MISC8_DIM0 * MISC8_DIM1 * H5Tget_size(H5T_NATIVE_INT))) TestErrPrintf("Error on line %d: wrong storage size! storage_size=%u\n", __LINE__, (unsigned)storage_size); @@ -1677,7 +1677,7 @@ test_misc8(void) if (storage_size >= (4 * MISC8_CHUNK_DIM0 * MISC8_CHUNK_DIM1 * H5Tget_size(H5T_NATIVE_INT))) TestErrPrintf("Error on line %d: data wasn't compressed! storage_size=%u\n", __LINE__, (unsigned)storage_size); -#else /* Compression is not configured */ +#else /* Compression is not configured */ if (storage_size != (4 * MISC8_CHUNK_DIM0 * MISC8_CHUNK_DIM1 * H5Tget_size(H5T_NATIVE_INT))) TestErrPrintf("Error on line %d: wrong storage size! storage_size=%u\n", __LINE__, (unsigned)storage_size); @@ -2962,8 +2962,8 @@ test_misc18(void) hid_t did1, did2; /* Dataset IDs */ hid_t aid; /* Attribute ID */ #ifndef H5_NO_DEPRECATED_SYMBOLS - H5O_info1_t old_oinfo; /* (deprecated) information about object */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + H5O_info1_t old_oinfo; /* (deprecated) information about object */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ H5O_info2_t oinfo; /* Data model information about object */ H5O_native_info_t ninfo; /* Native file format information about object */ char attr_name[32]; /* Attribute name buffer */ @@ -5082,7 +5082,7 @@ test_misc27(void) H5E_BEGIN_TRY { gid = H5Gopen2(fid, MISC27_GROUP, H5P_DEFAULT); } H5E_END_TRY; VERIFY(gid, FAIL, "H5Gopen2"); -#else /* H5_STRICT_FORMAT_CHECKS */ +#else /* H5_STRICT_FORMAT_CHECKS */ /* Open group with incorrect # of object header messages */ gid = H5Gopen2(fid, MISC27_GROUP, H5P_DEFAULT); CHECK(gid, FAIL, "H5Gopen2"); @@ -5399,7 +5399,7 @@ test_misc31(void) hid_t group_id; /* Group id */ hid_t dtype_id; /* Datatype id */ herr_t ret; /* Generic return value */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ /* Output message about test being performed */ MESSAGE(5, ("Deprecated routines initialize after H5close()\n")); @@ -5474,7 +5474,7 @@ test_misc31(void) ret = H5Tclose(dtype_id); CHECK(ret, FAIL, "H5Tclose"); -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ /* Output message about test being skipped */ MESSAGE(5, (" ...Skipped")); #endif /* H5_NO_DEPRECATED_SYMBOLS */ @@ -5523,7 +5523,7 @@ test_misc32(void) CHECK_PTR_NULL(buffer, "H5allocate_memory"); /*BAD*/ buffer = H5allocate_memory(0, TRUE); CHECK_PTR_NULL(buffer, "H5allocate_memory"); /*BAD*/ -#endif /* NDEBUG */ +#endif /* NDEBUG */ /* RESIZE */ @@ -5542,7 +5542,7 @@ test_misc32(void) #ifdef NDEBUG resized = H5resize_memory(NULL, 0); CHECK_PTR_NULL(resized, "H5resize_memory"); /*BAD*/ -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end test_misc32() */ @@ -5700,7 +5700,7 @@ test_misc35(void) CHECK(arr_size_start, 0, "H5get_free_list_sizes"); CHECK(blk_size_start, 0, "H5get_free_list_sizes"); CHECK(fac_size_start, 0, "H5get_free_list_sizes"); -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ /* All the values should be == 0 */ VERIFY(reg_size_start, 0, "H5get_free_list_sizes"); VERIFY(arr_size_start, 0, "H5get_free_list_sizes"); @@ -5739,7 +5739,7 @@ test_misc35(void) CHECK(alloc_stats.total_alloc_blocks_count, 0, "H5get_alloc_stats"); CHECK(alloc_stats.curr_alloc_blocks_count, 0, "H5get_alloc_stats"); CHECK(alloc_stats.peak_alloc_blocks_count, 0, "H5get_alloc_stats"); -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ /* All the values should be == 0 */ VERIFY(alloc_stats.total_alloc_bytes, 0, "H5get_alloc_stats"); VERIFY(alloc_stats.curr_alloc_bytes, 0, "H5get_alloc_stats"); @@ -5784,10 +5784,10 @@ test_misc(void) test_misc19(); /* Test incrementing & decrementing ref count on IDs */ test_misc20(); /* Test problems with truncated dimensions in version 2 of storage layout message */ #ifdef H5_HAVE_FILTER_SZIP - test_misc21(); /* Test that "late" allocation time is treated the same as "incremental", for chunked - datasets w/a filters */ - test_misc22(); /* check szip bits per pixel */ -#endif /* H5_HAVE_FILTER_SZIP */ + test_misc21(); /* Test that "late" allocation time is treated the same as "incremental", for chunked + datasets w/a filters */ + test_misc22(); /* check szip bits per pixel */ +#endif /* H5_HAVE_FILTER_SZIP */ test_misc23(); /* Test intermediate group creation */ test_misc24(); /* Test inappropriate API opens of objects */ test_misc25a(); /* Exercise null object header message merge bug */ diff --git a/test/tsohm.c b/test/tsohm.c index 1e68628465c..71e42e6be5f 100644 --- a/test/tsohm.c +++ b/test/tsohm.c @@ -819,7 +819,7 @@ test_sohm_size1(void) hsize_t oh_sizes[3]; unsigned oh_size_index = 0; -#if 0 /* TBD: lying comment or bug. See Jira HDFFV-10646 */ +#if 0 /* TBD: lying comment or bug. See Jira HDFFV-10646 */ hsize_t norm_oh_size; #endif /* Jira HDFFV-10646 */ hsize_t sohm_oh_size; @@ -922,7 +922,7 @@ test_sohm_size1(void) norm_empty_filesize = file_sizes[0]; norm_final_filesize = file_sizes[1]; norm_final_filesize2 = file_sizes[2]; -#if 0 /* TBD: lying comment or bug. See Jira HDFFV-10646 */ +#if 0 /* TBD: lying comment or bug. See Jira HDFFV-10646 */ norm_oh_size = oh_sizes[0]; #endif /* Jira HDFFV-10646 */ @@ -941,7 +941,7 @@ test_sohm_size1(void) */ VERIFY(sohm_btree_oh_size, sohm_oh_size, "H5Oget_info_by_name"); -#if 0 /* TBD: lying comment or bug. See Jira HDFFV-10646 */ +#if 0 /* TBD: lying comment or bug. See Jira HDFFV-10646 */ /* Object headers in SOHM files should be smaller than normal object * headers. */ @@ -992,7 +992,7 @@ test_sohm_size1(void) * *--------------------------------------------------------------------------- */ -#if 0 /* TODO: REVEALS BUG TO BE FIXED - SEE JIRA HDFFV-10645 */ +#if 0 /* TODO: REVEALS BUG TO BE FIXED - SEE JIRA HDFFV-10645 */ static void test_sohm_size_consistency_open_create(void) { @@ -3817,12 +3817,12 @@ test_sohm(void) { MESSAGE(5, ("Testing Shared Object Header Messages\n")); - test_sohm_fcpl(); /* Test SOHMs and file creation plists */ - test_sohm_fcpl_errors(); /* Bogus H5P* calls for SOHMs */ - test_sohm_size1(); /* Tests the sizes of files with one SOHM */ -#if 0 /* TODO: REVEALS BUG TO BE FIXED - SEE JIRA HDFFV-10645 */ + test_sohm_fcpl(); /* Test SOHMs and file creation plists */ + test_sohm_fcpl_errors(); /* Bogus H5P* calls for SOHMs */ + test_sohm_size1(); /* Tests the sizes of files with one SOHM */ +#if 0 /* TODO: REVEALS BUG TO BE FIXED - SEE JIRA HDFFV-10645 */ test_sohm_size_consistency_open_create(); -#endif /* Jira HDFFV-10645 */ +#endif /* Jira HDFFV-10645 */ test_sohm_attrs(); /* Tests shared messages in attributes */ test_sohm_size2(0); /* Tests the sizes of files with multiple SOHMs */ test_sohm_size2(1); /* Tests the sizes of files with multiple diff --git a/test/ttsafe.c b/test/ttsafe.c index 6862a0bc61b..2b98ded45bc 100644 --- a/test/ttsafe.c +++ b/test/ttsafe.c @@ -60,7 +60,7 @@ tts_is_threadsafe(void) #ifdef H5_HAVE_THREADSAFE is_ts = FALSE; should_be = TRUE; -#else /* H5_HAVE_THREADSAFE */ +#else /* H5_HAVE_THREADSAFE */ is_ts = TRUE; should_be = FALSE; #endif /* H5_HAVE_THREADSAFE */ diff --git a/test/use_disable_mdc_flushes.c b/test/use_disable_mdc_flushes.c index a12ea31ae0a..1f0e3d4202b 100644 --- a/test/use_disable_mdc_flushes.c +++ b/test/use_disable_mdc_flushes.c @@ -33,9 +33,9 @@ const char *progname_g = "use_disable_mdc_flushes"; /* program name */ /* these two definitions must match each other */ #define UC_DATATYPE H5T_NATIVE_SHORT /* use case HDF5 data type */ -#define UC_CTYPE short /* use case C data type */ -#define UC_RANK 3 /* use case dataset rank */ -#define Chunksize_DFT 256 /* chunksize default */ +#define UC_CTYPE short /* use case C data type */ +#define UC_RANK 3 /* use case dataset rank */ +#define Chunksize_DFT 256 /* chunksize default */ #define Hgoto_error(val) \ { \ ret_value = val; \ diff --git a/test/vds.c b/test/vds.c index a14e9c3aca6..4c5929e742a 100644 --- a/test/vds.c +++ b/test/vds.c @@ -907,7 +907,7 @@ test_api(test_api_config_t config, hid_t fapl, H5F_libver_t low) TEST_ERROR ex_dcpl = -1; -#else /* VDS_POINT_SELECTIONS */ +#else /* VDS_POINT_SELECTIONS */ /* * Test 3: Verify point selections fail diff --git a/test/vfd.c b/test/vfd.c index 6a109bb2f70..da142b28fe5 100644 --- a/test/vfd.c +++ b/test/vfd.c @@ -617,7 +617,7 @@ test_direct(void) #ifndef H5_HAVE_DIRECT SKIPPED(); return 0; -#else /*H5_HAVE_DIRECT*/ +#else /*H5_HAVE_DIRECT*/ /* Set property list and file name for Direct driver. Set memory alignment boundary * and file block size to 512 which is the minimum for Linux 2.6. */ @@ -2183,7 +2183,7 @@ test_ros3(void) #ifndef H5_HAVE_ROS3_VFD SKIPPED(); return 0; -#else /* H5_HAVE_ROS3_VFD */ +#else /* H5_HAVE_ROS3_VFD */ /* Set property list and file name for ROS3 driver. */ if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) diff --git a/testpar/t_2Gio.c b/testpar/t_2Gio.c index 536d3127b99..3ec70fd253d 100644 --- a/testpar/t_2Gio.c +++ b/testpar/t_2Gio.c @@ -4220,7 +4220,7 @@ test_no_collective_cause_mode_filter(int selection_mode) herr_t ret; #ifdef LATER /* fletcher32 */ H5Z_filter_t filter_info; -#endif /* LATER */ +#endif /* LATER */ char message[256]; /* Set up MPI parameters */ @@ -4248,7 +4248,7 @@ test_no_collective_cause_mode_filter(int selection_mode) ret = H5Pset_fletcher32(dcpl); VRFY((ret >= 0),"set filter (flecher32) succeeded"); -#endif /* LATER */ +#endif /* LATER */ } else { VRFY(0, "Unexpected mode, only test for TEST_FILTERS_READ."); @@ -4290,7 +4290,7 @@ test_no_collective_cause_mode_filter(int selection_mode) test_name = "Broken Collective I/O - Filter is required"; no_collective_cause_local_expected = H5D_MPIO_FILTERS; no_collective_cause_global_expected = H5D_MPIO_FILTERS; -#endif /* LATER */ +#endif /* LATER */ /* Get the file dataspace */ file_space = H5Dget_space(dataset); diff --git a/testpar/t_cache.c b/testpar/t_cache.c index 3989f2ed7e2..e0e03f2aaef 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -2465,7 +2465,7 @@ datum_notify(H5C_notify_action_t action, void *thing) HDfprintf(stdout, "%d:%s: Bad data in read req reply.\n", world_mpi_rank, FUNC); } -#if 0 /* This has been useful debugging code -- keep it for now. */ +#if 0 /* This has been useful debugging code -- keep it for now. */ if ( mssg.req != READ_REQ_REPLY_CODE ) { HDfprintf(stdout, @@ -6880,7 +6880,7 @@ main(int argc, char **argv) H5open(); express_test = do_express_test(); -#if 0 /* JRM */ +#if 0 /* JRM */ express_test = 0; #endif /* JRM */ if (express_test) { diff --git a/testpar/t_chunk_alloc.c b/testpar/t_chunk_alloc.c index b58858be263..8b9eb361bd6 100644 --- a/testpar/t_chunk_alloc.c +++ b/testpar/t_chunk_alloc.c @@ -24,7 +24,7 @@ static int mpi_size, mpi_rank; #define DSET_NAME "ExtendibleArray" #define CHUNK_SIZE 1000 /* #elements per chunk */ -#define CHUNK_FACTOR 200 /* default dataset size in terms of chunks */ +#define CHUNK_FACTOR 200 /* default dataset size in terms of chunks */ #define CLOSE 1 #define NO_CLOSE 0 diff --git a/testpar/t_filter_read.c b/testpar/t_filter_read.c index a50cb24df7d..10d6c27589c 100644 --- a/testpar/t_filter_read.c +++ b/testpar/t_filter_read.c @@ -346,7 +346,7 @@ test_filter_read(void) VRFY(hrc >= 0, "H5Pclose"); } #endif /* H5_HAVE_FILTER_SZIP */ - } /* end for */ + } /* end for */ /*---------------------------------------------------------- * STEP 4: Test shuffling by itself. diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c index fe2a549ad56..fe73ba0fece 100644 --- a/testpar/t_mpi.c +++ b/testpar/t_mpi.c @@ -162,9 +162,9 @@ test_mpio_overlap_writes(char *filename) return (nerrs); } -#define MB 1048576 /* 1024*1024 == 2**20 */ -#define GB 1073741824 /* 1024**3 == 2**30 */ -#define TWO_GB_LESS1 2147483647 /* 2**31 - 1 */ +#define MB 1048576 /* 1024*1024 == 2**20 */ +#define GB 1073741824 /* 1024**3 == 2**30 */ +#define TWO_GB_LESS1 2147483647 /* 2**31 - 1 */ #define FOUR_GB_LESS1 4294967295L /* 2**32 - 1 */ /* * Verify that MPI_Offset exceeding 2**31 can be computed correctly. diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c index be3f6e1fd2a..1c5e87586be 100644 --- a/testpar/t_shapesame.c +++ b/testpar/t_shapesame.c @@ -578,7 +578,7 @@ hs_dr_pio_test__takedown(struct hs_dr_pio_test_vars_t *tv_ptr) { #if HS_DR_PIO_TEST__TAKEDOWN__DEBUG const char *fcnName = "hs_dr_pio_test__takedown()"; -#endif /* HS_DR_PIO_TEST__TAKEDOWN__DEBUG */ +#endif /* HS_DR_PIO_TEST__TAKEDOWN__DEBUG */ int mpi_rank; /* needed by the VRFY macro */ herr_t ret; /* Generic return value */ diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index d1d0d9dbe50..a821e6ffbb2 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -37,10 +37,10 @@ enum H5TEST_COLL_CHUNK_API { #endif /* Constants definitions */ -#define DIM0 600 /* Default dataset sizes. */ +#define DIM0 600 /* Default dataset sizes. */ #define DIM1 1200 /* Values are from a monitor pixel sizes */ -#define ROW_FACTOR 8 /* Nominal row factor for dataset size */ -#define COL_FACTOR 16 /* Nominal column factor for dataset size */ +#define ROW_FACTOR 8 /* Nominal row factor for dataset size */ +#define COL_FACTOR 16 /* Nominal column factor for dataset size */ #define RANK 2 #define DATASETNAME1 "Data1" #define DATASETNAME2 "Data2" @@ -94,73 +94,73 @@ enum H5TEST_COLL_CHUNK_API { /*Constants for MPI derived data type generated from span tree */ -#define MSPACE1_RANK 1 /* Rank of the first dataset in memory */ +#define MSPACE1_RANK 1 /* Rank of the first dataset in memory */ #define MSPACE1_DIM 27000 /* Dataset size in memory */ -#define FSPACE_RANK 2 /* Dataset rank as it is stored in the file */ -#define FSPACE_DIM1 9 /* Dimension sizes of the dataset as it is stored in the file */ +#define FSPACE_RANK 2 /* Dataset rank as it is stored in the file */ +#define FSPACE_DIM1 9 /* Dimension sizes of the dataset as it is stored in the file */ #define FSPACE_DIM2 3600 /* We will read dataset back from the file to the dataset in memory with these dataspace parameters. */ #define MSPACE_RANK 2 #define MSPACE_DIM1 9 #define MSPACE_DIM2 3600 -#define FHCOUNT0 1 /* Count of the first dimension of the first hyperslab selection*/ +#define FHCOUNT0 1 /* Count of the first dimension of the first hyperslab selection*/ #define FHCOUNT1 768 /* Count of the second dimension of the first hyperslab selection*/ -#define FHSTRIDE0 4 /* Stride of the first dimension of the first hyperslab selection*/ -#define FHSTRIDE1 3 /* Stride of the second dimension of the first hyperslab selection*/ -#define FHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/ -#define FHBLOCK1 2 /* Block of the second dimension of the first hyperslab selection*/ -#define FHSTART0 0 /* start of the first dimension of the first hyperslab selection*/ -#define FHSTART1 1 /* start of the second dimension of the first hyperslab selection*/ +#define FHSTRIDE0 4 /* Stride of the first dimension of the first hyperslab selection*/ +#define FHSTRIDE1 3 /* Stride of the second dimension of the first hyperslab selection*/ +#define FHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/ +#define FHBLOCK1 2 /* Block of the second dimension of the first hyperslab selection*/ +#define FHSTART0 0 /* start of the first dimension of the first hyperslab selection*/ +#define FHSTART1 1 /* start of the second dimension of the first hyperslab selection*/ -#define SHCOUNT0 1 /* Count of the first dimension of the first hyperslab selection*/ -#define SHCOUNT1 1 /* Count of the second dimension of the first hyperslab selection*/ -#define SHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define SHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ -#define SHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/ +#define SHCOUNT0 1 /* Count of the first dimension of the first hyperslab selection*/ +#define SHCOUNT1 1 /* Count of the second dimension of the first hyperslab selection*/ +#define SHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define SHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ +#define SHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/ #define SHBLOCK1 768 /* Block of the second dimension of the first hyperslab selection*/ -#define SHSTART0 4 /* start of the first dimension of the first hyperslab selection*/ -#define SHSTART1 0 /* start of the second dimension of the first hyperslab selection*/ +#define SHSTART0 4 /* start of the first dimension of the first hyperslab selection*/ +#define SHSTART1 0 /* start of the second dimension of the first hyperslab selection*/ #define MHCOUNT0 6912 /* Count of the first dimension of the first hyperslab selection*/ -#define MHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define MHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ -#define MHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ +#define MHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define MHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ +#define MHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ -#define RFFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ +#define RFFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ #define RFFHCOUNT1 768 /* Count of the second dimension of the first hyperslab selection*/ -#define RFFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define RFFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ -#define RFFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ -#define RFFHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ -#define RFFHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ -#define RFFHSTART1 2 /* start of the second dimension of the first hyperslab selection*/ +#define RFFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define RFFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ +#define RFFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ +#define RFFHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ +#define RFFHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ +#define RFFHSTART1 2 /* start of the second dimension of the first hyperslab selection*/ -#define RFSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ +#define RFSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ #define RFSHCOUNT1 1536 /* Count of the second dimension of the first hyperslab selection*/ -#define RFSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define RFSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ -#define RFSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ -#define RFSHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ -#define RFSHSTART0 2 /* start of the first dimension of the first hyperslab selection*/ -#define RFSHSTART1 4 /* start of the second dimension of the first hyperslab selection*/ +#define RFSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define RFSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ +#define RFSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ +#define RFSHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ +#define RFSHSTART0 2 /* start of the first dimension of the first hyperslab selection*/ +#define RFSHSTART1 4 /* start of the second dimension of the first hyperslab selection*/ -#define RMFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ +#define RMFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ #define RMFHCOUNT1 768 /* Count of the second dimension of the first hyperslab selection*/ -#define RMFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define RMFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ -#define RMFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ -#define RMFHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ -#define RMFHSTART0 0 /* start of the first dimension of the first hyperslab selection*/ -#define RMFHSTART1 0 /* start of the second dimension of the first hyperslab selection*/ +#define RMFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define RMFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ +#define RMFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ +#define RMFHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ +#define RMFHSTART0 0 /* start of the first dimension of the first hyperslab selection*/ +#define RMFHSTART1 0 /* start of the second dimension of the first hyperslab selection*/ -#define RMSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ +#define RMSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ #define RMSHCOUNT1 1536 /* Count of the second dimension of the first hyperslab selection*/ -#define RMSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define RMSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ -#define RMSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ -#define RMSHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ -#define RMSHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ -#define RMSHSTART1 2 /* start of the second dimension of the first hyperslab selection*/ +#define RMSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define RMSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ +#define RMSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ +#define RMSHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ +#define RMSHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ +#define RMSHSTART1 2 /* start of the second dimension of the first hyperslab selection*/ #define NPOINTS \ 4 /* Number of points that will be selected \ diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index aa729981662..ec83d9185b7 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -692,7 +692,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char /* Use the asprintf() routine, since it does what we're trying to do below */ if (HDasprintf(&obj1fullname, "/%s", objname1) < 0) H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed"); -#else /* H5_HAVE_ASPRINTF */ +#else /* H5_HAVE_ASPRINTF */ /* (malloc 2 more for "/" and end-of-line) */ if ((obj1fullname = (char *)HDmalloc(HDstrlen(objname1) + 2)) == NULL) H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed"); @@ -711,7 +711,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char /* Use the asprintf() routine, since it does what we're trying to do below */ if (HDasprintf(&obj2fullname, "/%s", objname2) < 0) H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed"); -#else /* H5_HAVE_ASPRINTF */ +#else /* H5_HAVE_ASPRINTF */ /* (malloc 2 more for "/" and end-of-line) */ if ((obj2fullname = (char *)HDmalloc(HDstrlen(objname2) + 2)) == NULL) H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed"); @@ -1174,7 +1174,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id, if (HDasprintf(&obj1_fullpath, "%s%s", grp1_path, table->objs[i].name) < 0) { H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed"); } -#else /* H5_HAVE_ASPRINTF */ +#else /* H5_HAVE_ASPRINTF */ if ((obj1_fullpath = (char *)HDmalloc(HDstrlen(grp1_path) + HDstrlen(table->objs[i].name) + 1)) == NULL) { H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed"); @@ -1192,7 +1192,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id, if (HDasprintf(&obj2_fullpath, "%s%s", grp2_path, table->objs[i].name) < 0) { H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed"); } -#else /* H5_HAVE_ASPRINTF */ +#else /* H5_HAVE_ASPRINTF */ if ((obj2_fullpath = (char *)HDmalloc(HDstrlen(grp2_path) + HDstrlen(table->objs[i].name) + 1)) == NULL) { H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed"); @@ -1388,7 +1388,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id, } /* end else */ } /* end if */ } /* end else */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ if (obj1_fullpath) HDfree(obj1_fullpath); if (obj2_fullpath) diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index b3efeab5550..b998784374f 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -1279,7 +1279,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co } nfound += diff_ldouble_element(mem1, mem2, elemtno, opts); } /*H5T_NATIVE_LDOUBLE*/ -#endif /* H5_SIZEOF_LONG_DOUBLE */ +#endif /* H5_SIZEOF_LONG_DOUBLE */ break; /* H5T_FLOAT class */ diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 01577db37dc..533237cb387 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -932,7 +932,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai h5tools_str_append(str, OPT(info->fmt_llong, fmt_llong), templlong); } } /* end if (sizeof(long long) == nsize) */ -#endif /* H5_SIZEOF_LONG != H5_SIZEOF_LONG_LONG */ +#endif /* H5_SIZEOF_LONG != H5_SIZEOF_LONG_LONG */ break; case H5T_COMPOUND: @@ -1268,7 +1268,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai for (x = 0; x < ctx->indent_level + 1; x++) h5tools_str_append(str, "%s", OPT(info->line_indent, "")); } /* end if */ -#endif /* LATER */ +#endif /* LATER */ ctx->indent_level++; diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index f88cf19e0ce..4d39816fd83 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -384,8 +384,6 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti * Programmer: Jacob Smith * 2017-11-10 * - * Changes: None. - * ***************************************************************************** */ herr_t diff --git a/tools/libtest/h5tools_test_utils.c b/tools/libtest/h5tools_test_utils.c index 969dbab4083..80873fd88d8 100644 --- a/tools/libtest/h5tools_test_utils.c +++ b/tools/libtest/h5tools_test_utils.c @@ -613,7 +613,7 @@ test_populate_ros3_fa(void) hbool_t show_progress = FALSE; int bad_version = 0xf87a; /* arbitrarily wrong version number */ -#endif /* H5_HAVE_ROS3_VFD */ +#endif /* H5_HAVE_ROS3_VFD */ TESTING("programmatic ros3 fapl population"); @@ -1028,7 +1028,7 @@ test_set_configured_fapl(void) "", /* user name */ 2048, /* stream buffer size */ }; -#endif /* H5_HAVE_LIBHDFS */ +#endif /* H5_HAVE_LIBHDFS */ unsigned n_cases = 7; /* number of common testcases */ testcase cases[] = { { @@ -1279,7 +1279,7 @@ main(void) #ifdef _H5TEST_ h5reset(); /* h5test? */ -#endif /* _H5TEST_ */ +#endif /* _H5TEST_ */ HDfprintf(stdout, "Testing h5tools_utils corpus.\n"); diff --git a/tools/src/h5dump/h5dump.h b/tools/src/h5dump/h5dump.h index 9392ca33c49..b4198ad7a50 100644 --- a/tools/src/h5dump/h5dump.h +++ b/tools/src/h5dump/h5dump.h @@ -83,7 +83,7 @@ typedef struct { dump_opt_t dump_opts = {TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, 0}; -#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */ +#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */ #define PACKED_BITS_SIZE_MAX (8 * sizeof(long long)) /* Maximum bits size of integer types of packed-bits */ /* mask list for packed bits */ unsigned long long packed_mask[PACKED_BITS_MAX]; /* packed bits are restricted to 8*sizeof(llong) bytes */ diff --git a/tools/src/h5dump/h5dump_extern.h b/tools/src/h5dump/h5dump_extern.h index 56734cf8207..6ccd15951f1 100644 --- a/tools/src/h5dump/h5dump_extern.h +++ b/tools/src/h5dump/h5dump_extern.h @@ -80,7 +80,7 @@ typedef struct { } dump_opt_t; extern dump_opt_t dump_opts; -#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */ +#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */ #define PACKED_BITS_SIZE_MAX 8 * sizeof(long long) /* Maximum bits size of integer types of packed-bits */ /* mask list for packed bits */ extern unsigned long long diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index 02f53358dc8..f2d9271b2ef 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -274,8 +274,8 @@ typedef struct s1_t { /* File 65 macros */ #define STRATEGY H5F_FSPACE_STRATEGY_NONE /* File space handling strategy */ -#define THRESHOLD10 10 /* Free-space section threshold */ -#define FSPACE_PAGE_SIZE 8192 /* File space page size */ +#define THRESHOLD10 10 /* Free-space section threshold */ +#define FSPACE_PAGE_SIZE 8192 /* File space page size */ /* "FILE66" macros and for FILE69, FILE87 */ #define F66_XDIM 8 diff --git a/tools/test/perform/perf.c b/tools/test/perform/perf.c index df4c5690a7c..22aca0430f2 100644 --- a/tools/test/perform/perf.c +++ b/tools/test/perform/perf.c @@ -465,7 +465,7 @@ parse_args(int argc, char **argv) * End: */ -#else /* H5_HAVE_PARALLEL */ +#else /* H5_HAVE_PARALLEL */ /* dummy program since H5_HAVE_PARALLEL is not configured in */ int main(int H5_ATTR_UNUSED argc, char H5_ATTR_UNUSED **argv) diff --git a/tools/test/perform/pio_standalone.h b/tools/test/perform/pio_standalone.h index 2f812d76340..d64f421f863 100644 --- a/tools/test/perform/pio_standalone.h +++ b/tools/test/perform/pio_standalone.h @@ -224,14 +224,14 @@ H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz); #define HDisalnum(C) isalnum((int)(C)) /*cast for solaris warning*/ #define HDisalpha(C) isalpha((int)(C)) /*cast for solaris warning*/ #define HDisatty(F) isatty(F) -#define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/ -#define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/ -#define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/ -#define HDislower(C) islower((int)(C)) /*cast for solaris warning*/ -#define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/ -#define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/ -#define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/ -#define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/ +#define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/ +#define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/ +#define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/ +#define HDislower(C) islower((int)(C)) /*cast for solaris warning*/ +#define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/ +#define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/ +#define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/ +#define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/ #define HDisxdigit(C) isxdigit((int)(C)) /*cast for solaris warning*/ #define HDkill(P, S) kill(P, S) #define HDlabs(X) labs(X) @@ -458,7 +458,7 @@ H5_DLL int c99_vsnprintf(char *str, size_t size, const char *format, va_list ap) #else /* H5_HAVE_WIN32_API */ #if !defined strdup && !defined H5_HAVE_STRDUP -extern char *strdup(const char *s); +extern char * strdup(const char *s); #endif #define HDstrdup(S) strdup(S) diff --git a/tools/test/perform/sio_standalone.h b/tools/test/perform/sio_standalone.h index c0e07933446..400125708b5 100644 --- a/tools/test/perform/sio_standalone.h +++ b/tools/test/perform/sio_standalone.h @@ -239,14 +239,14 @@ H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz); #define HDisalnum(C) isalnum((int)(C)) /*cast for solaris warning*/ #define HDisalpha(C) isalpha((int)(C)) /*cast for solaris warning*/ #define HDisatty(F) isatty(F) -#define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/ -#define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/ -#define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/ -#define HDislower(C) islower((int)(C)) /*cast for solaris warning*/ -#define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/ -#define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/ -#define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/ -#define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/ +#define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/ +#define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/ +#define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/ +#define HDislower(C) islower((int)(C)) /*cast for solaris warning*/ +#define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/ +#define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/ +#define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/ +#define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/ #define HDisxdigit(C) isxdigit((int)(C)) /*cast for solaris warning*/ #define HDkill(P, S) kill(P, S) #define HDlabs(X) labs(X) @@ -473,7 +473,7 @@ H5_DLL int c99_vsnprintf(char *str, size_t size, const char *format, va_list ap) #else /* H5_HAVE_WIN32_API */ #if !defined strdup && !defined H5_HAVE_STRDUP -extern char *strdup(const char *s); +extern char * strdup(const char *s); #endif #define HDstrdup(S) strdup(S) From 5ae710ca25e7184b3dc6b5f0eb4b360373692603 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 28 Jan 2021 13:49:39 -0600 Subject: [PATCH 10/25] Update check to working version --- .github/workflows/clang-format-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml index 6bf522ca2e0..230a34160d5 100644 --- a/.github/workflows/clang-format-check.yml +++ b/.github/workflows/clang-format-check.yml @@ -8,7 +8,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Run clang-format style check for C programs. - uses: DoozyX/clang-format-lint-action@v0.10 + uses: DoozyX/clang-format-lint-action@v0.11 with: source: '.' extensions: 'c,h,cpp,hpp' From 95a2b2ed9297ebbda074c8074f4d2c94d463edc8 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 1 Feb 2021 07:01:12 -0600 Subject: [PATCH 11/25] Merge workflow and minor changes from develop --- .github/workflows/main.yml | 86 +++++++++++++++++++++++++++++++-- .github/workflows/pr-check.yml | 87 ++++++++++++++++++++++++++++++++-- CTestConfig.cmake | 2 +- m4/ax_jni_include_dir.m4 | 18 ++++--- 4 files changed, 178 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c891bacb308..4d0d3bbdd4e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,14 +17,19 @@ jobs: strategy: # fail-fast: false matrix: - name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "Ubuntu Debug GCC", "macOS Latest Clang", "Ubuntu Autotools GCC"] + name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "Ubuntu Debug GCC", "macOS Latest Clang", "Ubuntu Autotools GCC", "Windows TS MSVC", "Ubuntu TS GCC", "TS Debug GCC", "macOS TS Clang", "TS Autotools GCC"] include: - name: "Windows Latest MSVC" artifact: "Windows-MSVC.tar.xz" os: windows-latest build_type: "Release" toolchain: "" + cpp: ON fortran: OFF + java: ON + ts: OFF + hl: ON + parallel: OFF generator: "-G \"Visual Studio 16 2019\" -A x64" - name: "Ubuntu Latest GCC" artifact: "Linux.tar.xz" @@ -32,6 +37,9 @@ jobs: build_type: "Release" cpp: ON fortran: OFF + java: ON + ts: OFF + hl: ON parallel: OFF toolchain: "config/toolchain/GCC.cmake" generator: "-G Ninja" @@ -41,6 +49,9 @@ jobs: build_type: "Release" cpp: ON fortran: OFF + java: ON + ts: OFF + hl: ON parallel: OFF toolchain: "config/toolchain/clang.cmake" generator: "-G Ninja" @@ -50,15 +61,82 @@ jobs: build_type: "Debug" cpp: ON fortran: OFF + java: OFF + ts: OFF + hl: ON parallel: OFF toolchain: "config/toolchain/GCC.cmake" generator: "-G Ninja" - name: "Ubuntu Autotools GCC" - artifact: "Linux.tar.xz" + artifact: "LinuxA.tar.xz" os: ubuntu-latest build_type: "Release" cpp: enable fortran: enable + java: enable + ts: disable + hl: enable + parallel: disable + toolchain: "" + generator: "autogen" +# Threadsafe runs + - name: "Windows TS MSVC" + artifact: "Windows-MSVCTS.tar.xz" + os: windows-latest + build_type: "Release" + toolchain: "" + cpp: OFF + fortran: OFF + java: OFF + ts: ON + hl: OFF + parallel: OFF + generator: "-G \"Visual Studio 16 2019\" -A x64" + - name: "Ubuntu TS GCC" + artifact: "LinuxTS.tar.xz" + os: ubuntu-latest + build_type: "Release" + cpp: OFF + fortran: OFF + java: OFF + ts: ON + hl: OFF + parallel: OFF + toolchain: "config/toolchain/GCC.cmake" + generator: "-G Ninja" + - name: "macOS TS Clang" + artifact: "macOSTS.tar.xz" + os: macos-latest + build_type: "Release" + cpp: OFF + fortran: OFF + java: OFF + ts: ON + hl: OFF + parallel: OFF + toolchain: "config/toolchain/clang.cmake" + generator: "-G Ninja" + - name: "TS Debug GCC" + artifact: "LinuxTSDBG.tar.xz" + os: ubuntu-latest + build_type: "Debug" + cpp: OFF + fortran: OFF + java: OFF + ts: ON + hl: OFF + parallel: OFF + toolchain: "config/toolchain/GCC.cmake" + generator: "-G Ninja" + - name: "TS Autotools GCC" + artifact: "LinuxATS.tar.xz" + os: ubuntu-latest + build_type: "Release" + cpp: disable + fortran: disable + java: disable + ts: enable + hl: disable parallel: disable toolchain: "" generator: "autogen" @@ -109,7 +187,7 @@ jobs: sh ./bin/chkmanifest mkdir "${{ runner.workspace }}/build" cd "${{ runner.workspace }}/build" - $GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --enable-java + $GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.ts }}-threadsafe --${{ matrix.hl }}-hl --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --${{ matrix.java }}-java shell: bash - name: Configure @@ -117,7 +195,7 @@ jobs: run: | mkdir "${{ runner.workspace }}/build" cd "${{ runner.workspace }}/build" - cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=ON $GITHUB_WORKSPACE + cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_THREADSAFE:BOOL=${{ matrix.ts }} -DHDF5_BUILD_HL_LIB:BOOL=${{ matrix.hl }} -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=${{ matrix.java }} $GITHUB_WORKSPACE shell: bash - name: Autotools Build diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 47feb7ad7d1..8c3bb2c0bec 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -12,14 +12,19 @@ jobs: strategy: # fail-fast: false matrix: - name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "Ubuntu Debug GCC", "macOS Latest Clang", "Ubuntu Autotools GCC"] + name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "Ubuntu Debug GCC", "macOS Latest Clang", "Ubuntu Autotools GCC", "Windows TS MSVC", "Ubuntu TS GCC", "TS Debug GCC", "macOS TS Clang", "TS Autotools GCC"] include: - name: "Windows Latest MSVC" artifact: "Windows-MSVC.tar.xz" os: windows-latest build_type: "Release" toolchain: "" + cpp: ON fortran: OFF + java: ON + ts: OFF + hl: ON + parallel: OFF generator: "-G \"Visual Studio 16 2019\" -A x64" - name: "Ubuntu Latest GCC" artifact: "Linux.tar.xz" @@ -27,6 +32,9 @@ jobs: build_type: "Release" cpp: ON fortran: OFF + java: ON + ts: OFF + hl: ON parallel: OFF toolchain: "config/toolchain/GCC.cmake" generator: "-G Ninja" @@ -36,6 +44,9 @@ jobs: build_type: "Release" cpp: ON fortran: OFF + java: ON + ts: OFF + hl: ON parallel: OFF toolchain: "config/toolchain/clang.cmake" generator: "-G Ninja" @@ -45,15 +56,82 @@ jobs: build_type: "Debug" cpp: ON fortran: OFF + java: OFF + ts: OFF + hl: ON parallel: OFF toolchain: "config/toolchain/GCC.cmake" generator: "-G Ninja" - name: "Ubuntu Autotools GCC" - artifact: "Linux.tar.xz" + artifact: "LinuxA.tar.xz" os: ubuntu-latest build_type: "Release" cpp: enable fortran: enable + java: enable + ts: disable + hl: enable + parallel: disable + toolchain: "" + generator: "autogen" +# Threadsafe runs + - name: "Windows TS MSVC" + artifact: "Windows-MSVCTS.tar.xz" + os: windows-latest + build_type: "Release" + toolchain: "" + cpp: OFF + fortran: OFF + java: OFF + ts: ON + hl: OFF + parallel: OFF + generator: "-G \"Visual Studio 16 2019\" -A x64" + - name: "Ubuntu TS GCC" + artifact: "LinuxTS.tar.xz" + os: ubuntu-latest + build_type: "Release" + cpp: OFF + fortran: OFF + java: OFF + ts: ON + hl: OFF + parallel: OFF + toolchain: "config/toolchain/GCC.cmake" + generator: "-G Ninja" + - name: "macOS TS Clang" + artifact: "macOSTS.tar.xz" + os: macos-latest + build_type: "Release" + cpp: OFF + fortran: OFF + java: OFF + ts: ON + hl: OFF + parallel: OFF + toolchain: "config/toolchain/clang.cmake" + generator: "-G Ninja" + - name: "TS Debug GCC" + artifact: "LinuxTSDBG.tar.xz" + os: ubuntu-latest + build_type: "Debug" + cpp: OFF + fortran: OFF + java: OFF + ts: ON + hl: OFF + parallel: OFF + toolchain: "config/toolchain/GCC.cmake" + generator: "-G Ninja" + - name: "TS Autotools GCC" + artifact: "LinuxATS.tar.xz" + os: ubuntu-latest + build_type: "Release" + cpp: disable + fortran: disable + java: disable + ts: enable + hl: disable parallel: disable toolchain: "" generator: "autogen" @@ -70,6 +148,7 @@ jobs: name: ${{ matrix.name }} # The type of runner that the job will run on runs-on: ${{ matrix.os }} + if: "!contains(github.event.head_commit.message, 'skip-ci')" # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -103,7 +182,7 @@ jobs: sh ./bin/chkmanifest mkdir "${{ runner.workspace }}/build" cd "${{ runner.workspace }}/build" - $GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --enable-java + $GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.ts }}-threadsafe --${{ matrix.hl }}-hl --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --${{ matrix.java }}-java shell: bash - name: Configure @@ -111,7 +190,7 @@ jobs: run: | mkdir "${{ runner.workspace }}/build" cd "${{ runner.workspace }}/build" - cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=ON $GITHUB_WORKSPACE + cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_THREADSAFE:BOOL=${{ matrix.ts }} -DHDF5_BUILD_HL_LIB:BOOL=${{ matrix.hl }} -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=${{ matrix.java }} $GITHUB_WORKSPACE shell: bash - name: Autotools Build diff --git a/CTestConfig.cmake b/CTestConfig.cmake index 5498b061a19..b178d557d11 100644 --- a/CTestConfig.cmake +++ b/CTestConfig.cmake @@ -18,7 +18,7 @@ set (CTEST_PROJECT_NAME "HDF5") set (CTEST_NIGHTLY_START_TIME "18:00:00 CST") -set (CTEST_DROP_METHOD "http") +set (CTEST_DROP_METHOD "https") if (CTEST_DROP_SITE_INIT) set (CTEST_DROP_SITE "${CTEST_DROP_SITE_INIT}") else () diff --git a/m4/ax_jni_include_dir.m4 b/m4/ax_jni_include_dir.m4 index ae7a5f042be..cd720987b74 100644 --- a/m4/ax_jni_include_dir.m4 +++ b/m4/ax_jni_include_dir.m4 @@ -73,13 +73,19 @@ fi case "$host_os" in darwin*) # Apple Java headers are inside the Xcode bundle. - macos_version=$(sw_vers -productVersion | sed -n -e 's/^@<:@0-9@:>@*.\(@<:@0-9@:>@*\).@<:@0-9@:>@*/\1/p') - if @<:@ "$macos_version" -gt "7" @:>@; then - _JTOPDIR="$(xcrun --show-sdk-path)/System/Library/Frameworks/JavaVM.framework" - _JINC="$_JTOPDIR/Headers" + major_macos_version=$(sw_vers -productVersion | sed -n -e 's/^\(@<:@0-9@:>@*\).@<:@0-9@:>@*.@<:@0-9@:>@*/\1/p') + if @<:@ "$major_macos_version" -gt "10" @:>@; then + _JTOPDIR="$(/usr/libexec/java_home)" + _JINC="$_JTOPDIR/include" else - _JTOPDIR="/System/Library/Frameworks/JavaVM.framework" - _JINC="$_JTOPDIR/Headers" + macos_version=$(sw_vers -productVersion | sed -n -e 's/^@<:@0-9@:>@*.\(@<:@0-9@:>@*\).@<:@0-9@:>@*/\1/p') + if @<:@ "$macos_version" -gt "7" @:>@; then + _JTOPDIR="$(xcrun --show-sdk-path)/System/Library/Frameworks/JavaVM.framework" + _JINC="$_JTOPDIR/Headers" + else + _JTOPDIR="/System/Library/Frameworks/JavaVM.framework" + _JINC="$_JTOPDIR/Headers" + fi fi ;; *) _JINC="$_JTOPDIR/include";; From bac4c43804d7277f11d895f4e95ef07ba1051c00 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 2 Feb 2021 08:40:48 -0600 Subject: [PATCH 12/25] Update supported platforms --- release_docs/RELEASE.txt | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index fe9d1f87a29..0caf2043758 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -563,17 +563,23 @@ The following platforms are not supported but have been tested for this release. MPICH 3.3 OpenMPI 2.1.5, 3.1.3, 4.0.0 - Fedora32 5.8.18-200.fc32.x86_64 - #1 SMP x86_64 GNU/Linux GNU gcc (GCC) 10.2.1 20201016 (Red Hat 10.2.1-6) - GNU Fortran (GCC) 10.2.1 20201016 (Red Hat 10.2.1-6) - clang version 10.0.1 (Fedora 10.0.1-3.fc32) + Fedora33 5.10.10-200.fc33.x86_64 + #1 SMP x86_64 GNU/Linux GNU gcc (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9) + GNU Fortran (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9) + clang version 11.0.0 (Fedora 11.0.0-2.fc33) (cmake and autotools) - Ubuntu20.10 -5.8.0-29-generic-x86_64 - #31-Ubuntu SMP x86_64 GNU/Linux GNU gcc (GCC) 10.2.0-13ubuntu1 + Ubuntu20.10 5.8.0-41-generic-x86_64 + #46-Ubuntu SMP x86_64 GNU/Linux GNU gcc (GCC) 10.2.0-13ubuntu1 GNU Fortran (GCC) 10.2.0-13ubuntu1 (cmake and autotools) + SUSE15sp2 5.3.18-22-default + #1 SMP x86_64 GNU/Linux GNU gcc (SUSE Linux) 7.5.0 + GNU Fortran (SUSE Linux) 7.5.0 + clang version 7.0.1 (tags/RELEASE_701/final 349238) + (cmake and autotools) + Known Problems ============== From f87bd3325bee238f4f404e92049ae79ddf5bba50 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 4 Feb 2021 13:24:27 -0600 Subject: [PATCH 13/25] PR#3 merge from develop --- c++/test/tvlstr.cpp | 2 +- hl/c++/examples/ptExampleFL.cpp | 2 +- hl/test/test_file_image.c | 2 ++ hl/test/test_table.c | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/c++/test/tvlstr.cpp b/c++/test/tvlstr.cpp index 8f0c0ab8c2a..77bf37846be 100644 --- a/c++/test/tvlstr.cpp +++ b/c++/test/tvlstr.cpp @@ -187,7 +187,7 @@ test_vlstring_dataset() // Test scalar type dataset with 1 value. dset1 = root.createDataSet("test_scalar_small", vlst, ds_space); - dynstring_ds_write = (char *)HDcalloc(1, sizeof(char)); + dynstring_ds_write = (char *)HDcalloc(2, sizeof(char)); HDmemset(dynstring_ds_write, 'A', 1); // Write data to the dataset, then read it back. diff --git a/hl/c++/examples/ptExampleFL.cpp b/hl/c++/examples/ptExampleFL.cpp index d0b62dae153..3b1c655f089 100644 --- a/hl/c++/examples/ptExampleFL.cpp +++ b/hl/c++/examples/ptExampleFL.cpp @@ -73,7 +73,7 @@ main(void) if (err < 0) fprintf(stderr, "Error getting packet count."); - printf("Number of packets in packet table after five appends: %d\n", count); + printf("Number of packets in packet table after five appends: %llu\n", count); /* Initialize packet table's "current record" */ ptable.ResetIndex(); diff --git a/hl/test/test_file_image.c b/hl/test/test_file_image.c index 712107e76c7..e1ee02d5852 100644 --- a/hl/test/test_file_image.c +++ b/hl/test/test_file_image.c @@ -506,6 +506,8 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags) } /* end for */ /* release temporary working buffers */ + for (i = 0; i < open_images; i++) + HDfree(filename[i]); HDfree(filename); HDfree(file_id); HDfree(dset_id); diff --git a/hl/test/test_table.c b/hl/test/test_table.c index 2f98f4a119a..d7f68e496b0 100644 --- a/hl/test/test_table.c +++ b/hl/test/test_table.c @@ -1272,7 +1272,7 @@ test_table(hid_t fid, int do_write) /* write the new longitude and latitude information to all the records */ nfields = 2; start = 0; - nrecords = NRECORDS; + nrecords = NRECORDS_ADD; if (H5TBwrite_fields_index(fid, "table12", nfields, field_index_pos, start, nrecords, sizeof(position_t), field_offset_pos, field_sizes_pos, position_in) < 0) goto out; From 9c925ada8c31f456a25497f1db7121de028a4c92 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Sun, 7 Feb 2021 19:46:14 -0600 Subject: [PATCH 14/25] Merge gcc 10 diagnostics option from develop --- config/cmake/HDFCXXCompilerFlags.cmake | 8 ++++ config/cmake/HDFCompilerFlags.cmake | 14 +++++++ config/cmake/HDFFortranCompilerFlags.cmake | 8 ++++ config/gnu-cxxflags | 9 +++++ config/gnu-fflags | 9 +++++ config/gnu-flags | 9 +++++ configure.ac | 45 ++++++++++++++++++++++ release_docs/RELEASE.txt | 19 +++++++++ 8 files changed, 121 insertions(+) diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake index 4f2eabec2e0..ebda39f74f2 100644 --- a/config/cmake/HDFCXXCompilerFlags.cmake +++ b/config/cmake/HDFCXXCompilerFlags.cmake @@ -30,6 +30,14 @@ if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstdarg-opt") endif () + if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0) + if (HDF5_ENABLE_BUILD_DIAGS) + message (STATUS "... default color and URL extended diagnostic messages enabled") + else () + message (STATUS "... disable color and URL extended diagnostic messages") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-urls=never -fno-diagnostics-color") + endif () + endif () endif () endif () diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index fb527d5411c..3d3cc6aadbf 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -31,6 +31,20 @@ if (CMAKE_COMPILER_IS_GNUCC) if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstdarg-opt") endif () + if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 10.0) + #----------------------------------------------------------------------------- + # Option to allow the user to enable build extended diagnostics + # + # This should NOT be on by default as it can cause process issues. + #----------------------------------------------------------------------------- + option (HDF5_ENABLE_BUILD_DIAGS "Enable color and URL extended diagnostic messages" OFF) + if (HDF5_ENABLE_BUILD_DIAGS) + message (STATUS "... default color and URL extended diagnostic messages enabled") + else () + message (STATUS "... disable color and URL extended diagnostic messages") + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-urls=never -fno-diagnostics-color") + endif () + endif () endif () endif () diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake index c7f085ceab2..5521f6d20ec 100644 --- a/config/cmake/HDFFortranCompilerFlags.cmake +++ b/config/cmake/HDFFortranCompilerFlags.cmake @@ -45,6 +45,14 @@ endif () #----------------------------------------------------------------------------- # HDF5 library compile options #----------------------------------------------------------------------------- +if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 10.0) + if (HDF5_ENABLE_BUILD_DIAGS) + message (STATUS "... default color and URL extended diagnostic messages enabled") + else () + message (STATUS "... disable color and URL extended diagnostic messages") + set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdiagnostics-urls=never -fno-diagnostics-color") + endif () +endif () #----------------------------------------------------------------------------- # CDash is configured to only allow 3000 warnings, so diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags index 0b48bdf4fbe..6189db6dc46 100644 --- a/config/gnu-cxxflags +++ b/config/gnu-cxxflags @@ -144,6 +144,15 @@ if test "X-g++" = "X-$cxx_vendor"; then DEBUG_CXXFLAGS="-ftrapv -fno-common" fi + ######################## + # Enhanced Diagnostics # + ######################## + + if test $cc_vers_major -ge 10; then + NO_DIAGS_CXXFLAGS="-fdiagnostics-urls=never -fno-diagnostics-color" + fi + DIAGS_CXXFLAGS= + ########### # Symbols # ########### diff --git a/config/gnu-fflags b/config/gnu-fflags index 105a990cb17..32e5a283dd9 100644 --- a/config/gnu-fflags +++ b/config/gnu-fflags @@ -105,6 +105,15 @@ if test "X-gfortran" = "X-$f9x_vendor"; then DEBUG_FCFLAGS="-fbounds-check" fi + ######################## + # Enhanced Diagnostics # + ######################## + + if test $cc_vers_major -ge 10; then + NO_DIAGS_FCFLAGS="-fdiagnostics-urls=never -fno-diagnostics-color" + fi + DIAGS_FCFLAGS= + ########### # Symbols # ########### diff --git a/config/gnu-flags b/config/gnu-flags index 538fd533db6..6f7aea6af9f 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -158,6 +158,15 @@ if test "X-gcc" = "X-$cc_vendor"; then DEBUG_CFLAGS="-ftrapv -fno-common" fi + ######################## + # Enhanced Diagnostics # + ######################## + + if test $cc_vers_major -ge 10; then + NO_DIAGS_CFLAGS="-fdiagnostics-urls=never -fno-diagnostics-color" + fi + DIAGS_CFLAGS= + ########### # Symbols # ########### diff --git a/configure.ac b/configure.ac index 64a3df3e55c..65723461cc3 100644 --- a/configure.ac +++ b/configure.ac @@ -2130,6 +2130,51 @@ AC_ARG_ENABLE([production], [AC_MSG_ERROR([--enable-production is no longer supported, use --enable-build-mode=production instead.])]) +## ---------------------------------------------------------------------- +## Check if the compiler should include build diagnostics +## +AC_MSG_CHECKING([enable build diagnostics]) +AC_ARG_ENABLE([diags], + [AS_HELP_STRING([--enable-diags=(yes|no|)], + [Allow default enhanced diagnostics to the build. + This is independent of the build mode and optimization + level. + [default=no] + ])], + [DIAGS=$enableval]) + +## Set default +if test "X-$DIAGS" = X- ; then + DIAGS=no +fi + +## Allow this variable to be substituted in +## other files (src/libhdf5.settings.in, etc.) +AC_SUBST([DIAGS]) + +case "X-$DIAGS" in + X-yes) + H5_CFLAGS="$H5_CFLAGS $DIAGS_CFLAGS" + H5_CXXFLAGS="$H5_CXXFLAGS $DIAGS_CXXFLAGS" + H5_FCFLAGS="$H5_FCFLAGS $DIAGS_FCFLAGS" + AC_MSG_RESULT([yes]) + ;; + X-no) + H5_CFLAGS="$H5_CFLAGS $NO_DIAGS_CFLAGS" + H5_CXXFLAGS="$H5_CXXFLAGS $NO_DIAGS_CXXFLAGS" + H5_FCFLAGS="$H5_FCFLAGS $NO_DIAGS_FCFLAGS" + AC_MSG_RESULT([no]) + ;; + *) + H5_CFLAGS="$H5_CFLAGS $DIAGS" + H5_CXXFLAGS="$H5_CXXFLAGS $DIAGS" + H5_FCFLAGS="$H5_FCFLAGS $DIAGS" + DIAGS="custom ($DIAGS)" + AC_MSG_RESULT([$DIAGS]) + ;; +esac + + ## ---------------------------------------------------------------------- ## Check if the compiler should include symbols ## diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index dd5888b09a3..6cf258daaeb 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -46,6 +46,25 @@ New Features Configuration: ------------- + - Added a configure-time option to control certain compiler warnings + diagnostics + + A new configure-time option was added that allows some compiler warnings + diagnostics to have the default operation. This is mainly intended for + library developers and currently only works for gcc 10 and above. The + diagnostics flags apply to C, C++ and Fortran compilers and will appear + in "H5 C Flags", H5 C++ Flags" and H5 Fortran Flags, respectively. They + will NOT be exported to h5cc, etc. + + The default is OFF, which will disable the warnings URL and color attributes + for the warnings output. ON will not add the flags and allow default behavior. + + Autotools: --enable-diags + + CMake: HDF5_ENABLE_BUILD_DIAGS + + (ADB - 2021/02/05, HDFFV-11213) + - CMake option to build the HDF filter plugins project as an external project The HDF filter plugins project is a collection of registered compression From 7e5fa9d8fe03edac47d06cefe25b3c0f152b8d9e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 9 Feb 2021 08:04:37 -0600 Subject: [PATCH 15/25] Merge #318 OSX changes from develop --- config/cmake/H5pubconf.h.in | 3 --- config/cmake_ext_mod/ConfigureChecks.cmake | 15 --------------- release_docs/RELEASE.txt | 7 +++++++ 3 files changed, 7 insertions(+), 18 deletions(-) diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 1c9fe75e5da..f436989f3f6 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -26,9 +26,6 @@ /* Define if using a Windows compiler (i.e. Visual Studio) */ #cmakedefine H5_HAVE_VISUAL_STUDIO @H5_HAVE_VISUAL_STUDIO@ -/* Define if building universal (internal helper macro) */ -#cmakedefine H5_AC_APPLE_UNIVERSAL_BUILD @H5_AC_APPLE_UNIVERSAL_BUILD@ - /* Define if C++ compiler recognizes offsetof */ #cmakedefine H5_CXX_HAVE_OFFSETOF @CXX_HAVE_OFFSETOF@ diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index 5fa6ca12acd..3722a0c75f1 100644 --- a/config/cmake_ext_mod/ConfigureChecks.cmake +++ b/config/cmake_ext_mod/ConfigureChecks.cmake @@ -22,21 +22,6 @@ include (CheckVariableExists) include (TestBigEndian) include (CheckStructHasMember) -#----------------------------------------------------------------------------- -# APPLE/Darwin setup -#----------------------------------------------------------------------------- -if (APPLE) - list (LENGTH CMAKE_OSX_ARCHITECTURES ARCH_LENGTH) - if (ARCH_LENGTH GREATER 1) - set (CMAKE_OSX_ARCHITECTURES "" CACHE STRING "" FORCE) - message (FATAL_ERROR "Building Universal Binaries on OS X is NOT supported by the HDF5 project. This is" - "due to technical reasons. The best approach would be build each architecture in separate directories" - "and use the 'lipo' tool to combine them into a single executable or library. The 'CMAKE_OSX_ARCHITECTURES'" - "variable has been set to a blank value which will build the default architecture for this system.") - endif () - set (${HDF_PREFIX}_AC_APPLE_UNIVERSAL_BUILD 0) -endif () - # Check for Darwin (not just Apple - we also want to catch OpenDarwin) if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set (${HDF_PREFIX}_HAVE_DARWIN 1) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 6cf258daaeb..2f5cd86645f 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -46,6 +46,13 @@ New Features Configuration: ------------- + - On macOS, Universal Binaries can now be built, allowing native execution on + both Intel and Apple Silicon (ARM) based Macs. + + To do so, set CMAKE_OSX_ARCHITECTURES="x86_64;arm64" + + (SAM - 2021/02/07, https://github.com/HDFGroup/hdf5/issues/311) + - Added a configure-time option to control certain compiler warnings diagnostics From 7c904504a311dbf7af5d760f9c1dc2628532d764 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 16 Feb 2021 07:08:25 -0600 Subject: [PATCH 16/25] Merge serval small changes from dev --- CMakeLists.txt | 2 +- bin/genparser | 7 ++++++- config/cmake/H5pubconf.h.in | 23 +++++++++++++++++++---- hl/examples/ex_ds1.c | 4 +++- hl/fortran/examples/ex_ds1.f90 | 3 ++- hl/src/H5LTanalyze.c | 4 +++- hl/src/H5LTparse.c | 4 +++- tools/lib/h5tools_dump.c | 5 ++++- 8 files changed, 41 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 58874cf2e75..1ce8dbc1a1f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -237,7 +237,7 @@ string (REGEX REPLACE ".*#define[ \t]+H5_VERS_MINOR[ \t]+([0-9]*).*$" "\\1" H5_VERS_MINOR ${_h5public_h_contents}) string (REGEX REPLACE ".*#define[ \t]+H5_VERS_RELEASE[ \t]+([0-9]*).*$" "\\1" H5_VERS_RELEASE ${_h5public_h_contents}) -string (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z._\-]*)\".*$" +string (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z._-]*)\".*$" "\\1" H5_VERS_SUBRELEASE ${_h5public_h_contents}) if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") message (TRACE "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}") diff --git a/bin/genparser b/bin/genparser index ab407756011..183b3c9b623 100755 --- a/bin/genparser +++ b/bin/genparser @@ -219,13 +219,15 @@ perl -0777 -pi -e 's/int H5LTyyparse/hid_t H5LTyyparse/igs' ${path_to_hl_src}/H5 # # Note that the GCC pragmas did not exist until gcc 4.2. Earlier versions # will simply ignore them, but we want to avoid those warnings. +# +# Note also that although clang defines __GNUC__, it doesn't support every +# warning that GCC does. for f in ${path_to_hl_src}/H5LTparse.c ${path_to_hl_src}/H5LTanalyze.c do echo '#if defined (__GNUC__) ' >> tmp.out echo '#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402 ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wconversion" ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wimplicit-function-declaration" ' >> tmp.out - echo '#pragma GCC diagnostic ignored "-Wlarger-than=" ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wmissing-prototypes" ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wnested-externs" ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wold-style-definition" ' >> tmp.out @@ -234,8 +236,11 @@ do echo '#pragma GCC diagnostic ignored "-Wsign-conversion" ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wstrict-overflow" ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wstrict-prototypes" ' >> tmp.out + echo '#if !defined (__clang__) ' >> tmp.out + echo '#pragma GCC diagnostic ignored "-Wlarger-than=" ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wsuggest-attribute=const" ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" ' >> tmp.out + echo '#endif ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wswitch-default" ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wunused-function" ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wunused-macros" ' >> tmp.out diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index f436989f3f6..5df524dad94 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -605,6 +605,7 @@ #cmakedefine H5_SIZEOF_INT_LEAST8_T @H5_SIZEOF_INT_LEAST8_T@ #if !defined(__APPLE__) + /* The size of `size_t', as computed by sizeof. */ #cmakedefine H5_SIZEOF_SIZE_T @H5_SIZEOF_SIZE_T@ @@ -614,8 +615,17 @@ /* The size of `long', as computed by sizeof. */ #cmakedefine H5_SIZEOF_LONG @H5_SIZEOF_LONG@ +/* The size of `long double', as computed by sizeof. */ +#cmakedefine H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@ + #else - # if defined(__LP64__) && __LP64__ + + /* On Apple, to support Universal Binaries (where multiple CPU + architectures exist in one library/executable), we can't assume + the machine doing the compiling has the same endianness or type + sizes as all the various architectures (PowerPC, Intel, ARM). */ + + # if defined(__LP64__) && __LP64__ #define H5_SIZEOF_LONG 8 #define H5_SIZEOF_SIZE_T 8 #define H5_SIZEOF_SSIZE_T 8 @@ -625,10 +635,15 @@ #define H5_SIZEOF_SSIZE_T 4 # endif -#endif + # if defined(__i386__) || defined(__x86_64__) + #define H5_SIZEOF_LONG_DOUBLE 16 + # elif defined(__aarch64__) + #define H5_SIZEOF_LONG_DOUBLE 8 + # else + #cmakedefine H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@ + # endif -/* The size of `long double', as computed by sizeof. */ -#cmakedefine H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@ +#endif /* Define size of long long and/or __int64 bit integer type only if the type exists. */ diff --git a/hl/examples/ex_ds1.c b/hl/examples/ex_ds1.c index af8b58155c3..09f398bd98a 100644 --- a/hl/examples/ex_ds1.c +++ b/hl/examples/ex_ds1.c @@ -91,9 +91,11 @@ main(void) if (H5DSattach_scale(did, dsid, DIM1) < 0) goto out; - /* close DS id */ + /* close DS ids */ if (H5Dclose(dsid) < 0) goto out; + if (H5Dclose(did) < 0) + goto out; /* close file */ H5Fclose(fid); diff --git a/hl/fortran/examples/ex_ds1.f90 b/hl/fortran/examples/ex_ds1.f90 index b31ac8eba52..3e0048ad555 100644 --- a/hl/fortran/examples/ex_ds1.f90 +++ b/hl/fortran/examples/ex_ds1.f90 @@ -180,8 +180,9 @@ PROGRAM example_ds WRITE(*,'(/,5X,A,I0,2A,/)') 'Dimension Scale Label for dimension ', DIM2, ' is ... ', label(1:label_len) - ! close DS id + ! close DS ids CALL H5Dclose_f(dsid, err) + CALL H5Dclose_f(did, err) ! close file CALL H5Fclose_f(fid, err) diff --git a/hl/src/H5LTanalyze.c b/hl/src/H5LTanalyze.c index 4adf3d3a407..3c6983a347f 100644 --- a/hl/src/H5LTanalyze.c +++ b/hl/src/H5LTanalyze.c @@ -2,7 +2,6 @@ #if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402 #pragma GCC diagnostic ignored "-Wconversion" #pragma GCC diagnostic ignored "-Wimplicit-function-declaration" -#pragma GCC diagnostic ignored "-Wlarger-than=" #pragma GCC diagnostic ignored "-Wmissing-prototypes" #pragma GCC diagnostic ignored "-Wnested-externs" #pragma GCC diagnostic ignored "-Wold-style-definition" @@ -11,8 +10,11 @@ #pragma GCC diagnostic ignored "-Wsign-conversion" #pragma GCC diagnostic ignored "-Wstrict-overflow" #pragma GCC diagnostic ignored "-Wstrict-prototypes" +#if !defined (__clang__) +#pragma GCC diagnostic ignored "-Wlarger-than=" #pragma GCC diagnostic ignored "-Wsuggest-attribute=const" #pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" +#endif #pragma GCC diagnostic ignored "-Wswitch-default" #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-macros" diff --git a/hl/src/H5LTparse.c b/hl/src/H5LTparse.c index 80de0a2fb76..2ef133f5a45 100644 --- a/hl/src/H5LTparse.c +++ b/hl/src/H5LTparse.c @@ -2,7 +2,6 @@ #if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402 #pragma GCC diagnostic ignored "-Wconversion" #pragma GCC diagnostic ignored "-Wimplicit-function-declaration" -#pragma GCC diagnostic ignored "-Wlarger-than=" #pragma GCC diagnostic ignored "-Wmissing-prototypes" #pragma GCC diagnostic ignored "-Wnested-externs" #pragma GCC diagnostic ignored "-Wold-style-definition" @@ -11,8 +10,11 @@ #pragma GCC diagnostic ignored "-Wsign-conversion" #pragma GCC diagnostic ignored "-Wstrict-overflow" #pragma GCC diagnostic ignored "-Wstrict-prototypes" +#if !defined (__clang__) +#pragma GCC diagnostic ignored "-Wlarger-than=" #pragma GCC diagnostic ignored "-Wsuggest-attribute=const" #pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" +#endif #pragma GCC diagnostic ignored "-Wswitch-default" #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-macros" diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 56ffd274c6e..d192df5435b 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -329,7 +329,7 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, h5tools_cont * Purpose: Print some values from an attribute referenced by object reference. * * Description: - * This is a special case subfunction to dump aa attribute references. + * This is a special case subfunction to dump an attribute reference. * * Return: * The function returns False if the last dimension has been reached, otherwise True @@ -448,6 +448,9 @@ h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format if (H5Tclose(atype) < 0) H5TOOLS_ERROR(dimension_break, "H5Tclose failed"); + if (H5Sclose(region_space) < 0) + H5TOOLS_ERROR(dimension_break, "H5Tclose failed"); + ctx->indent_level--; ctx->need_prefix = TRUE; From c9734a2504f6e06dbe376d63491b8b66f76455a2 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 17 Feb 2021 06:50:28 -0600 Subject: [PATCH 17/25] fix typo --- tools/lib/h5tools_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index d192df5435b..d5a9c1dec0a 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -449,7 +449,7 @@ h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format H5TOOLS_ERROR(dimension_break, "H5Tclose failed"); if (H5Sclose(region_space) < 0) - H5TOOLS_ERROR(dimension_break, "H5Tclose failed"); + H5TOOLS_ERROR(dimension_break, "H5Sclose failed"); ctx->indent_level--; ctx->need_prefix = TRUE; From be2c50ac78fd80d74b230ff369b14b9d50364085 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 18 Feb 2021 11:50:09 -0600 Subject: [PATCH 18/25] Minor non-space formatting changes --- release_docs/RELEASE.txt | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 2f5cd86645f..313d5644635 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -3,6 +3,7 @@ HDF5 version 1.12.1-4 currently under development INTRODUCTION +============ This document describes the new features introduced in the HDF5 1.12.0 release. It contains information on the platforms tested and known problems in this @@ -276,7 +277,7 @@ New Features (QAK - 2020/03/25) Java Library: - ---------------- + ------------- - Added new H5S functions. H5Sselect_copy, H5Sselect_shape_same, H5Sselect_adjust, @@ -309,12 +310,12 @@ New Features (ADB - 2020/08/05, HDFFV-9984) -Support for new platforms, languages and compilers. -======================================= +Support for new platforms, languages and compilers +================================================== - Bug Fixes since HDF5-1.12.0 release -================================== +=================================== Library ------- - Fixed problems with vlens and refs inside compound using @@ -408,8 +409,16 @@ Bug Fixes since HDF5-1.12.0 release (QAK - 2020/05/07) - Java Library: - ---------------- + Java Library + ------------ + - JNI utility function does not handle new references. + + The JNI utility function for converting reference data to string did + not use the new APIs. In addition to fixing that function, added new + java tests for using the new APIs. + + (ADB - 2021/02/16, HDFFV-11212) + - The H5FArray.java class, in which virtually the entire execution time is spent using the HDFNativeData method that converts from an array of bytes to an array of the destination Java type. @@ -477,8 +486,8 @@ Bug Fixes since HDF5-1.12.0 release (QAK - 2020/06/05) - Fortran High-Level APIs: - ------ + Fortran High-Level APIs + ----------------------- - From c2e100b9f1d0d34e95c8d8b24aa989bb21ad37ed Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 26 Feb 2021 09:07:35 -0600 Subject: [PATCH 19/25] GH #386 copyright corrections for java folder --- MANIFEST | 3 + configure.ac | 47 +- java/Makefile.am | 1 - java/examples/Makefile.am | 1 - java/examples/datasets/H5Ex_D_Alloc.java | 11 +- java/examples/datasets/H5Ex_D_Checksum.java | 15 +- java/examples/datasets/H5Ex_D_Chunk.java | 17 +- java/examples/datasets/H5Ex_D_Compact.java | 17 +- java/examples/datasets/H5Ex_D_External.java | 15 +- java/examples/datasets/H5Ex_D_FillValue.java | 9 +- java/examples/datasets/H5Ex_D_Gzip.java | 15 +- java/examples/datasets/H5Ex_D_Hyperslab.java | 15 +- java/examples/datasets/H5Ex_D_Nbit.java | 17 +- java/examples/datasets/H5Ex_D_ReadWrite.java | 11 +- java/examples/datasets/H5Ex_D_Shuffle.java | 15 +- java/examples/datasets/H5Ex_D_Sofloat.java | 15 +- java/examples/datasets/H5Ex_D_Soint.java | 15 +- java/examples/datasets/H5Ex_D_Szip.java | 15 +- java/examples/datasets/H5Ex_D_Transform.java | 15 +- .../datasets/H5Ex_D_UnlimitedAdd.java | 21 +- .../datasets/H5Ex_D_UnlimitedGzip.java | 23 +- .../datasets/H5Ex_D_UnlimitedMod.java | 21 +- .../datasets/JavaDatasetExample.sh.in | 1 - java/examples/datasets/Makefile.am | 1 - java/examples/datatypes/H5Ex_T_Array.java | 19 +- .../datatypes/H5Ex_T_ArrayAttribute.java | 25 +- java/examples/datatypes/H5Ex_T_Bit.java | 13 +- .../datatypes/H5Ex_T_BitAttribute.java | 19 +- java/examples/datatypes/H5Ex_T_Commit.java | 13 +- java/examples/datatypes/H5Ex_T_Compound.java | 23 +- .../datatypes/H5Ex_T_CompoundAttribute.java | 29 +- java/examples/datatypes/H5Ex_T_Float.java | 13 +- .../datatypes/H5Ex_T_FloatAttribute.java | 19 +- java/examples/datatypes/H5Ex_T_Integer.java | 13 +- .../datatypes/H5Ex_T_IntegerAttribute.java | 19 +- .../datatypes/H5Ex_T_ObjectReference.java | 25 +- .../H5Ex_T_ObjectReferenceAttribute.java | 29 +- java/examples/datatypes/H5Ex_T_Opaque.java | 19 +- .../datatypes/H5Ex_T_OpaqueAttribute.java | 23 +- java/examples/datatypes/H5Ex_T_String.java | 21 +- .../datatypes/H5Ex_T_StringAttribute.java | 27 +- java/examples/datatypes/H5Ex_T_VLString.java | 15 +- .../datatypes/JavaDatatypeExample.sh.in | 1 - java/examples/datatypes/Makefile.am | 1 - java/examples/groups/H5Ex_G_Compact.java | 7 +- java/examples/groups/H5Ex_G_Corder.java | 9 +- java/examples/groups/H5Ex_G_Create.java | 5 +- java/examples/groups/H5Ex_G_Intermediate.java | 7 +- java/examples/groups/H5Ex_G_Iterate.java | 3 +- java/examples/groups/H5Ex_G_Phase.java | 11 +- java/examples/groups/H5Ex_G_Traverse.java | 3 +- java/examples/groups/H5Ex_G_Visit.java | 3 +- java/examples/groups/JavaGroupExample.sh.in | 1 - java/examples/groups/Makefile.am | 1 - java/examples/intro/H5_CreateAttribute.java | 9 +- java/examples/intro/H5_CreateDataset.java | 7 +- java/examples/intro/H5_CreateFile.java | 3 +- java/examples/intro/H5_CreateGroup.java | 5 +- .../intro/H5_CreateGroupAbsoluteRelative.java | 9 +- .../examples/intro/H5_CreateGroupDataset.java | 17 +- java/examples/intro/H5_ReadWrite.java | 7 +- java/examples/intro/JavaIntroExample.sh.in | 1 - java/examples/intro/Makefile.am | 1 - java/src/Makefile.am | 1 - java/src/hdf/hdf5lib/HDF5Constants.java | 5 + java/src/hdf/hdf5lib/HDF5GroupInfo.java | 9 +- java/src/hdf/hdf5lib/HDFArray.java | 513 +++++------- java/src/hdf/hdf5lib/callbacks/Callbacks.java | 1 - .../hdf/hdf5lib/callbacks/H5A_iterate_cb.java | 1 - .../hdf/hdf5lib/callbacks/H5A_iterate_t.java | 1 - .../hdf/hdf5lib/callbacks/H5D_append_cb.java | 1 - .../hdf/hdf5lib/callbacks/H5D_append_t.java | 1 - .../hdf/hdf5lib/callbacks/H5D_iterate_cb.java | 1 - .../hdf/hdf5lib/callbacks/H5D_iterate_t.java | 1 - .../hdf/hdf5lib/callbacks/H5E_walk_cb.java | 1 - .../src/hdf/hdf5lib/callbacks/H5E_walk_t.java | 1 - .../callbacks/H5L_iterate_opdata_t.java | 1 - .../hdf/hdf5lib/callbacks/H5L_iterate_t.java | 1 - .../callbacks/H5O_iterate_opdata_t.java | 1 - .../hdf/hdf5lib/callbacks/H5O_iterate_t.java | 1 - .../callbacks/H5P_cls_close_func_cb.java | 1 - .../callbacks/H5P_cls_close_func_t.java | 1 - .../callbacks/H5P_cls_copy_func_cb.java | 1 - .../callbacks/H5P_cls_copy_func_t.java | 1 - .../callbacks/H5P_cls_create_func_cb.java | 1 - .../callbacks/H5P_cls_create_func_t.java | 1 - .../hdf/hdf5lib/callbacks/H5P_iterate_cb.java | 1 - .../hdf/hdf5lib/callbacks/H5P_iterate_t.java | 1 - .../callbacks/H5P_prp_close_func_cb.java | 1 - .../callbacks/H5P_prp_compare_func_cb.java | 1 - .../callbacks/H5P_prp_copy_func_cb.java | 1 - .../callbacks/H5P_prp_create_func_cb.java | 1 - .../callbacks/H5P_prp_delete_func_cb.java | 1 - .../callbacks/H5P_prp_get_func_cb.java | 1 - .../callbacks/H5P_prp_set_func_cb.java | 1 - .../hdf5lib/structs/H5AC_cache_config_t.java | 1 - java/src/hdf/hdf5lib/structs/H5A_info_t.java | 13 +- .../src/hdf/hdf5lib/structs/H5E_error2_t.java | 1 - java/src/hdf/hdf5lib/structs/H5F_info2_t.java | 1 - java/src/hdf/hdf5lib/structs/H5G_info_t.java | 1 - java/src/hdf/hdf5lib/structs/H5L_info_t.java | 1 - .../hdf/hdf5lib/structs/H5O_hdr_info_t.java | 1 - java/src/hdf/hdf5lib/structs/H5O_info_t.java | 1 - .../hdf5lib/structs/H5O_native_info_t.java | 1 - .../src/hdf/hdf5lib/structs/H5_ih_info_t.java | 1 - java/src/jni/Makefile.am | 1 - java/src/jni/exceptionImp.h | 1 - java/src/jni/h5Constants.c | 8 +- java/src/jni/h5Imp.h | 1 - java/src/jni/h5aImp.c | 4 +- java/src/jni/h5aImp.h | 1 - java/src/jni/h5dImp.c | 5 +- java/src/jni/h5dImp.h | 1 - java/src/jni/h5eImp.c | 1 - java/src/jni/h5eImp.h | 1 - java/src/jni/h5fImp.h | 1 - java/src/jni/h5gImp.h | 1 - java/src/jni/h5iImp.h | 1 - java/src/jni/h5jni.h | 1 - java/src/jni/h5lImp.c | 1 - java/src/jni/h5lImp.h | 1 - java/src/jni/h5oImp.c | 1 - java/src/jni/h5oImp.h | 1 - java/src/jni/h5pACPLImp.c | 1 - java/src/jni/h5pACPLImp.h | 1 - java/src/jni/h5pDAPLImp.c | 1 - java/src/jni/h5pDAPLImp.h | 1 - java/src/jni/h5pDCPLImp.c | 1 - java/src/jni/h5pDCPLImp.h | 1 - java/src/jni/h5pDXPLImp.c | 1 - java/src/jni/h5pDXPLImp.h | 1 - java/src/jni/h5pFAPLImp.c | 1 - java/src/jni/h5pFAPLImp.h | 1 - java/src/jni/h5pFCPLImp.c | 1 - java/src/jni/h5pFCPLImp.h | 1 - java/src/jni/h5pGAPLImp.c | 1 - java/src/jni/h5pGAPLImp.h | 1 - java/src/jni/h5pGCPLImp.c | 1 - java/src/jni/h5pGCPLImp.h | 1 - java/src/jni/h5pImp.h | 1 - java/src/jni/h5pLAPLImp.c | 1 - java/src/jni/h5pLAPLImp.h | 1 - java/src/jni/h5pLCPLImp.c | 1 - java/src/jni/h5pLCPLImp.h | 1 - java/src/jni/h5pOCPLImp.c | 1 - java/src/jni/h5pOCPLImp.h | 1 - java/src/jni/h5pOCpyPLImp.c | 1 - java/src/jni/h5pOCpyPLImp.h | 1 - java/src/jni/h5pStrCPLImp.c | 1 - java/src/jni/h5pStrCPLImp.h | 1 - java/src/jni/h5plImp.c | 1 - java/src/jni/h5plImp.h | 1 - java/src/jni/h5rImp.h | 1 - java/src/jni/h5sImp.h | 1 - java/src/jni/h5tImp.h | 1 - java/src/jni/h5util.c | 747 +++++++++--------- java/src/jni/h5util.h | 6 +- java/src/jni/h5vlImp.c | 1 - java/src/jni/h5vlImp.h | 1 - java/src/jni/h5zImp.h | 1 - java/src/jni/nativeData.h | 1 - java/test/CMakeLists.txt | 5 + java/test/Makefile.am | 2 +- java/test/TestH5.java | 155 +++- java/test/TestH5A.java | 115 ++- java/test/TestH5D.java | 41 +- java/test/TestH5Dparams.java | 1 - java/test/TestH5Dplist.java | 9 +- java/test/TestH5E.java | 1 - java/test/TestH5Edefault.java | 85 +- java/test/TestH5Eparams.java | 1 - java/test/TestH5Eregister.java | 1 - java/test/TestH5F.java | 19 +- java/test/TestH5Fbasic.java | 17 +- java/test/TestH5Fparams.java | 13 +- java/test/TestH5Fswmr.java | 13 +- java/test/TestH5G.java | 31 +- java/test/TestH5Gbasic.java | 17 +- java/test/TestH5Giterate.java | 7 +- java/test/TestH5Lbasic.java | 3 +- java/test/TestH5Lcreate.java | 19 +- java/test/TestH5Lparams.java | 1 - java/test/TestH5Obasic.java | 55 +- java/test/TestH5Ocopy.java | 41 +- java/test/TestH5Ocreate.java | 27 +- java/test/TestH5Oparams.java | 1 - java/test/TestH5P.java | 31 +- java/test/TestH5PData.java | 11 +- java/test/TestH5PL.java | 11 +- java/test/TestH5Pfapl.java | 29 +- java/test/TestH5Pfaplhdfs.java | 11 +- java/test/TestH5Pfapls3.java | 11 +- java/test/TestH5Plist.java | 33 +- java/test/TestH5Pvirtual.java | 27 +- java/test/TestH5R.java | 118 +-- java/test/TestH5Rref.java | 562 +++++++++++++ java/test/TestH5S.java | 21 +- java/test/TestH5Sbasic.java | 25 +- java/test/TestH5T.java | 23 +- java/test/TestH5Tbasic.java | 13 +- java/test/TestH5Tparams.java | 1 - java/test/TestH5VL.java | 53 +- java/test/TestH5Z.java | 1 - java/test/junit.sh.in | 29 +- java/test/testfiles/JUnit-TestH5.txt | 4 +- java/test/testfiles/JUnit-TestH5Rref.txt | 10 + test/use_common.c | 4 +- tools/lib/h5diff_array.c | 96 ++- tools/lib/h5tools.c | 2 +- tools/lib/h5tools_str.c | 2 +- tools/lib/h5tools_utils.c | 6 +- tools/src/h5diff/h5diff_common.c | 36 +- tools/src/h5import/h5import.c | 4 +- tools/src/h5ls/h5ls.c | 7 +- tools/src/h5repack/h5repack_copy.c | 8 +- tools/src/h5repack/h5repack_verify.c | 6 +- tools/src/misc/h5debug.c | 4 +- tools/src/misc/h5repart.c | 2 +- tools/test/h5diff/testfiles/h5diff_10.txt | 12 + tools/test/h5diff/testfiles/h5diff_600.txt | 12 + tools/test/h5diff/testfiles/h5diff_603.txt | 12 + tools/test/h5diff/testfiles/h5diff_606.txt | 12 + tools/test/h5diff/testfiles/h5diff_612.txt | 12 + tools/test/h5diff/testfiles/h5diff_615.txt | 12 + tools/test/h5diff/testfiles/h5diff_621.txt | 12 + tools/test/h5diff/testfiles/h5diff_622.txt | 12 + tools/test/h5diff/testfiles/h5diff_623.txt | 12 + tools/test/h5diff/testfiles/h5diff_624.txt | 12 + tools/test/h5dump/CMakeTests.cmake | 8 +- tools/test/h5dump/h5dumpgentest.c | 52 ++ tools/test/h5dump/testh5dump.sh.in | 6 +- tools/testfiles/tldouble.ddl | 11 + 232 files changed, 2459 insertions(+), 1829 deletions(-) create mode 100644 java/test/TestH5Rref.java create mode 100644 java/test/testfiles/JUnit-TestH5Rref.txt create mode 100644 tools/testfiles/tldouble.ddl diff --git a/MANIFEST b/MANIFEST index 7f9aca17c30..f907988e47f 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2007,6 +2007,7 @@ ./tools/testfiles/tintsnodata.h5 ./tools/testfiles/tlarge_objname.ddl ./tools/testfiles/tlarge_objname.h5 +./tools/testfiles/tldouble.ddl ./tools/testfiles/tldouble.h5 ./tools/testfiles/tlonglinks.ddl ./tools/testfiles/tlonglinks.h5 @@ -3416,6 +3417,7 @@ ./java/test/testfiles/JUnit-TestH5Pvirtual.txt ./java/test/testfiles/JUnit-TestH5PL.txt ./java/test/testfiles/JUnit-TestH5R.txt +./java/test/testfiles/JUnit-TestH5Rref.txt ./java/test/testfiles/JUnit-TestH5Sbasic.txt ./java/test/testfiles/JUnit-TestH5S.txt ./java/test/testfiles/JUnit-TestH5Tparams.txt @@ -3456,6 +3458,7 @@ ./java/test/TestH5Pvirtual.java ./java/test/TestH5PL.java ./java/test/TestH5R.java +./java/test/TestH5Rref.java ./java/test/TestH5Sbasic.java ./java/test/TestH5S.java ./java/test/TestH5Tparams.java diff --git a/configure.ac b/configure.ac index 56d4c2a3af1..61a9e371be3 100644 --- a/configure.ac +++ b/configure.ac @@ -37,14 +37,42 @@ AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign subdir-objects]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) # use silent rules where available - automake 1.11 -## AM_MAINTAINER_MODE turns off "rebuild rules" that contain dependencies -## for Makefiles, configure, src/H5config.h, etc. If AM_MAINTAINER_MODE -## is enabled, these files will be rebuilt if out of date. This is a -## problem because if users try to build on a machine with -## the wrong versions of autoconf and automake, these files will be -## rebuilt with the wrong versions and bad things can happen. -## Also, CVS doesn't preserve dependencies between timestamps, so -## Makefiles will often think rebuilding needs to occur when it doesn't. +## AM_MAINTAINER_MODE determines the behavior of "rebuild rules" that contain +## dependencies for Makefile.in files, configure, src/H5config.h, etc. If +## AM_MAINTAINER_MODE is enabled, these files will be rebuilt if out of date. +## When disabled, the autotools build files can get out of sync and the build +## system will not complain or try to regenerate downstream files. +## +## The AM_MAINTAINER_MODE macro also determines whether the +## --(enable|disable)-maintainer-mode configure option is available. When the +## macro is present, with or without a parameter, the option will be added +## to the generated configure script. +## +## In summary: +## +## AM_MAINTAINER_MODE([enable]) +## - Build dependencies ON by default +## - Configure option exists +## +## AM_MAINTAINER_MODE([disable]) +## - Build dependencies OFF by default +## - Configure option exists +## +## AM_MAINTAINER_MODE +## - Build dependencies OFF by default +## - Configure option exists +## +## No AM_MAINTAINER_MODE macro +## - Build dependencies ON by default +## - No configure option to control build dependencies +## +## The biggest concern for us is that version control systems like git +## usually don't preserve dependencies between timestamps, so the build +## system will often think that upstream build files like Makefile.am are +## dirty and that rebuilding needs to occur when it doesn't. This is a problem +## in release branches where we provide the autotools-generated files. Users +## who don't have autoconf, automake, etc. will then have difficulty building +## release branches checked out from git. ## ## By default, it is enabled. Users can configure with ## --disable-maintainer-mode to prevent running the autotools. @@ -3264,6 +3292,9 @@ if test "x$HAVE_LIBHDFS" = "xyes"; then [Proceed to build with libhdfs]) fi +## Read-only HDFS files are not built if not required. +AM_CONDITIONAL([HDFS_VFD_CONDITIONAL], [test "X$HAVE_LIBHDFS" = "Xyes"]) + ## Checkpoint the cache AC_CACHE_SAVE diff --git a/java/Makefile.am b/java/Makefile.am index abc7f1dda34..1ca32482e94 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -1,6 +1,5 @@ # # 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 diff --git a/java/examples/Makefile.am b/java/examples/Makefile.am index c499bd56d26..eb7b7f5862d 100644 --- a/java/examples/Makefile.am +++ b/java/examples/Makefile.am @@ -1,6 +1,5 @@ # # 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 diff --git a/java/examples/datasets/H5Ex_D_Alloc.java b/java/examples/datasets/H5Ex_D_Alloc.java index dd7e7ae5024..4e10c23b530 100644 --- a/java/examples/datasets/H5Ex_D_Alloc.java +++ b/java/examples/datasets/H5Ex_D_Alloc.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -65,11 +64,11 @@ public static H5D_space_status get(int code) { } private static void allocation() { - long file_id = -1; - long filespace_id = -1; - long dataset_id1 = -1; - long dataset_id2 = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id1 = HDF5Constants.H5I_INVALID_HID; + long dataset_id2 = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; int space_status = 0; diff --git a/java/examples/datasets/H5Ex_D_Checksum.java b/java/examples/datasets/H5Ex_D_Checksum.java index 9dcfdb34d12..781dd686cb3 100644 --- a/java/examples/datasets/H5Ex_D_Checksum.java +++ b/java/examples/datasets/H5Ex_D_Checksum.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -93,10 +92,10 @@ private static boolean checkFletcher32Filter() { } private static void writeChecksum() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -193,9 +192,9 @@ private static void writeChecksum() { } private static void readChecksum() { - long file_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file. diff --git a/java/examples/datasets/H5Ex_D_Chunk.java b/java/examples/datasets/H5Ex_D_Chunk.java index 3afa53c4216..2ddf2935624 100644 --- a/java/examples/datasets/H5Ex_D_Chunk.java +++ b/java/examples/datasets/H5Ex_D_Chunk.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -66,10 +65,10 @@ public static H5D_layout get(int code) { } private static void writeChunk() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -201,10 +200,10 @@ private static void writeChunk() { } private static void readChunk() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file. diff --git a/java/examples/datasets/H5Ex_D_Compact.java b/java/examples/datasets/H5Ex_D_Compact.java index 347c05c8240..0abf8da2474 100644 --- a/java/examples/datasets/H5Ex_D_Compact.java +++ b/java/examples/datasets/H5Ex_D_Compact.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -60,10 +59,10 @@ public static H5D_layout get(int code) { } private static void writeCompact() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -163,10 +162,10 @@ private static void writeCompact() { } private static void readCompact() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open file and dataset using the default properties. diff --git a/java/examples/datasets/H5Ex_D_External.java b/java/examples/datasets/H5Ex_D_External.java index 5cf03afe9de..9c3787f213a 100644 --- a/java/examples/datasets/H5Ex_D_External.java +++ b/java/examples/datasets/H5Ex_D_External.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -34,10 +33,10 @@ public class H5Ex_D_External { private static final int NAME_BUF_SIZE = 32; private static void writeExternal() { - long file_id = -1; - long dcpl_id = -1; - long filespace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -138,9 +137,9 @@ private static void writeExternal() { } private static void readExternal() { - long file_id = -1; - long dcpl_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; String[] Xname = new String[1]; diff --git a/java/examples/datasets/H5Ex_D_FillValue.java b/java/examples/datasets/H5Ex_D_FillValue.java index a19c0267d1a..3526993e7fd 100644 --- a/java/examples/datasets/H5Ex_D_FillValue.java +++ b/java/examples/datasets/H5Ex_D_FillValue.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -40,10 +39,10 @@ public class H5Ex_D_FillValue { private static final int FILLVAL = 99; private static void fillValue() { - long file_id = -1; - long dcpl_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] extdims = { EDIM_X, EDIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; diff --git a/java/examples/datasets/H5Ex_D_Gzip.java b/java/examples/datasets/H5Ex_D_Gzip.java index 67d15bb54f5..404ff051915 100644 --- a/java/examples/datasets/H5Ex_D_Gzip.java +++ b/java/examples/datasets/H5Ex_D_Gzip.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -95,10 +94,10 @@ private static boolean checkGzipFilter() { } private static void writeGzip() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -196,9 +195,9 @@ private static void writeGzip() { } private static void readGzip() { - long file_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file. diff --git a/java/examples/datasets/H5Ex_D_Hyperslab.java b/java/examples/datasets/H5Ex_D_Hyperslab.java index 57dfa6a8270..fa3473f3366 100644 --- a/java/examples/datasets/H5Ex_D_Hyperslab.java +++ b/java/examples/datasets/H5Ex_D_Hyperslab.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -34,9 +33,9 @@ public class H5Ex_D_Hyperslab { private static final int RANK = 2; private static void writeHyperslab() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -142,10 +141,10 @@ private static void writeHyperslab() { } private static void readHyperslab() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file. diff --git a/java/examples/datasets/H5Ex_D_Nbit.java b/java/examples/datasets/H5Ex_D_Nbit.java index d995a0281c0..35d23a989cc 100644 --- a/java/examples/datasets/H5Ex_D_Nbit.java +++ b/java/examples/datasets/H5Ex_D_Nbit.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -96,11 +95,11 @@ private static boolean checkNbitFilter() { } private static void writeData() throws Exception { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dtype_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dtype_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -157,9 +156,9 @@ private static void writeData() throws Exception { } private static void readData() throws Exception { - long file_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file. diff --git a/java/examples/datasets/H5Ex_D_ReadWrite.java b/java/examples/datasets/H5Ex_D_ReadWrite.java index 3f6e9ac8883..db930d39352 100644 --- a/java/examples/datasets/H5Ex_D_ReadWrite.java +++ b/java/examples/datasets/H5Ex_D_ReadWrite.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -32,9 +31,9 @@ public class H5Ex_D_ReadWrite { private static final int RANK = 2; private static void WriteDataset() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -109,8 +108,8 @@ private static void WriteDataset() { } private static void ReadDataset() { - long file_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open file using the default properties. diff --git a/java/examples/datasets/H5Ex_D_Shuffle.java b/java/examples/datasets/H5Ex_D_Shuffle.java index 9677e75acd1..1dd7c6a6423 100644 --- a/java/examples/datasets/H5Ex_D_Shuffle.java +++ b/java/examples/datasets/H5Ex_D_Shuffle.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -122,10 +121,10 @@ private static boolean checkShuffleFilter() { } private static void writeShuffle() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -229,9 +228,9 @@ private static void writeShuffle() { } private static void readShuffle() { - long file_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file. diff --git a/java/examples/datasets/H5Ex_D_Sofloat.java b/java/examples/datasets/H5Ex_D_Sofloat.java index 58183718a85..a42aba40f5f 100644 --- a/java/examples/datasets/H5Ex_D_Sofloat.java +++ b/java/examples/datasets/H5Ex_D_Sofloat.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -96,10 +95,10 @@ private static boolean checkScaleoffsetFilter() { } private static void writeData() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; double[][] dset_data = new double[DIM_X][DIM_Y]; @@ -213,9 +212,9 @@ private static void writeData() { } private static void readData() { - long file_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; double[][] dset_data = new double[DIM_X][DIM_Y]; // Open file using the default properties. diff --git a/java/examples/datasets/H5Ex_D_Soint.java b/java/examples/datasets/H5Ex_D_Soint.java index 3f5f1702923..dd7664fcbab 100644 --- a/java/examples/datasets/H5Ex_D_Soint.java +++ b/java/examples/datasets/H5Ex_D_Soint.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -96,10 +95,10 @@ private static boolean checkScaleoffsetFilter() { } private static void writeData() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -195,9 +194,9 @@ private static void writeData() { } private static void readData() { - long file_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open file using the default properties. diff --git a/java/examples/datasets/H5Ex_D_Szip.java b/java/examples/datasets/H5Ex_D_Szip.java index 57ba873531f..3fdc71252b3 100644 --- a/java/examples/datasets/H5Ex_D_Szip.java +++ b/java/examples/datasets/H5Ex_D_Szip.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -95,10 +94,10 @@ private static boolean checkSzipFilter() { } private static void writeSzip() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -196,9 +195,9 @@ private static void writeSzip() { } private static void readSzip() { - long file_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file. diff --git a/java/examples/datasets/H5Ex_D_Transform.java b/java/examples/datasets/H5Ex_D_Transform.java index 04bfa2e8dc0..069e80be94c 100644 --- a/java/examples/datasets/H5Ex_D_Transform.java +++ b/java/examples/datasets/H5Ex_D_Transform.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -36,10 +35,10 @@ public class H5Ex_D_Transform { private static String RTRANSFORM = "x-1"; private static void writeData() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dxpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dxpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -144,9 +143,9 @@ private static void writeData() { private static void readData() { - long file_id = -1; - long dataset_id = -1; - long dxpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dxpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file using the default properties. diff --git a/java/examples/datasets/H5Ex_D_UnlimitedAdd.java b/java/examples/datasets/H5Ex_D_UnlimitedAdd.java index 925023acca7..c82b2d62319 100644 --- a/java/examples/datasets/H5Ex_D_UnlimitedAdd.java +++ b/java/examples/datasets/H5Ex_D_UnlimitedAdd.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -39,10 +38,10 @@ public class H5Ex_D_UnlimitedAdd { private static final int NDIMS = 2; private static void writeUnlimited() { - long file_id = -1; - long dcpl_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; long[] maxdims = { HDF5Constants.H5S_UNLIMITED, HDF5Constants.H5S_UNLIMITED }; @@ -143,9 +142,9 @@ private static void writeUnlimited() { } private static void extendUnlimited() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] extdims = { EDIM_X, EDIM_Y }; long[] start = { 0, 0 }; @@ -293,9 +292,9 @@ private static void extendUnlimited() { } private static void readUnlimited() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data; diff --git a/java/examples/datasets/H5Ex_D_UnlimitedGzip.java b/java/examples/datasets/H5Ex_D_UnlimitedGzip.java index 40ddc608a84..675b1ba7a43 100644 --- a/java/examples/datasets/H5Ex_D_UnlimitedGzip.java +++ b/java/examples/datasets/H5Ex_D_UnlimitedGzip.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -99,10 +98,10 @@ private static boolean checkGzipFilter() { } private static void writeUnlimited() { - long file_id = -1; - long dcpl_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; long[] maxdims = { HDF5Constants.H5S_UNLIMITED, HDF5Constants.H5S_UNLIMITED }; @@ -200,9 +199,9 @@ private static void writeUnlimited() { } private static void extendUnlimited() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] extdims = { EDIM_X, EDIM_Y }; long[] start = { 0, 0 }; @@ -350,10 +349,10 @@ private static void extendUnlimited() { } private static void readUnlimited() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data; diff --git a/java/examples/datasets/H5Ex_D_UnlimitedMod.java b/java/examples/datasets/H5Ex_D_UnlimitedMod.java index 0476bc1f259..273ac3e141d 100644 --- a/java/examples/datasets/H5Ex_D_UnlimitedMod.java +++ b/java/examples/datasets/H5Ex_D_UnlimitedMod.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -39,10 +38,10 @@ public class H5Ex_D_UnlimitedMod { private static final int NDIMS = 2; private static void writeUnlimited() { - long file_id = -1; - long dcpl_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; long[] maxdims = { HDF5Constants.H5S_UNLIMITED, HDF5Constants.H5S_UNLIMITED }; @@ -143,9 +142,9 @@ private static void writeUnlimited() { } private static void extendUnlimited() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] extdims = { EDIM_X, EDIM_Y }; int[][] dset_data; @@ -279,9 +278,9 @@ private static void extendUnlimited() { } private static void readUnlimited() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data; diff --git a/java/examples/datasets/JavaDatasetExample.sh.in b/java/examples/datasets/JavaDatasetExample.sh.in index 4604a44f6d7..f29739ac5e5 100644 --- a/java/examples/datasets/JavaDatasetExample.sh.in +++ b/java/examples/datasets/JavaDatasetExample.sh.in @@ -1,7 +1,6 @@ #! /bin/sh # # 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 diff --git a/java/examples/datasets/Makefile.am b/java/examples/datasets/Makefile.am index 8357614ebb5..41a914b612e 100644 --- a/java/examples/datasets/Makefile.am +++ b/java/examples/datasets/Makefile.am @@ -1,6 +1,5 @@ # # 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 diff --git a/java/examples/datatypes/H5Ex_T_Array.java b/java/examples/datatypes/H5Ex_T_Array.java index 30eb360cc69..3939b384795 100644 --- a/java/examples/datatypes/H5Ex_T_Array.java +++ b/java/examples/datatypes/H5Ex_T_Array.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -34,11 +33,11 @@ public class H5Ex_T_Array { private static final int NDIMS = 2; private static void CreateDataset() { - long file_id = -1; - long filetype_id = -1; - long memtype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; long[] adims = { ADIM0, ADIM1 }; int[][][] dset_data = new int[DIM0][ADIM0][ADIM1]; @@ -152,10 +151,10 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long filetype_id = -1; - long memtype_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; long[] adims = { ADIM0, ADIM1 }; int[][][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_ArrayAttribute.java b/java/examples/datatypes/H5Ex_T_ArrayAttribute.java index 26d7fb6ba76..c4c4bc482f1 100644 --- a/java/examples/datatypes/H5Ex_T_ArrayAttribute.java +++ b/java/examples/datatypes/H5Ex_T_ArrayAttribute.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -35,12 +34,12 @@ public class H5Ex_T_ArrayAttribute { private static final int NDIMS = 2; private static void CreateDataset() { - long file_id = -1; - long filetype_id = -1; - long memtype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; long[] adims = { ADIM0, ADIM1 }; int[][][] dset_data = new int[DIM0][ADIM0][ADIM1]; @@ -84,7 +83,7 @@ private static void CreateDataset() { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -175,11 +174,11 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long filetype_id = -1; - long memtype_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; long[] adims = { ADIM0, ADIM1 }; int[][][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_Bit.java b/java/examples/datatypes/H5Ex_T_Bit.java index 30acda4e338..45d4e8a15c9 100644 --- a/java/examples/datatypes/H5Ex_T_Bit.java +++ b/java/examples/datatypes/H5Ex_T_Bit.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -32,9 +31,9 @@ public class H5Ex_T_Bit { private static final int RANK = 2; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data = new int[DIM0][DIM1]; @@ -116,9 +115,9 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_BitAttribute.java b/java/examples/datatypes/H5Ex_T_BitAttribute.java index 2059dd5e623..9b33ca58668 100644 --- a/java/examples/datatypes/H5Ex_T_BitAttribute.java +++ b/java/examples/datatypes/H5Ex_T_BitAttribute.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -33,10 +32,10 @@ public class H5Ex_T_BitAttribute { private static final int RANK = 2; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data = new int[DIM0][DIM1]; @@ -66,7 +65,7 @@ private static void CreateDataset() { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -139,10 +138,10 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_Commit.java b/java/examples/datatypes/H5Ex_T_Commit.java index 35caa6b816e..62db5ea0db4 100644 --- a/java/examples/datatypes/H5Ex_T_Commit.java +++ b/java/examples/datatypes/H5Ex_T_Commit.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -101,9 +100,9 @@ static int getOffset(int memberItem) { } private static void CreateDataType() { - long file_id = -1; - long strtype_id = -1; - long filetype_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long strtype_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; Sensor_Datatype datatypes = new Sensor_Datatype(); // Create a new file using default properties. try { @@ -183,9 +182,9 @@ private static void CreateDataType() { } private static void ReadDataType() { - long file_id = -1; - long typeclass_id = -1; - long filetype_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long typeclass_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; // Open an existing file. try { diff --git a/java/examples/datatypes/H5Ex_T_Compound.java b/java/examples/datatypes/H5Ex_T_Compound.java index 61e79c7de73..8c83ebbb775 100644 --- a/java/examples/datatypes/H5Ex_T_Compound.java +++ b/java/examples/datatypes/H5Ex_T_Compound.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -122,12 +121,12 @@ public String toString() { } private static void CreateDataset() { - long file_id = -1; - long strtype_id = -1; - long memtype_id = -1; - long filetype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long strtype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; Sensor[] object_data = new Sensor[DIM0]; byte[] dset_data = null; @@ -286,11 +285,11 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long strtype_id = -1; - long memtype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long strtype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; Sensor[] object_data2; byte[] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_CompoundAttribute.java b/java/examples/datatypes/H5Ex_T_CompoundAttribute.java index 4294b4adc42..58d2fb79e6f 100644 --- a/java/examples/datatypes/H5Ex_T_CompoundAttribute.java +++ b/java/examples/datatypes/H5Ex_T_CompoundAttribute.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -125,13 +124,13 @@ public String toString() { } private static void CreateDataset() { - long file_id = -1; - long strtype_id = -1; - long memtype_id = -1; - long filetype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long strtype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; Sensor[] object_data = new Sensor[DIM0]; byte[] dset_data = null; @@ -205,7 +204,7 @@ private static void CreateDataset() { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -310,12 +309,12 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long strtype_id = -1; - long memtype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long strtype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; Sensor[] object_data2; byte[] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_Float.java b/java/examples/datatypes/H5Ex_T_Float.java index e469d63e918..e8da7f65982 100644 --- a/java/examples/datatypes/H5Ex_T_Float.java +++ b/java/examples/datatypes/H5Ex_T_Float.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -36,9 +35,9 @@ public class H5Ex_T_Float { private static final int RANK = 2; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; double[][] dset_data = new double[DIM0][DIM1]; @@ -120,9 +119,9 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; double[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_FloatAttribute.java b/java/examples/datatypes/H5Ex_T_FloatAttribute.java index b6c92be8075..eb8e1f83136 100644 --- a/java/examples/datatypes/H5Ex_T_FloatAttribute.java +++ b/java/examples/datatypes/H5Ex_T_FloatAttribute.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -37,10 +36,10 @@ public class H5Ex_T_FloatAttribute { private static final int RANK = 2; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; double[][] dset_data = new double[DIM0][DIM1]; @@ -66,7 +65,7 @@ private static void CreateDataset() { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -139,10 +138,10 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; double[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_Integer.java b/java/examples/datatypes/H5Ex_T_Integer.java index f0b3755c047..bb8e0cb99e3 100644 --- a/java/examples/datatypes/H5Ex_T_Integer.java +++ b/java/examples/datatypes/H5Ex_T_Integer.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -34,9 +33,9 @@ public class H5Ex_T_Integer { private static final int RANK = 2; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data = new int[DIM0][DIM1]; @@ -117,9 +116,9 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_IntegerAttribute.java b/java/examples/datatypes/H5Ex_T_IntegerAttribute.java index 8c85c63be12..b0df5e46f8a 100644 --- a/java/examples/datatypes/H5Ex_T_IntegerAttribute.java +++ b/java/examples/datatypes/H5Ex_T_IntegerAttribute.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -35,10 +34,10 @@ public class H5Ex_T_IntegerAttribute { private static final int RANK = 2; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data = new int[DIM0][DIM1]; @@ -64,7 +63,7 @@ private static void CreateDataset() { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -137,10 +136,10 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_ObjectReference.java b/java/examples/datatypes/H5Ex_T_ObjectReference.java index 97f02af3e71..38536b858c7 100644 --- a/java/examples/datatypes/H5Ex_T_ObjectReference.java +++ b/java/examples/datatypes/H5Ex_T_ObjectReference.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -65,11 +64,11 @@ public static H5G_obj get(int code) { } private static void writeObjRef() { - long file_id = -1; - long dataspace_id = -1; - long filespace_id = -1; - long group_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[][] dset_data = new byte[DIM0][8]; @@ -90,9 +89,9 @@ private static void writeObjRef() { HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); if (dataset_id >= 0) H5.H5Dclose(dataset_id); - dataset_id = -1; + dataset_id = HDF5Constants.H5I_INVALID_HID; H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -106,7 +105,7 @@ private static void writeObjRef() { HDF5Constants.H5P_DEFAULT); if (group_id >= 0) H5.H5Gclose(group_id); - group_id = -1; + group_id = HDF5Constants.H5I_INVALID_HID; } catch (Exception e) { e.printStackTrace(); @@ -187,11 +186,11 @@ private static void writeObjRef() { } private static void readObjRef() { - long file_id = -1; - long dataset_id = -1; - long dataspace_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; int object_type = -1; - long object_id = -1; + long object_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java b/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java index b1cab7c54e7..b38b0a09f0a 100644 --- a/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java +++ b/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -67,11 +66,11 @@ public static H5G_obj get(int code) { } private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long group_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[][] dset_data = new byte[DIM0][8]; @@ -92,9 +91,9 @@ private static void CreateDataset() { HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); if (dataset_id >= 0) H5.H5Dclose(dataset_id); - dataset_id = -1; + dataset_id = HDF5Constants.H5I_INVALID_HID; H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -108,7 +107,7 @@ private static void CreateDataset() { HDF5Constants.H5P_DEFAULT); if (group_id >= 0) H5.H5Gclose(group_id); - group_id = -1; + group_id = HDF5Constants.H5I_INVALID_HID; } catch (Exception e) { e.printStackTrace(); @@ -139,7 +138,7 @@ private static void CreateDataset() { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -212,12 +211,12 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; int object_type = -1; - long object_id = -1; + long object_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_Opaque.java b/java/examples/datatypes/H5Ex_T_Opaque.java index 1d9ab1bfda7..e851fb256e1 100644 --- a/java/examples/datatypes/H5Ex_T_Opaque.java +++ b/java/examples/datatypes/H5Ex_T_Opaque.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -32,10 +31,10 @@ public class H5Ex_T_Opaque { private static final int RANK = 1; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long datatype_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long datatype_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[] dset_data = new byte[DIM0 * LEN]; byte[] str_data = { 'O', 'P', 'A', 'Q', 'U', 'E' }; @@ -138,11 +137,11 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long datatype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long type_len = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long datatype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long type_len = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[] dset_data; String tag_name = null; diff --git a/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java b/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java index 8955d77541f..3e16ab49b82 100644 --- a/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java +++ b/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -33,11 +32,11 @@ public class H5Ex_T_OpaqueAttribute { private static final int RANK = 1; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long datatype_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long datatype_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[] dset_data = new byte[DIM0 * LEN]; byte[] str_data = { 'O', 'P', 'A', 'Q', 'U', 'E' }; @@ -65,7 +64,7 @@ private static void CreateDataset() { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -158,11 +157,11 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long datatype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long datatype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long type_len = -1; long[] dims = { DIM0 }; byte[] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_String.java b/java/examples/datatypes/H5Ex_T_String.java index f91d8661711..e497bd8fc0a 100644 --- a/java/examples/datatypes/H5Ex_T_String.java +++ b/java/examples/datatypes/H5Ex_T_String.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -32,11 +31,11 @@ public class H5Ex_T_String { private static final int RANK = 1; private static void CreateDataset() { - long file_id = -1; - long memtype_id = -1; - long filetype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[][] dset_data = new byte[DIM0][SDIM]; StringBuffer[] str_data = { new StringBuffer("Parting"), new StringBuffer("is such"), @@ -156,11 +155,11 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long filetype_id = -1; - long memtype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long sdim = 0; long[] dims = { DIM0 }; byte[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_StringAttribute.java b/java/examples/datatypes/H5Ex_T_StringAttribute.java index 7fe46c8d132..700f6a90d57 100644 --- a/java/examples/datatypes/H5Ex_T_StringAttribute.java +++ b/java/examples/datatypes/H5Ex_T_StringAttribute.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -33,12 +32,12 @@ public class H5Ex_T_StringAttribute { private static final int RANK = 1; private static void CreateDataset() { - long file_id = -1; - long memtype_id = -1; - long filetype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[][] dset_data = new byte[DIM0][SDIM]; StringBuffer[] str_data = { new StringBuffer("Parting"), new StringBuffer("is such"), @@ -80,7 +79,7 @@ private static void CreateDataset() { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -179,12 +178,12 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long filetype_id = -1; - long memtype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long sdim = 0; long[] dims = { DIM0 }; byte[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_VLString.java b/java/examples/datatypes/H5Ex_T_VLString.java index e1c9bd55b4d..8a29e60f2ff 100644 --- a/java/examples/datatypes/H5Ex_T_VLString.java +++ b/java/examples/datatypes/H5Ex_T_VLString.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -26,10 +25,10 @@ public class H5Ex_T_VLString private static String DATASETNAME = "DS1"; private static void createDataset() { - long file_id = -1; - long type_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long type_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; int rank = 1; String[] str_data = { "Parting", "is such", "sweet", "sorrow." }; long[] dims = { str_data.length }; @@ -93,9 +92,9 @@ private static void createDataset() { } private static void readDataset() { - long file_id = -1; - long type_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long type_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; String[] str_data = { "", "", "", "" }; try { diff --git a/java/examples/datatypes/JavaDatatypeExample.sh.in b/java/examples/datatypes/JavaDatatypeExample.sh.in index d48d5dedfec..e26d8c0af57 100644 --- a/java/examples/datatypes/JavaDatatypeExample.sh.in +++ b/java/examples/datatypes/JavaDatatypeExample.sh.in @@ -1,7 +1,6 @@ #! /bin/sh # # 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 diff --git a/java/examples/datatypes/Makefile.am b/java/examples/datatypes/Makefile.am index 26f64cb4939..90790f79406 100644 --- a/java/examples/datatypes/Makefile.am +++ b/java/examples/datatypes/Makefile.am @@ -1,6 +1,5 @@ # # 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 diff --git a/java/examples/groups/H5Ex_G_Compact.java b/java/examples/groups/H5Ex_G_Compact.java index 6078c6c7828..313c9c7e468 100644 --- a/java/examples/groups/H5Ex_G_Compact.java +++ b/java/examples/groups/H5Ex_G_Compact.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -60,9 +59,9 @@ public static H5G_storage get(int code) { } public static void CreateGroup() { - long file_id = -1; - long group_id = -1; - long fapl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; + long fapl_id = HDF5Constants.H5I_INVALID_HID; H5G_info_t ginfo; long size; diff --git a/java/examples/groups/H5Ex_G_Corder.java b/java/examples/groups/H5Ex_G_Corder.java index 74f70ba6eb8..5df850ec6f1 100644 --- a/java/examples/groups/H5Ex_G_Corder.java +++ b/java/examples/groups/H5Ex_G_Corder.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -25,10 +24,10 @@ public class H5Ex_G_Corder { private static String FILE = "H5Ex_G_Corder.h5"; private static void CreateGroup() throws Exception { - long file_id = -1; - long group_id = -1; - long subgroup_id = -1; - long gcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; + long subgroup_id = HDF5Constants.H5I_INVALID_HID; + long gcpl_id = HDF5Constants.H5I_INVALID_HID; int status; H5G_info_t ginfo; int i; diff --git a/java/examples/groups/H5Ex_G_Create.java b/java/examples/groups/H5Ex_G_Create.java index f6539875da3..93045383be8 100644 --- a/java/examples/groups/H5Ex_G_Create.java +++ b/java/examples/groups/H5Ex_G_Create.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -25,8 +24,8 @@ public class H5Ex_G_Create { private static String GROUPNAME = "G1"; private static void CreateGroup() { - long file_id = -1; - long group_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; // Create a new file using default properties. try { diff --git a/java/examples/groups/H5Ex_G_Intermediate.java b/java/examples/groups/H5Ex_G_Intermediate.java index 6109e9a04a8..ad0290c1703 100644 --- a/java/examples/groups/H5Ex_G_Intermediate.java +++ b/java/examples/groups/H5Ex_G_Intermediate.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -31,9 +30,9 @@ public class H5Ex_G_Intermediate { private void CreateGroup() throws Exception { - long file_id = -1; - long group_id = -1; - long gcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; + long gcpl_id = HDF5Constants.H5I_INVALID_HID; try { // Create a new file_id using the default properties. diff --git a/java/examples/groups/H5Ex_G_Iterate.java b/java/examples/groups/H5Ex_G_Iterate.java index 71361f87539..6caecac1e6b 100644 --- a/java/examples/groups/H5Ex_G_Iterate.java +++ b/java/examples/groups/H5Ex_G_Iterate.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -58,7 +57,7 @@ public static H5O_type get(int code) { } private static void do_iterate() { - long file_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; // Open a file using default properties. try { diff --git a/java/examples/groups/H5Ex_G_Phase.java b/java/examples/groups/H5Ex_G_Phase.java index 78241233573..67a2f53d1e5 100644 --- a/java/examples/groups/H5Ex_G_Phase.java +++ b/java/examples/groups/H5Ex_G_Phase.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -60,11 +59,11 @@ public static H5G_storage get(int code) { } private static void CreateGroup() { - long file_id = -1; - long group_id = -1; - long subgroup_id = -1; - long fapl_id = -1; - long gcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; + long subgroup_id = HDF5Constants.H5I_INVALID_HID; + long fapl_id = HDF5Constants.H5I_INVALID_HID; + long gcpl_id = HDF5Constants.H5I_INVALID_HID; H5G_info_t ginfo; String name = "G0"; // Name of subgroup_id int i; diff --git a/java/examples/groups/H5Ex_G_Traverse.java b/java/examples/groups/H5Ex_G_Traverse.java index 76ed6c8e95a..c5b637342cc 100644 --- a/java/examples/groups/H5Ex_G_Traverse.java +++ b/java/examples/groups/H5Ex_G_Traverse.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -43,7 +42,7 @@ public class H5Ex_G_Traverse { public static H5L_iterate_t iter_cb = new H5L_iter_callbackT(); private static void OpenGroup() { - long file_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; H5O_info_t infobuf; opdata od = new opdata(); diff --git a/java/examples/groups/H5Ex_G_Visit.java b/java/examples/groups/H5Ex_G_Visit.java index c4792599865..790be80c41b 100644 --- a/java/examples/groups/H5Ex_G_Visit.java +++ b/java/examples/groups/H5Ex_G_Visit.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -47,7 +46,7 @@ public static void main(String[] args) { private void VisitGroup() throws Exception { - long file_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; try { // Open file diff --git a/java/examples/groups/JavaGroupExample.sh.in b/java/examples/groups/JavaGroupExample.sh.in index 798117686c0..3b0e9d137a9 100644 --- a/java/examples/groups/JavaGroupExample.sh.in +++ b/java/examples/groups/JavaGroupExample.sh.in @@ -1,7 +1,6 @@ #! /bin/sh # # 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 diff --git a/java/examples/groups/Makefile.am b/java/examples/groups/Makefile.am index 85badb3f0ee..bfde9aeb6e8 100644 --- a/java/examples/groups/Makefile.am +++ b/java/examples/groups/Makefile.am @@ -1,6 +1,5 @@ # # 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 diff --git a/java/examples/intro/H5_CreateAttribute.java b/java/examples/intro/H5_CreateAttribute.java index 22b03ad2e0d..949a7701a05 100644 --- a/java/examples/intro/H5_CreateAttribute.java +++ b/java/examples/intro/H5_CreateAttribute.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -28,10 +27,10 @@ public class H5_CreateAttribute { private static String DATASETATTRIBUTE = "Units"; private static void CreateDatasetAttribute() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims1 = { DIM_X, DIM_Y }; long[] dims = { 2 }; int[] attr_data = { 100, 200 }; diff --git a/java/examples/intro/H5_CreateDataset.java b/java/examples/intro/H5_CreateDataset.java index 7b56e830229..f938be20d63 100644 --- a/java/examples/intro/H5_CreateDataset.java +++ b/java/examples/intro/H5_CreateDataset.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -27,9 +26,9 @@ public class H5_CreateDataset { private static final int DIM_Y = 6; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; // Create a new file using default properties. diff --git a/java/examples/intro/H5_CreateFile.java b/java/examples/intro/H5_CreateFile.java index 367e61f30e7..d48ba6ccce7 100644 --- a/java/examples/intro/H5_CreateFile.java +++ b/java/examples/intro/H5_CreateFile.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -24,7 +23,7 @@ public class H5_CreateFile { static final String FILENAME = "H5_CreateFile.h5"; private static void CreateFile() { - long file_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; // Create a new file using default properties. try { diff --git a/java/examples/intro/H5_CreateGroup.java b/java/examples/intro/H5_CreateGroup.java index 54f6252691d..c0bb954a984 100644 --- a/java/examples/intro/H5_CreateGroup.java +++ b/java/examples/intro/H5_CreateGroup.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -25,8 +24,8 @@ public class H5_CreateGroup { private static String GROUPNAME = "MyGroup"; private static void CreateGroup() { - long file_id = -1; - long group_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; // Create a new file using default properties. try { diff --git a/java/examples/intro/H5_CreateGroupAbsoluteRelative.java b/java/examples/intro/H5_CreateGroupAbsoluteRelative.java index b9c35d7e89b..f2c6168df10 100644 --- a/java/examples/intro/H5_CreateGroupAbsoluteRelative.java +++ b/java/examples/intro/H5_CreateGroupAbsoluteRelative.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -27,10 +26,10 @@ public class H5_CreateGroupAbsoluteRelative { private static String GROUPNAME_B = "GroupB"; private static void CreateGroupAbsoluteAndRelative() { - long file_id = -1; - long group1_id = -1; - long group2_id = -1; - long group3_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long group1_id = HDF5Constants.H5I_INVALID_HID; + long group2_id = HDF5Constants.H5I_INVALID_HID; + long group3_id = HDF5Constants.H5I_INVALID_HID; // Create a new file using default properties. try { diff --git a/java/examples/intro/H5_CreateGroupDataset.java b/java/examples/intro/H5_CreateGroupDataset.java index 191a21a0f09..f1d1cbaef95 100644 --- a/java/examples/intro/H5_CreateGroupDataset.java +++ b/java/examples/intro/H5_CreateGroupDataset.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -32,12 +31,12 @@ public class H5_CreateGroupDataset { private static final int DIM2_Y = 10; private static void h5_crtgrpd() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long group_id = -1; - long group1_id = -1; - long group2_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; + long group1_id = HDF5Constants.H5I_INVALID_HID; + long group2_id = HDF5Constants.H5I_INVALID_HID; int[][] dset1_data = new int[DIM1_X][DIM1_Y]; int[][] dset2_data = new int[DIM2_X][DIM2_Y]; long[] dims1 = { DIM1_X, DIM1_Y }; @@ -108,7 +107,7 @@ private static void h5_crtgrpd() { try { if (dataspace_id >= 0) H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } catch (Exception e) { e.printStackTrace(); @@ -118,7 +117,7 @@ private static void h5_crtgrpd() { try { if (dataset_id >= 0) H5.H5Dclose(dataset_id); - dataset_id = -1; + dataset_id = HDF5Constants.H5I_INVALID_HID; } catch (Exception e) { e.printStackTrace(); diff --git a/java/examples/intro/H5_ReadWrite.java b/java/examples/intro/H5_ReadWrite.java index 812ac7750be..67e1ac54394 100644 --- a/java/examples/intro/H5_ReadWrite.java +++ b/java/examples/intro/H5_ReadWrite.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -27,9 +26,9 @@ public class H5_ReadWrite { private static final int DIM_Y = 6; private static void ReadWriteDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; diff --git a/java/examples/intro/JavaIntroExample.sh.in b/java/examples/intro/JavaIntroExample.sh.in index 967768607cd..db741e55b99 100644 --- a/java/examples/intro/JavaIntroExample.sh.in +++ b/java/examples/intro/JavaIntroExample.sh.in @@ -1,7 +1,6 @@ #! /bin/sh # # 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 diff --git a/java/examples/intro/Makefile.am b/java/examples/intro/Makefile.am index 981ace0aa0f..7d1aeabc3bc 100644 --- a/java/examples/intro/Makefile.am +++ b/java/examples/intro/Makefile.am @@ -1,6 +1,5 @@ # # 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 diff --git a/java/src/Makefile.am b/java/src/Makefile.am index ce9e7dc5864..98630e6cd3c 100644 --- a/java/src/Makefile.am +++ b/java/src/Makefile.am @@ -1,6 +1,5 @@ # # 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 diff --git a/java/src/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java index 5d2e69b363f..e481c12814d 100644 --- a/java/src/hdf/hdf5lib/HDF5Constants.java +++ b/java/src/hdf/hdf5lib/HDF5Constants.java @@ -47,10 +47,15 @@ public class HDF5Constants { public static final int H5_SZIP_ALLOW_K13_OPTION_MASK = H5_SZIP_ALLOW_K13_OPTION_MASK(); /** Special parameters for szip compression */ public static final int H5_SZIP_CHIP_OPTION_MASK = H5_SZIP_CHIP_OPTION_MASK(); + /** indices on links, unknown index type */ public static final int H5_INDEX_UNKNOWN = H5_INDEX_UNKNOWN(); + /** indices on links, index on names */ public static final int H5_INDEX_NAME = H5_INDEX_NAME(); + /** indices on links, index on creation order */ public static final int H5_INDEX_CRT_ORDER = H5_INDEX_CRT_ORDER(); + /** indices on links, number of indices defined */ public static final int H5_INDEX_N = H5_INDEX_N(); + /** */ public static final int H5_ITER_UNKNOWN = H5_ITER_UNKNOWN(); public static final int H5_ITER_INC = H5_ITER_INC(); public static final int H5_ITER_DEC = H5_ITER_DEC(); diff --git a/java/src/hdf/hdf5lib/HDF5GroupInfo.java b/java/src/hdf/hdf5lib/HDF5GroupInfo.java index 44b41bb9934..e08f9919666 100644 --- a/java/src/hdf/hdf5lib/HDF5GroupInfo.java +++ b/java/src/hdf/hdf5lib/HDF5GroupInfo.java @@ -41,6 +41,8 @@ public class HDF5GroupInfo { long mtime; int linklen; + /** Container for the information reported about an HDF5 Object + * from the H5Gget_obj_info() method */ public HDF5GroupInfo() { fileno = new long[2]; objno = new long[2]; @@ -88,27 +90,32 @@ public void reset() { linklen = 0; } - /* accessors */ + /** fileno accessors */ public long[] getFileno() { return fileno; } + /** accessors */ public long[] getObjno() { return objno; } + /** accessors */ public int getType() { return type; } + /** accessors */ public int getNlink() { return nlink; } + /** accessors */ public long getMtime() { return mtime; } + /** accessors */ public int getLinklen() { return linklen; } diff --git a/java/src/hdf/hdf5lib/HDFArray.java b/java/src/hdf/hdf5lib/HDFArray.java index 789cc7cc406..385d71b3a44 100644 --- a/java/src/hdf/hdf5lib/HDFArray.java +++ b/java/src/hdf/hdf5lib/HDFArray.java @@ -11,7 +11,6 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - package hdf.hdf5lib; import hdf.hdf5lib.exceptions.HDF5Exception; @@ -21,19 +20,16 @@ /** * This is a class for handling multidimensional arrays for HDF. *

- * The purpose is to allow the storage and retrieval of arbitrary array types - * containing scientific data. + * The purpose is to allow the storage and retrieval of arbitrary array types containing scientific data. *

- * The methods support the conversion of an array to and from Java to a - * one-dimensional array of bytes suitable for I/O by the C library. + * The methods support the conversion of an array to and from Java to a one-dimensional array of bytes suitable for I/O + * by the C library. *

- * This class heavily uses the HDFNativeData class to - * convert between Java and C representations. + * This class heavily uses the HDFNativeData class to convert between + * Java and C representations. */ public class HDFArray { - private Object _theArray = null; private ArrayDescriptor _desc = null; private byte[] _barray = null; @@ -41,31 +37,27 @@ public class HDFArray { // public HDFArray() {} /** - * The input must be a Java Array (possibly multidimensional) of primitive - * numbers or sub-classes of Number. + * The input must be a Java Array (possibly multidimensional) of primitive numbers or sub-classes of Number. *

- * The input is analysed to determine the number of dimensions and size of - * each dimension, as well as the type of the elements. + * The input is analysed to determine the number of dimensions and size of each dimension, as well as the type of + * the elements. *

* The description is saved in private variables, and used to convert data. * * @param anArray - * The array object. - * + * The array object. * @exception hdf.hdf5lib.exceptions.HDF5Exception - * object is not an array. + * object is not an array. */ - public HDFArray(Object anArray) throws HDF5Exception { - + public HDFArray(Object anArray) throws HDF5Exception + { if (anArray == null) { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: array is null?: "); + HDF5JavaException ex = new HDF5JavaException("HDFArray: array is null?: "); } Class tc = anArray.getClass(); if (tc.isArray() == false) { /* exception: not an array */ - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: not an array?: "); + HDF5JavaException ex = new HDF5JavaException("HDFArray: not an array?: "); throw (ex); } _theArray = anArray; @@ -73,8 +65,7 @@ public HDFArray(Object anArray) throws HDF5Exception { /* extra error checking -- probably not needed */ if (_desc == null) { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: internal error: array description failed?: "); + HDF5JavaException ex = new HDF5JavaException("HDFArray: internal error: array description failed?: "); throw (ex); } } @@ -82,49 +73,48 @@ public HDFArray(Object anArray) throws HDF5Exception { /** * Allocate a one-dimensional array of bytes sufficient to store the array. * - * @return A one-D array of bytes, filled with zeroes. The bytes are - * sufficient to hold the data of the Array passed to the - * constructor. + * @return A one-D array of bytes, filled with zeroes. The bytes are sufficient to hold the data of the Array passed + * to the constructor. * @exception hdf.hdf5lib.exceptions.HDF5JavaException - * Allocation failed. + * Allocation failed. */ - public byte[] emptyBytes() throws HDF5JavaException { + public byte[] emptyBytes() + throws HDF5JavaException + { byte[] b = null; - if ((ArrayDescriptor.dims == 1) && (ArrayDescriptor.NT == 'B')) { + if ((ArrayDescriptor.dims == 1) + && (ArrayDescriptor.NT == 'B')) { b = (byte[]) _theArray; } else { b = new byte[ArrayDescriptor.totalSize]; } if (b == null) { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: emptyBytes: allocation failed"); + HDF5JavaException ex = new HDF5JavaException("HDFArray: emptyBytes: allocation failed"); throw (ex); } return (b); } /** - * Given a Java array of numbers, convert it to a one-dimensional array of - * bytes in correct native order. + * Given a Java array of numbers, convert it to a one-dimensional array of bytes in correct native order. * - * @return A one-D array of bytes, constructed from the Array passed to the - * constructor. + * @return A one-D array of bytes, constructed from the Array passed to the constructor. * @exception hdf.hdf5lib.exceptions.HDF5JavaException - * the object not an array or other internal error. + * the object not an array or other internal error. */ - public byte[] byteify() throws HDF5JavaException { - + public byte[] byteify() + throws HDF5JavaException + { if (_barray != null) { return _barray; } if (_theArray == null) { /* exception: not an array */ - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: byteify not an array?: "); + HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify not an array?: "); throw (ex); } @@ -141,73 +131,53 @@ public byte[] byteify() throws HDF5JavaException { byte[] therow; if (ArrayDescriptor.NT == 'I') { - therow = HDFNativeData.intToByte(0, - ArrayDescriptor.dimlen[1], (int[]) _theArray); + therow = HDFNativeData.intToByte(0, ArrayDescriptor.dimlen[1], (int[]) _theArray); } else if (ArrayDescriptor.NT == 'S') { - therow = HDFNativeData.shortToByte(0, - ArrayDescriptor.dimlen[1], (short[]) _theArray); + therow = HDFNativeData.shortToByte(0, ArrayDescriptor.dimlen[1], (short[]) _theArray); } else if (ArrayDescriptor.NT == 'F') { - therow = HDFNativeData.floatToByte(0, - ArrayDescriptor.dimlen[1], (float[]) _theArray); + therow = HDFNativeData.floatToByte(0, ArrayDescriptor.dimlen[1], (float[]) _theArray); } else if (ArrayDescriptor.NT == 'J') { - therow = HDFNativeData.longToByte(0, - ArrayDescriptor.dimlen[1], (long[]) _theArray); + therow = HDFNativeData.longToByte(0, ArrayDescriptor.dimlen[1], (long[]) _theArray); } else if (ArrayDescriptor.NT == 'D') { - therow = HDFNativeData - .doubleToByte(0, ArrayDescriptor.dimlen[1], - (double[]) _theArray); + therow = HDFNativeData.doubleToByte(0, ArrayDescriptor.dimlen[1], (double[]) _theArray); } else if (ArrayDescriptor.NT == 'L') { if (ArrayDescriptor.className.equals("java.lang.Byte")) { therow = ByteObjToByte((Byte[]) _theArray); } - else if (ArrayDescriptor.className - .equals("java.lang.Integer")) { + else if (ArrayDescriptor.className.equals("java.lang.Integer")) { therow = IntegerToByte((Integer[]) _theArray); } - else if (ArrayDescriptor.className - .equals("java.lang.Short")) { + else if (ArrayDescriptor.className.equals("java.lang.Short")) { therow = ShortToByte((Short[]) _theArray); } - else if (ArrayDescriptor.className - .equals("java.lang.Float")) { + else if (ArrayDescriptor.className.equals("java.lang.Float")) { therow = FloatObjToByte((Float[]) _theArray); } - else if (ArrayDescriptor.className - .equals("java.lang.Double")) { + else if (ArrayDescriptor.className.equals("java.lang.Double")) { therow = DoubleObjToByte((Double[]) _theArray); } - else if (ArrayDescriptor.className - .equals("java.lang.Long")) { + else if (ArrayDescriptor.className.equals("java.lang.Long")) { therow = LongObjToByte((Long[]) _theArray); } else { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: unknown type of Object?"); + HDF5JavaException ex = new HDF5JavaException("HDFArray: unknown type of Object?"); throw (ex); } } else { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: unknown type of data?"); + HDF5JavaException ex = new HDF5JavaException("HDFArray: unknown type of data?"); throw (ex); } - System - .arraycopy( - therow, - 0, - _barray, - 0, - (ArrayDescriptor.dimlen[1] * ArrayDescriptor.NTsize)); + System.arraycopy(therow, 0, _barray, 0, (ArrayDescriptor.dimlen[1] * ArrayDescriptor.NTsize)); return _barray; } catch (OutOfMemoryError err) { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: byteify array too big?"); + HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify array too big?"); throw (ex); } } @@ -217,8 +187,7 @@ else if (ArrayDescriptor.className _barray = new byte[ArrayDescriptor.totalSize]; } catch (OutOfMemoryError err) { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: byteify array too big?"); + HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify array too big?"); throw (ex); } @@ -241,8 +210,7 @@ else if (ArrayDescriptor.className else { /* check range of index */ if (index > (ArrayDescriptor.dimlen[i] - 1)) { - throw new java.lang.IndexOutOfBoundsException( - "HDFArray: byteify index OOB?"); + throw new java.lang.IndexOutOfBoundsException("HDFArray: byteify index OOB?"); } oo = java.lang.reflect.Array.get(oo, index); ArrayDescriptor.currentindex[i] = index; @@ -254,144 +222,107 @@ else if (ArrayDescriptor.className byte arow[]; try { if (ArrayDescriptor.NT == 'J') { - arow = HDFNativeData - .longToByte( - 0, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - (long[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); - arow = HDFNativeData - .longToByte( - 0, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - (long[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); + arow = HDFNativeData.longToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims], + (long[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); + arow = HDFNativeData.longToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims], + (long[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } else if (ArrayDescriptor.NT == 'I') { - arow = HDFNativeData - .intToByte( - 0, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - (int[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); + arow = HDFNativeData.intToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims], + (int[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } else if (ArrayDescriptor.NT == 'S') { - arow = HDFNativeData - .shortToByte( - 0, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - (short[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); + arow = HDFNativeData.shortToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims], + (short[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } else if (ArrayDescriptor.NT == 'B') { arow = (byte[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]; } else if (ArrayDescriptor.NT == 'F') { /* 32 bit float */ - arow = HDFNativeData - .floatToByte( - 0, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - (float[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); + arow = HDFNativeData.floatToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims], + (float[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } else if (ArrayDescriptor.NT == 'D') { /* 64 bit float */ - arow = HDFNativeData - .doubleToByte( - 0, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - (double[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); + arow = HDFNativeData.doubleToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims], + (double[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } else if (ArrayDescriptor.NT == 'L') { if (ArrayDescriptor.className.equals("java.lang.Byte")) { arow = ByteObjToByte((Byte[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } - else if (ArrayDescriptor.className - .equals("java.lang.Integer")) { + else if (ArrayDescriptor.className.equals("java.lang.Integer")) { arow = IntegerToByte((Integer[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } - else if (ArrayDescriptor.className - .equals("java.lang.Short")) { + else if (ArrayDescriptor.className.equals("java.lang.Short")) { arow = ShortToByte((Short[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } - else if (ArrayDescriptor.className - .equals("java.lang.Float")) { + else if (ArrayDescriptor.className.equals("java.lang.Float")) { arow = FloatObjToByte((Float[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } - else if (ArrayDescriptor.className - .equals("java.lang.Double")) { + else if (ArrayDescriptor.className.equals("java.lang.Double")) { arow = DoubleObjToByte((Double[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } else if (ArrayDescriptor.className.equals("java.lang.Long")) { arow = LongObjToByte((Long[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } else { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: byteify Object type not implemented?"); + HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify Object type not implemented?"); throw (ex); } } else { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: byteify unknown type not implemented?"); + HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify unknown type not implemented?"); throw (ex); } - System - .arraycopy( - arow, - 0, - _barray, - n, - (ArrayDescriptor.dimlen[ArrayDescriptor.dims] * ArrayDescriptor.NTsize)); + System.arraycopy(arow, 0, _barray, n, + (ArrayDescriptor.dimlen[ArrayDescriptor.dims] * ArrayDescriptor.NTsize)); n += ArrayDescriptor.bytetoindex[ArrayDescriptor.dims - 1]; } catch (OutOfMemoryError err) { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: byteify array too big?"); + HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify array too big?"); throw (ex); } } /* assert: the whole array is completed--currentindex should == len - 1 */ - /* error checks */ - if (n < ArrayDescriptor.totalSize) { - throw new java.lang.InternalError(new String( - "HDFArray::byteify: Panic didn't complete all input data: n= " - + n + " size = " + ArrayDescriptor.totalSize)); + throw new java.lang.InternalError(new String("HDFArray::byteify: Panic didn't complete all input data: n= " + + n + " size = " + ArrayDescriptor.totalSize)); } for (i = 0; i < ArrayDescriptor.dims; i++) { if (ArrayDescriptor.currentindex[i] != ArrayDescriptor.dimlen[i] - 1) { throw new java.lang.InternalError(new String( - "Panic didn't complete all data: currentindex[" + i - + "] = " + ArrayDescriptor.currentindex[i] - + " (should be " - + (ArrayDescriptor.dimlen[i] - 1) + " ?)")); + "Panic didn't complete all data: currentindex[" + i + "] = " + ArrayDescriptor.currentindex[i] + + " (should be " + (ArrayDescriptor.dimlen[i] - 1) + " ?)")); } } return _barray; } /** - * Given a one-dimensional array of bytes representing numbers, convert it - * to a java array of the shape and size passed to the constructor. + * Given a one-dimensional array of bytes representing numbers, convert it to a java array of the shape and size + * passed to the constructor. * * @param bytes - * The bytes to construct the Array. - * @return An Array (possibly multidimensional) of primitive or number - * objects. - * @exception hdf.hdf5lib.exceptions.HDF5JavaException - * the object not an array or other internal error. + * The bytes to construct the Array. + * @return + * An Array (possibly multidimensional) of primitive or number objects. + * @exception + * hdf.hdf5lib.exceptions.HDF5JavaException the object not an array or other internal error. */ - public Object arrayify(byte[] bytes) throws HDF5JavaException { - + public Object arrayify(byte[] bytes) throws HDF5JavaException + { if (_theArray == null) { /* exception: not an array */ - HDF5JavaException ex = new HDF5JavaException( - "arrayify: not an array?: "); + HDF5JavaException ex = new HDF5JavaException("arrayify: not an array?: "); throw (ex); } if (java.lang.reflect.Array.getLength(bytes) != ArrayDescriptor.totalSize) { /* exception: array not right size */ - HDF5JavaException ex = new HDF5JavaException( - "arrayify: array is wrong size?: "); + HDF5JavaException ex = new HDF5JavaException("arrayify: array is wrong size?: "); throw (ex); } _barray = bytes; /* hope that the bytes are correct.... */ @@ -402,95 +333,76 @@ public Object arrayify(byte[] bytes) throws HDF5JavaException { try { if (ArrayDescriptor.NT == 'I') { int[] x = HDFNativeData.byteToInt(_barray); - System.arraycopy(x, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(x, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } else if (ArrayDescriptor.NT == 'S') { short[] x = HDFNativeData.byteToShort(_barray); - System.arraycopy(x, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(x, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } else if (ArrayDescriptor.NT == 'F') { float x[] = HDFNativeData.byteToFloat(_barray); - System.arraycopy(x, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(x, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } else if (ArrayDescriptor.NT == 'J') { long x[] = HDFNativeData.byteToLong(_barray); - System.arraycopy(x, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(x, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } else if (ArrayDescriptor.NT == 'D') { double x[] = HDFNativeData.byteToDouble(_barray); - System.arraycopy(x, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(x, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } else if (ArrayDescriptor.NT == 'B') { - System.arraycopy(_barray, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(_barray, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } else if (ArrayDescriptor.NT == 'L') { if (ArrayDescriptor.className.equals("java.lang.Byte")) { Byte I[] = ByteToByteObj(_barray); - System.arraycopy(I, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(I, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } - else if (ArrayDescriptor.className - .equals("java.lang.Integer")) { + else if (ArrayDescriptor.className.equals("java.lang.Integer")) { Integer I[] = ByteToInteger(_barray); - System.arraycopy(I, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(I, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } - else if (ArrayDescriptor.className - .equals("java.lang.Short")) { + else if (ArrayDescriptor.className.equals("java.lang.Short")) { Short I[] = ByteToShort(_barray); - System.arraycopy(I, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(I, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } - else if (ArrayDescriptor.className - .equals("java.lang.Float")) { + else if (ArrayDescriptor.className.equals("java.lang.Float")) { Float I[] = ByteToFloatObj(_barray); - System.arraycopy(I, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(I, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } - else if (ArrayDescriptor.className - .equals("java.lang.Double")) { + else if (ArrayDescriptor.className.equals("java.lang.Double")) { Double I[] = ByteToDoubleObj(_barray); - System.arraycopy(I, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(I, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } else if (ArrayDescriptor.className.equals("java.lang.Long")) { Long I[] = ByteToLongObj(_barray); - System.arraycopy(I, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(I, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } else { - HDF5JavaException ex = new HDF5JavaException( - "arrayify: Object type not implemented yet..."); + HDF5JavaException ex = new HDF5JavaException("arrayify: Object type not implemented yet..."); throw (ex); } } else { - HDF5JavaException ex = new HDF5JavaException( - "arrayify: unknown type not implemented yet..."); + HDF5JavaException ex = new HDF5JavaException("arrayify: unknown type not implemented yet..."); throw (ex); } } catch (OutOfMemoryError err) { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: arrayify array too big?"); + HDF5JavaException ex = new HDF5JavaException("HDFArray: arrayify array too big?"); throw (ex); } } @@ -502,6 +414,7 @@ else if (ArrayDescriptor.className.equals("java.lang.Long")) { int index = 0; int i; Object flattenedArray = null; + switch (ArrayDescriptor.NT) { case 'J': flattenedArray = (Object) HDFNativeData.byteToLong(_barray); @@ -522,36 +435,27 @@ else if (ArrayDescriptor.className.equals("java.lang.Long")) { flattenedArray = (Object) _barray; break; case 'L': - switch (ArrayDescriptor.className) { - case "java.lang.Byte": - flattenedArray = (Object) ByteToByteObj(_barray); - break; - case "java.lang.Short": - flattenedArray = (Object) ByteToShort(_barray); - break; - case "java.lang.Integer": - flattenedArray = (Object) ByteToInteger(_barray); - break; - case "java.lang.Long": - flattenedArray = (Object) ByteToLongObj(_barray); - break; - case "java.lang.Float": - flattenedArray = (Object) ByteToFloatObj(_barray); - break; - case "java.lang.Double": - flattenedArray = (Object) ByteToDoubleObj(_barray); - break; - default: - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: unsupported Object type: " - + ArrayDescriptor.NT); - throw (ex); - } // end of switch statement for arrays of boxed objects - default: - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: unknown or unsupported type: " - + ArrayDescriptor.NT); - throw (ex); + { + if (ArrayDescriptor.className.equals("java.lang.Byte")) + flattenedArray = (Object) ByteToByteObj(_barray); + else if (ArrayDescriptor.className.equals("java.lang.Short")) + flattenedArray = (Object) ByteToShort(_barray); + else if (ArrayDescriptor.className.equals("java.lang.Integer")) + flattenedArray = (Object) ByteToInteger(_barray); + else if (ArrayDescriptor.className.equals("java.lang.Long")) + flattenedArray = (Object) ByteToLongObj(_barray); + else if (ArrayDescriptor.className.equals("java.lang.Float")) + flattenedArray = (Object) ByteToFloatObj(_barray); + else if (ArrayDescriptor.className.equals("java.lang.Double")) + flattenedArray = (Object) ByteToDoubleObj(_barray); + else { + HDF5JavaException ex = new HDF5JavaException("HDFArray: unsupported Object type: " + ArrayDescriptor.NT); + throw (ex); + } + } // end of statement for arrays of boxed objects + default: + HDF5JavaException ex = new HDF5JavaException("HDFArray: unknown or unsupported type: " + ArrayDescriptor.NT); + throw (ex); } // end of switch statement for arrays of primitives while (n < ArrayDescriptor.totalSize) { @@ -580,7 +484,6 @@ else if (ArrayDescriptor.className.equals("java.lang.Long")) { /* array-ify */ try { - Object arow = null; int mm = m + ArrayDescriptor.dimlen[ArrayDescriptor.dims]; switch (ArrayDescriptor.NT) { @@ -603,75 +506,64 @@ else if (ArrayDescriptor.className.equals("java.lang.Long")) { arow = (Object) Arrays.copyOfRange((double[]) flattenedArray, m, mm); break; case 'L': - switch (ArrayDescriptor.className) { - case "java.lang.Byte": - arow = (Object) Arrays.copyOfRange((Byte[])flattenedArray, m, mm); - break; - case "java.lang.Short": - arow = (Object) Arrays.copyOfRange((Short[])flattenedArray, m, mm); - break; - case "java.lang.Integer": - arow = (Object) Arrays.copyOfRange((Integer[])flattenedArray, m, mm); - break; - case "java.lang.Long": - arow = (Object) Arrays.copyOfRange((Long[])flattenedArray, m, mm); - break; - case "java.lang.Float": - arow = (Object) Arrays.copyOfRange((Float[])flattenedArray, m, mm); - break; - case "java.lang.Double": - arow = (Object) Arrays.copyOfRange((Double[])flattenedArray, m, mm); - break; - } // end of switch statement for arrays of boxed numerics + { + if (ArrayDescriptor.className.equals("java.lang.Byte")) + arow = (Object) Arrays.copyOfRange((Byte[]) flattenedArray, m, mm); + else if (ArrayDescriptor.className.equals("java.lang.Short")) + arow = (Object) Arrays.copyOfRange((Short[]) flattenedArray, m, mm); + else if (ArrayDescriptor.className.equals("java.lang.Integer")) + arow = (Object) Arrays.copyOfRange((Integer[]) flattenedArray, m, mm); + else if (ArrayDescriptor.className.equals("java.lang.Long")) + arow = (Object) Arrays.copyOfRange((Long[]) flattenedArray, m, mm); + else if (ArrayDescriptor.className.equals("java.lang.Float")) + arow = (Object) Arrays.copyOfRange((Float[]) flattenedArray, m, mm); + else if (ArrayDescriptor.className.equals("java.lang.Double")) + arow = (Object) Arrays.copyOfRange((Double[]) flattenedArray, m, mm); + else { + HDF5JavaException ex = new HDF5JavaException("HDFArray: unsupported Object type: " + ArrayDescriptor.NT); + throw (ex); + } + } // end of statement for arrays of boxed numerics } // end of switch statement for arrays of primitives - java.lang.reflect.Array.set( - ArrayDescriptor.objs[ArrayDescriptor.dims - 2], - (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]), - arow); + java.lang.reflect.Array.set(ArrayDescriptor.objs[ArrayDescriptor.dims - 2], + (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]), arow); n += ArrayDescriptor.bytetoindex[ArrayDescriptor.dims - 1]; ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]++; m = mm; } catch (OutOfMemoryError err) { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: arrayify array too big?"); + HDF5JavaException ex = new HDF5JavaException("HDFArray: arrayify array too big?"); throw (ex); } - } /* assert: the whole array is completed--currentindex should == len - 1 */ - /* error checks */ - if (n < ArrayDescriptor.totalSize) { - throw new java.lang.InternalError(new String( - "HDFArray::arrayify Panic didn't complete all input data: n= " - + n + " size = " + ArrayDescriptor.totalSize)); + throw new java.lang.InternalError(new String("HDFArray::arrayify Panic didn't complete all input data: n= " + + n + " size = " + ArrayDescriptor.totalSize)); } for (i = 0; i <= ArrayDescriptor.dims - 2; i++) { if (ArrayDescriptor.currentindex[i] != ArrayDescriptor.dimlen[i] - 1) { - throw new java.lang.InternalError(new String( - "HDFArray::arrayify Panic didn't complete all data: currentindex[" - + i + "] = " + ArrayDescriptor.currentindex[i] - + " (should be " - + (ArrayDescriptor.dimlen[i] - 1) + "?")); + throw new java.lang.InternalError( + new String("HDFArray::arrayify Panic didn't complete all data: currentindex[" + i + "] = " + + ArrayDescriptor.currentindex[i] + " (should be " + (ArrayDescriptor.dimlen[i] - 1) + + "?")); } } - if (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1] != ArrayDescriptor.dimlen[ArrayDescriptor.dims - 1]) { - throw new java.lang.InternalError(new String( - "HDFArray::arrayify Panic didn't complete all data: currentindex[" - + i + "] = " + ArrayDescriptor.currentindex[i] - + " (should be " + (ArrayDescriptor.dimlen[i]) - + "?")); + if (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1] != ArrayDescriptor.dimlen[ArrayDescriptor.dims + - 1]) { + throw new java.lang.InternalError( + new String("HDFArray::arrayify Panic didn't complete all data: currentindex[" + i + "] = " + + ArrayDescriptor.currentindex[i] + " (should be " + (ArrayDescriptor.dimlen[i]) + "?")); } - return _theArray; } - private byte[] IntegerToByte(Integer in[]) { + private byte[] IntegerToByte(Integer in[]) + { int nelems = java.lang.reflect.Array.getLength(in); int[] out = new int[nelems]; @@ -681,7 +573,8 @@ private byte[] IntegerToByte(Integer in[]) { return HDFNativeData.intToByte(0, nelems, out); } - private Integer[] ByteToInteger(byte[] bin) { + private Integer[] ByteToInteger(byte[] bin) + { int in[] = HDFNativeData.byteToInt(bin); int nelems = java.lang.reflect.Array.getLength(in); Integer[] out = new Integer[nelems]; @@ -692,7 +585,8 @@ private Integer[] ByteToInteger(byte[] bin) { return out; } - private Integer[] ByteToInteger(int start, int len, byte[] bin) { + private Integer[] ByteToInteger(int start, int len, byte[] bin) + { int in[] = HDFNativeData.byteToInt(start, len, bin); int nelems = java.lang.reflect.Array.getLength(in); Integer[] out = new Integer[nelems]; @@ -703,7 +597,8 @@ private Integer[] ByteToInteger(int start, int len, byte[] bin) { return out; } - private byte[] ShortToByte(Short in[]) { + private byte[] ShortToByte(Short in[]) + { int nelems = java.lang.reflect.Array.getLength(in); short[] out = new short[nelems]; @@ -713,7 +608,8 @@ private byte[] ShortToByte(Short in[]) { return HDFNativeData.shortToByte(0, nelems, out); } - private Short[] ByteToShort(byte[] bin) { + private Short[] ByteToShort(byte[] bin) + { short in[] = HDFNativeData.byteToShort(bin); int nelems = java.lang.reflect.Array.getLength((Object) in); Short[] out = new Short[nelems]; @@ -724,7 +620,8 @@ private Short[] ByteToShort(byte[] bin) { return out; } - private Short[] ByteToShort(int start, int len, byte[] bin) { + private Short[] ByteToShort(int start, int len, byte[] bin) + { short in[] = (short[]) HDFNativeData.byteToShort(start, len, bin); int nelems = java.lang.reflect.Array.getLength((Object) in); Short[] out = new Short[nelems]; @@ -735,7 +632,8 @@ private Short[] ByteToShort(int start, int len, byte[] bin) { return out; } - private byte[] ByteObjToByte(Byte in[]) { + private byte[] ByteObjToByte(Byte in[]) + { int nelems = java.lang.reflect.Array.getLength((Object) in); byte[] out = new byte[nelems]; @@ -745,7 +643,8 @@ private byte[] ByteObjToByte(Byte in[]) { return out; } - private Byte[] ByteToByteObj(byte[] bin) { + private Byte[] ByteToByteObj(byte[] bin) + { int nelems = java.lang.reflect.Array.getLength((Object) bin); Byte[] out = new Byte[nelems]; @@ -755,7 +654,8 @@ private Byte[] ByteToByteObj(byte[] bin) { return out; } - private Byte[] ByteToByteObj(int start, int len, byte[] bin) { + private Byte[] ByteToByteObj(int start, int len, byte[] bin) + { Byte[] out = new Byte[len]; for (int i = 0; i < len; i++) { @@ -764,7 +664,8 @@ private Byte[] ByteToByteObj(int start, int len, byte[] bin) { return out; } - private byte[] FloatObjToByte(Float in[]) { + private byte[] FloatObjToByte(Float in[]) + { int nelems = java.lang.reflect.Array.getLength((Object) in); float[] out = new float[nelems]; @@ -774,7 +675,8 @@ private byte[] FloatObjToByte(Float in[]) { return HDFNativeData.floatToByte(0, nelems, out); } - private Float[] ByteToFloatObj(byte[] bin) { + private Float[] ByteToFloatObj(byte[] bin) + { float in[] = (float[]) HDFNativeData.byteToFloat(bin); int nelems = java.lang.reflect.Array.getLength((Object) in); Float[] out = new Float[nelems]; @@ -785,7 +687,8 @@ private Float[] ByteToFloatObj(byte[] bin) { return out; } - private Float[] ByteToFloatObj(int start, int len, byte[] bin) { + private Float[] ByteToFloatObj(int start, int len, byte[] bin) + { float in[] = (float[]) HDFNativeData.byteToFloat(start, len, bin); int nelems = java.lang.reflect.Array.getLength((Object) in); Float[] out = new Float[nelems]; @@ -796,7 +699,8 @@ private Float[] ByteToFloatObj(int start, int len, byte[] bin) { return out; } - private byte[] DoubleObjToByte(Double in[]) { + private byte[] DoubleObjToByte(Double in[]) + { int nelems = java.lang.reflect.Array.getLength((Object) in); double[] out = new double[nelems]; @@ -806,7 +710,8 @@ private byte[] DoubleObjToByte(Double in[]) { return HDFNativeData.doubleToByte(0, nelems, out); } - private Double[] ByteToDoubleObj(byte[] bin) { + private Double[] ByteToDoubleObj(byte[] bin) + { double in[] = (double[]) HDFNativeData.byteToDouble(bin); int nelems = java.lang.reflect.Array.getLength((Object) in); Double[] out = new Double[nelems]; @@ -817,7 +722,8 @@ private Double[] ByteToDoubleObj(byte[] bin) { return out; } - private Double[] ByteToDoubleObj(int start, int len, byte[] bin) { + private Double[] ByteToDoubleObj(int start, int len, byte[] bin) + { double in[] = (double[]) HDFNativeData.byteToDouble(start, len, bin); int nelems = java.lang.reflect.Array.getLength((Object) in); Double[] out = new Double[nelems]; @@ -828,7 +734,8 @@ private Double[] ByteToDoubleObj(int start, int len, byte[] bin) { return out; } - private byte[] LongObjToByte(Long in[]) { + private byte[] LongObjToByte(Long in[]) + { int nelems = java.lang.reflect.Array.getLength((Object) in); long[] out = new long[nelems]; @@ -838,7 +745,8 @@ private byte[] LongObjToByte(Long in[]) { return HDFNativeData.longToByte(0, nelems, out); } - private Long[] ByteToLongObj(byte[] bin) { + private Long[] ByteToLongObj(byte[] bin) + { long in[] = (long[]) HDFNativeData.byteToLong(bin); int nelems = java.lang.reflect.Array.getLength((Object) in); Long[] out = new Long[nelems]; @@ -849,7 +757,8 @@ private Long[] ByteToLongObj(byte[] bin) { return out; } - private Long[] ByteToLongObj(int start, int len, byte[] bin) { + private Long[] ByteToLongObj(int start, int len, byte[] bin) + { long in[] = (long[]) HDFNativeData.byteToLong(start, len, bin); int nelems = java.lang.reflect.Array.getLength((Object) in); Long[] out = new Long[nelems]; @@ -862,13 +771,11 @@ private Long[] ByteToLongObj(int start, int len, byte[] bin) { } /** - * This private class is used by HDFArray to discover the shape and type of an - * arbitrary array. + * This private class is used by HDFArray to discover the shape and type of an arbitrary array. *

* We use java.lang.reflection here. */ class ArrayDescriptor { - static String theType = ""; static Class theClass = null; static int[] dimlen = null; @@ -883,13 +790,12 @@ class ArrayDescriptor { static int dims = 0; static String className; - public ArrayDescriptor(Object anArray) throws HDF5Exception { - + public ArrayDescriptor(Object anArray) throws HDF5Exception + { Class tc = anArray.getClass(); if (tc.isArray() == false) { /* exception: not an array */ - HDF5Exception ex = new HDF5JavaException( - "ArrayDescriptor: not an array?: "); + HDF5Exception ex = new HDF5JavaException("ArrayDescriptor: not an array?: "); throw (ex); } @@ -921,10 +827,12 @@ public ArrayDescriptor(Object anArray) throws HDF5Exception { else if (NT == 'S') { NTsize = 2; } - else if ((NT == 'I') || (NT == 'F')) { + else if ((NT == 'I') + || (NT == 'F')) { NTsize = 4; } - else if ((NT == 'J') || (NT == 'D')) { + else if ((NT == 'J') + || (NT == 'D')) { NTsize = 8; } else if (css.startsWith("Ljava.lang.Byte")) { @@ -961,16 +869,14 @@ else if (css.startsWith("Ljava.lang.String")) { NT = 'L'; className = "java.lang.String"; NTsize = 1; - throw new HDF5JavaException(new String( - "ArrayDesciptor: Warning: String array not fully supported yet")); + throw new HDF5JavaException(new String("ArrayDesciptor: Warning: String array not fully supported yet")); } else { /* * exception: not a numeric type */ - throw new HDF5JavaException(new String( - "ArrayDesciptor: Error: array is not numeric (type is " - + css + ") ?")); + throw new HDF5JavaException( + new String("ArrayDesciptor: Error: array is not numeric (type is " + css + ") ?")); } /* fill in the table */ @@ -1014,20 +920,19 @@ else if (css.startsWith("Ljava.lang.String")) { /** * Debug dump */ - public void dumpInfo() { + public void dumpInfo() + { System.out.println("Type: " + theType); System.out.println("Class: " + theClass); System.out.println("NT: " + NT + " NTsize: " + NTsize); - System.out.println("Array has " + dims + " dimensions (" + totalSize - + " bytes, " + totalElements + " elements)"); + System.out + .println("Array has " + dims + " dimensions (" + totalSize + " bytes, " + totalElements + " elements)"); int i; for (i = 0; i <= dims; i++) { Class tc = objs[i].getClass(); String ss = tc.toString(); - System.out.println(i + ": start " + dimstart[i] + ": len " - + dimlen[i] + " current " + currentindex[i] - + " bytetoindex " + bytetoindex[i] + " object " + objs[i] - + " otype " + ss); + System.out.println(i + ": start " + dimstart[i] + ": len " + dimlen[i] + " current " + currentindex[i] + + " bytetoindex " + bytetoindex[i] + " object " + objs[i] + " otype " + ss); } } } diff --git a/java/src/hdf/hdf5lib/callbacks/Callbacks.java b/java/src/hdf/hdf5lib/callbacks/Callbacks.java index e2033fa9a02..11fa4652d1c 100644 --- a/java/src/hdf/hdf5lib/callbacks/Callbacks.java +++ b/java/src/hdf/hdf5lib/callbacks/Callbacks.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5A_iterate_cb.java b/java/src/hdf/hdf5lib/callbacks/H5A_iterate_cb.java index d02c8d115e6..6c68f364d17 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5A_iterate_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5A_iterate_cb.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java index fb5ca270172..d612db3a2e4 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java b/java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java index 1ec3a541fc7..cf7ada6b4a0 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java b/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java index c4d88ceff24..7fdb454c038 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5D_iterate_cb.java b/java/src/hdf/hdf5lib/callbacks/H5D_iterate_cb.java index d397b2f611d..54c12e300ba 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5D_iterate_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5D_iterate_cb.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java index a852d069ffb..305cf98d6d1 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5E_walk_cb.java b/java/src/hdf/hdf5lib/callbacks/H5E_walk_cb.java index 69dce0e8290..57221954fdf 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5E_walk_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5E_walk_cb.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java b/java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java index ea115102284..5bf0c8b356e 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_opdata_t.java b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_opdata_t.java index d0c07c09891..d89fd2ab5c0 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_opdata_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_opdata_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java index a93e76d4b7e..53635bf9c89 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_opdata_t.java b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_opdata_t.java index 42d0db15e63..fd643b44a9f 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_opdata_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_opdata_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java index 3a59c6b6cd8..ecf868cbf55 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_cb.java index ad9682a7c3a..0a09a943d33 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_cb.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_t.java b/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_t.java index fd17222cd81..11e3a99f15f 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_cb.java index 36a085b2f48..53f86bea3b8 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_cb.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java b/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java index 9e1d929b296..78e52822452 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_cb.java index cf51171ffa5..8f4e78202e3 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_cb.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_t.java b/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_t.java index b7e21a1c45f..d919d97e587 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java index f9cfd99ce3d..db98a672373 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java index a591b1d5f14..0035619fdf1 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_prp_close_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_prp_close_func_cb.java index b1552a72ef4..1aa7ce4395d 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_prp_close_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_prp_close_func_cb.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_prp_compare_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_prp_compare_func_cb.java index e1d7f21eacf..49cef7dc2f5 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_prp_compare_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_prp_compare_func_cb.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_prp_copy_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_prp_copy_func_cb.java index a28e27ba0f0..f4924ee6160 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_prp_copy_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_prp_copy_func_cb.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_prp_create_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_prp_create_func_cb.java index 3a396fc4eda..bce024b27de 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_prp_create_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_prp_create_func_cb.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_prp_delete_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_prp_delete_func_cb.java index db6487d8a67..8c5dcccfba9 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_prp_delete_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_prp_delete_func_cb.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_prp_get_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_prp_get_func_cb.java index dacf4adbfef..0f3457f695c 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_prp_get_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_prp_get_func_cb.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_prp_set_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_prp_set_func_cb.java index 4440d82c5d1..a55ca3af6aa 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_prp_set_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_prp_set_func_cb.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java b/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java index c6584897e94..9f04211a0b0 100644 --- a/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java +++ b/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/structs/H5A_info_t.java b/java/src/hdf/hdf5lib/structs/H5A_info_t.java index a2745514e6f..f2c10f038c9 100644 --- a/java/src/hdf/hdf5lib/structs/H5A_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5A_info_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -21,10 +20,14 @@ */ public class H5A_info_t implements Serializable{ private static final long serialVersionUID = 2791443594041667613L; - public boolean corder_valid; // Indicate if creation order is valid - public long corder; // Creation order of attribute - public int cset; // Character set of attribute name - public long data_size; // Size of raw data + /** Indicate if creation order is valid */ + public boolean corder_valid; + /** Creation order of attribute */ + public long corder; + /** Character set of attribute name */ + public int cset; + /** Size of raw data */ + public long data_size; H5A_info_t(boolean corder_valid, long corder, int cset, long data_size) { this.corder_valid = corder_valid; diff --git a/java/src/hdf/hdf5lib/structs/H5E_error2_t.java b/java/src/hdf/hdf5lib/structs/H5E_error2_t.java index 16816eacc07..e0741565094 100644 --- a/java/src/hdf/hdf5lib/structs/H5E_error2_t.java +++ b/java/src/hdf/hdf5lib/structs/H5E_error2_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/structs/H5F_info2_t.java b/java/src/hdf/hdf5lib/structs/H5F_info2_t.java index 8baaa43c123..bb87201dd1d 100644 --- a/java/src/hdf/hdf5lib/structs/H5F_info2_t.java +++ b/java/src/hdf/hdf5lib/structs/H5F_info2_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/structs/H5G_info_t.java b/java/src/hdf/hdf5lib/structs/H5G_info_t.java index e6f42b70102..6d4f405aa53 100644 --- a/java/src/hdf/hdf5lib/structs/H5G_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5G_info_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/structs/H5L_info_t.java b/java/src/hdf/hdf5lib/structs/H5L_info_t.java index 2c25f7c2f6a..eaf0da5828d 100644 --- a/java/src/hdf/hdf5lib/structs/H5L_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5L_info_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java index e4f20c6f966..9a1749dc14d 100644 --- a/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/structs/H5O_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_info_t.java index bd076d60412..cc94247822c 100644 --- a/java/src/hdf/hdf5lib/structs/H5O_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5O_info_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/structs/H5O_native_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_native_info_t.java index 0b19bcb0872..ff801e8584f 100644 --- a/java/src/hdf/hdf5lib/structs/H5O_native_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5O_native_info_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java b/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java index 96082abf8db..0551469f3c5 100644 --- a/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/Makefile.am b/java/src/jni/Makefile.am index 96973d41009..bf086d23aa2 100644 --- a/java/src/jni/Makefile.am +++ b/java/src/jni/Makefile.am @@ -1,6 +1,5 @@ # # 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 diff --git a/java/src/jni/exceptionImp.h b/java/src/jni/exceptionImp.h index 4b81605c03a..72edf4c5908 100644 --- a/java/src/jni/exceptionImp.h +++ b/java/src/jni/exceptionImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c index 06fc606ae82..ee1448b7552 100644 --- a/java/src/jni/h5Constants.c +++ b/java/src/jni/h5Constants.c @@ -1403,7 +1403,7 @@ Java_hdf_hdf5lib_HDF5Constants_H5FD_1DIRECT(JNIEnv *env, jclass cls) #ifdef H5_HAVE_DIRECT return H5FD_DIRECT; #else - return -1; + return H5I_INVALID_HID; #endif } JNIEXPORT jlong JNICALL @@ -1417,7 +1417,7 @@ Java_hdf_hdf5lib_HDF5Constants_H5FD_1HDFS(JNIEnv *env, jclass cls) #ifdef H5_HAVE_LIBHDFS return H5FD_HDFS; #else - return -1; + return H5I_INVALID_HID; #endif } JNIEXPORT jlong JNICALL @@ -1446,7 +1446,7 @@ Java_hdf_hdf5lib_HDF5Constants_H5FD_1ROS3(JNIEnv *env, jclass cls) #ifdef H5_HAVE_ROS3_VFD return H5FD_ROS3; #else - return -1; + return H5I_INVALID_HID; #endif } JNIEXPORT jlong JNICALL @@ -1460,7 +1460,7 @@ Java_hdf_hdf5lib_HDF5Constants_H5FD_1WINDOWS(JNIEnv *env, jclass cls) #ifdef H5_HAVE_WINDOWS return H5FD_DIRECT; #else - return -1; + return H5I_INVALID_HID; #endif } JNIEXPORT jint JNICALL diff --git a/java/src/jni/h5Imp.h b/java/src/jni/h5Imp.h index 226a2fe6f63..776f295a06b 100644 --- a/java/src/jni/h5Imp.h +++ b/java/src/jni/h5Imp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5aImp.c b/java/src/jni/h5aImp.c index c3651449d16..6bf86d00052 100644 --- a/java/src/jni/h5aImp.c +++ b/java/src/jni/h5aImp.c @@ -1133,7 +1133,7 @@ H5AreadVL_asstr(JNIEnv *env, hid_t aid, hid_t tid, jobjectArray buf) for (i = 0; i < (size_t)n; i++) { h5str.s[0] = '\0'; - if (!h5str_sprintf(ENVONLY, &h5str, aid, tid, &(((char *)readBuf)[i * typeSize]), typeSize, 0)) + if (!h5str_sprintf(ENVONLY, &h5str, aid, tid, &(((char *)readBuf)[i * typeSize]), 0)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if (NULL == (jstr = ENVPTR->NewStringUTF(ENVONLY, h5str.s))) @@ -1425,7 +1425,7 @@ Java_hdf_hdf5lib_H5_H5Aread_1reg_1ref(JNIEnv *env, jclass clss, jlong attr_id, j for (i = 0; i < n; i++) { h5str.s[0] = '\0'; - if (!h5str_sprintf(ENVONLY, &h5str, (hid_t)attr_id, (hid_t)mem_type_id, (void *)&ref_data[i], 0, 0)) + if (!h5str_sprintf(ENVONLY, &h5str, (hid_t)attr_id, (hid_t)mem_type_id, (void *)&ref_data[i], 0)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if (NULL == (jstr = ENVPTR->NewStringUTF(ENVONLY, h5str.s))) diff --git a/java/src/jni/h5aImp.h b/java/src/jni/h5aImp.h index 7615946663b..3d9a230c992 100644 --- a/java/src/jni/h5aImp.h +++ b/java/src/jni/h5aImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5dImp.c b/java/src/jni/h5dImp.c index f8f23252ded..73b252a17bd 100644 --- a/java/src/jni/h5dImp.c +++ b/java/src/jni/h5dImp.c @@ -1290,7 +1290,7 @@ H5DreadVL_asstr(JNIEnv *env, hid_t did, hid_t tid, hid_t mem_sid, hid_t file_sid for (i = 0; i < (size_t)n; i++) { h5str.s[0] = '\0'; - if (!h5str_sprintf(ENVONLY, &h5str, did, tid, &(((char *)readBuf)[i * typeSize]), typeSize, 0)) + if (!h5str_sprintf(ENVONLY, &h5str, did, tid, &(((char *)readBuf)[i * typeSize]), 0)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if (NULL == (jstr = ENVPTR->NewStringUTF(ENVONLY, h5str.s))) @@ -1669,8 +1669,7 @@ Java_hdf_hdf5lib_H5_H5Dread_1reg_1ref(JNIEnv *env, jclass clss, jlong dataset_id for (i = 0; i < n; i++) { h5str.s[0] = '\0'; - if (!h5str_sprintf(ENVONLY, &h5str, (hid_t)dataset_id, (hid_t)mem_type_id, (void *)&ref_data[i], 0, - 0)) + if (!h5str_sprintf(ENVONLY, &h5str, (hid_t)dataset_id, (hid_t)mem_type_id, (void *)&ref_data[i], 0)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if (NULL == (jstr = ENVPTR->NewStringUTF(ENVONLY, h5str.s))) diff --git a/java/src/jni/h5dImp.h b/java/src/jni/h5dImp.h index c1ed0659aff..61dfeaa2414 100644 --- a/java/src/jni/h5dImp.h +++ b/java/src/jni/h5dImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5eImp.c b/java/src/jni/h5eImp.c index 7d7a2cf7b4a..5bdeae80016 100644 --- a/java/src/jni/h5eImp.c +++ b/java/src/jni/h5eImp.c @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5eImp.h b/java/src/jni/h5eImp.h index d849b929618..3133ca90715 100644 --- a/java/src/jni/h5eImp.h +++ b/java/src/jni/h5eImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5fImp.h b/java/src/jni/h5fImp.h index ed90ee9814f..d7e3ded7bf9 100644 --- a/java/src/jni/h5fImp.h +++ b/java/src/jni/h5fImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5gImp.h b/java/src/jni/h5gImp.h index 393d5d861c9..4b0cb4d0e59 100644 --- a/java/src/jni/h5gImp.h +++ b/java/src/jni/h5gImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5iImp.h b/java/src/jni/h5iImp.h index eff5048f5f0..ed543035b00 100644 --- a/java/src/jni/h5iImp.h +++ b/java/src/jni/h5iImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5jni.h b/java/src/jni/h5jni.h index fb6f22a7a68..aab54796096 100644 --- a/java/src/jni/h5jni.h +++ b/java/src/jni/h5jni.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5lImp.c b/java/src/jni/h5lImp.c index fabd92091b7..43db4e9dea6 100644 --- a/java/src/jni/h5lImp.c +++ b/java/src/jni/h5lImp.c @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5lImp.h b/java/src/jni/h5lImp.h index 2e949fe50c1..134ed1762f4 100644 --- a/java/src/jni/h5lImp.h +++ b/java/src/jni/h5lImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5oImp.c b/java/src/jni/h5oImp.c index e06ad79febc..3037bc6aafa 100644 --- a/java/src/jni/h5oImp.c +++ b/java/src/jni/h5oImp.c @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5oImp.h b/java/src/jni/h5oImp.h index e6675be305c..2abb0d9e811 100644 --- a/java/src/jni/h5oImp.h +++ b/java/src/jni/h5oImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pACPLImp.c b/java/src/jni/h5pACPLImp.c index 611016f3487..6290e0ea155 100644 --- a/java/src/jni/h5pACPLImp.c +++ b/java/src/jni/h5pACPLImp.c @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pACPLImp.h b/java/src/jni/h5pACPLImp.h index 21c0cc6b15a..8d9bf7d29ab 100644 --- a/java/src/jni/h5pACPLImp.h +++ b/java/src/jni/h5pACPLImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pDAPLImp.c b/java/src/jni/h5pDAPLImp.c index 430fc791a38..82802b91531 100644 --- a/java/src/jni/h5pDAPLImp.c +++ b/java/src/jni/h5pDAPLImp.c @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pDAPLImp.h b/java/src/jni/h5pDAPLImp.h index a15e964d4dd..353f652426a 100644 --- a/java/src/jni/h5pDAPLImp.h +++ b/java/src/jni/h5pDAPLImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pDCPLImp.c b/java/src/jni/h5pDCPLImp.c index 9e8b2b6dcde..760a5a8ab7e 100644 --- a/java/src/jni/h5pDCPLImp.c +++ b/java/src/jni/h5pDCPLImp.c @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pDCPLImp.h b/java/src/jni/h5pDCPLImp.h index 6adcbe4e5b0..302019f2845 100644 --- a/java/src/jni/h5pDCPLImp.h +++ b/java/src/jni/h5pDCPLImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pDXPLImp.c b/java/src/jni/h5pDXPLImp.c index 8b930dc9c97..c555d539850 100644 --- a/java/src/jni/h5pDXPLImp.c +++ b/java/src/jni/h5pDXPLImp.c @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pDXPLImp.h b/java/src/jni/h5pDXPLImp.h index 8d2df6803df..250c3f898de 100644 --- a/java/src/jni/h5pDXPLImp.h +++ b/java/src/jni/h5pDXPLImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pFAPLImp.c b/java/src/jni/h5pFAPLImp.c index 23c84c4d873..ad85aaef88d 100644 --- a/java/src/jni/h5pFAPLImp.c +++ b/java/src/jni/h5pFAPLImp.c @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pFAPLImp.h b/java/src/jni/h5pFAPLImp.h index 166834f7ccd..4bb48e2e390 100644 --- a/java/src/jni/h5pFAPLImp.h +++ b/java/src/jni/h5pFAPLImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pFCPLImp.c b/java/src/jni/h5pFCPLImp.c index fe127608c28..ded324855ec 100644 --- a/java/src/jni/h5pFCPLImp.c +++ b/java/src/jni/h5pFCPLImp.c @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pFCPLImp.h b/java/src/jni/h5pFCPLImp.h index 7799e496fda..0fe3944bfba 100644 --- a/java/src/jni/h5pFCPLImp.h +++ b/java/src/jni/h5pFCPLImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pGAPLImp.c b/java/src/jni/h5pGAPLImp.c index c43609d77fa..b92e1809d15 100644 --- a/java/src/jni/h5pGAPLImp.c +++ b/java/src/jni/h5pGAPLImp.c @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pGAPLImp.h b/java/src/jni/h5pGAPLImp.h index db95f5d0d39..478402a9868 100644 --- a/java/src/jni/h5pGAPLImp.h +++ b/java/src/jni/h5pGAPLImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pGCPLImp.c b/java/src/jni/h5pGCPLImp.c index 46d102fbe50..2ba140d838b 100644 --- a/java/src/jni/h5pGCPLImp.c +++ b/java/src/jni/h5pGCPLImp.c @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pGCPLImp.h b/java/src/jni/h5pGCPLImp.h index a1b8b28f1a5..6a40908190a 100644 --- a/java/src/jni/h5pGCPLImp.h +++ b/java/src/jni/h5pGCPLImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pImp.h b/java/src/jni/h5pImp.h index 49d36a63916..b80ce468e92 100644 --- a/java/src/jni/h5pImp.h +++ b/java/src/jni/h5pImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pLAPLImp.c b/java/src/jni/h5pLAPLImp.c index 8b5afa22840..1db495ce565 100644 --- a/java/src/jni/h5pLAPLImp.c +++ b/java/src/jni/h5pLAPLImp.c @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pLAPLImp.h b/java/src/jni/h5pLAPLImp.h index 204901da134..46adc0c70ac 100644 --- a/java/src/jni/h5pLAPLImp.h +++ b/java/src/jni/h5pLAPLImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pLCPLImp.c b/java/src/jni/h5pLCPLImp.c index 455936b0646..b5eebd18e96 100644 --- a/java/src/jni/h5pLCPLImp.c +++ b/java/src/jni/h5pLCPLImp.c @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pLCPLImp.h b/java/src/jni/h5pLCPLImp.h index b7448151f02..7601adb6c55 100644 --- a/java/src/jni/h5pLCPLImp.h +++ b/java/src/jni/h5pLCPLImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pOCPLImp.c b/java/src/jni/h5pOCPLImp.c index 6cf62d77453..bdcba46c32f 100644 --- a/java/src/jni/h5pOCPLImp.c +++ b/java/src/jni/h5pOCPLImp.c @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pOCPLImp.h b/java/src/jni/h5pOCPLImp.h index ccc4c788c72..c16f1be0991 100644 --- a/java/src/jni/h5pOCPLImp.h +++ b/java/src/jni/h5pOCPLImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pOCpyPLImp.c b/java/src/jni/h5pOCpyPLImp.c index 9cf18fdc787..b525b680787 100644 --- a/java/src/jni/h5pOCpyPLImp.c +++ b/java/src/jni/h5pOCpyPLImp.c @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pOCpyPLImp.h b/java/src/jni/h5pOCpyPLImp.h index 82369b37b64..d8682cbad6d 100644 --- a/java/src/jni/h5pOCpyPLImp.h +++ b/java/src/jni/h5pOCpyPLImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pStrCPLImp.c b/java/src/jni/h5pStrCPLImp.c index 33dbdd7ba2d..a056e3a7599 100644 --- a/java/src/jni/h5pStrCPLImp.c +++ b/java/src/jni/h5pStrCPLImp.c @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5pStrCPLImp.h b/java/src/jni/h5pStrCPLImp.h index 01cde89a96c..8a564943af4 100644 --- a/java/src/jni/h5pStrCPLImp.h +++ b/java/src/jni/h5pStrCPLImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5plImp.c b/java/src/jni/h5plImp.c index bef12421cf5..91930286cd0 100644 --- a/java/src/jni/h5plImp.c +++ b/java/src/jni/h5plImp.c @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5plImp.h b/java/src/jni/h5plImp.h index 228d512aeda..b809efa2cd6 100644 --- a/java/src/jni/h5plImp.h +++ b/java/src/jni/h5plImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5rImp.h b/java/src/jni/h5rImp.h index 94e791194b4..582b837fa6e 100644 --- a/java/src/jni/h5rImp.h +++ b/java/src/jni/h5rImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5sImp.h b/java/src/jni/h5sImp.h index c4a18280e38..1ceaf3f9710 100644 --- a/java/src/jni/h5sImp.h +++ b/java/src/jni/h5sImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5tImp.h b/java/src/jni/h5tImp.h index 3769cf37d0d..3faeb00bc5b 100644 --- a/java/src/jni/h5tImp.h +++ b/java/src/jni/h5tImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index 5b38daf489b..3e1962e3e49 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -28,8 +28,6 @@ extern "C" { #include "hdf5.h" #include "h5util.h" -#define SKIP_UNUSED_DUMP_ROUTINES - /* size of hyperslab buffer when a dataset is bigger than H5TOOLS_MALLOCSIZE */ hsize_t H5TOOLS_BUFSIZE = (32 * 1024 * 1024); /* 32 MB */ int H5TOOLS_TEXT_BLOCK = 16; /* Number of elements on a line in a text export file */ @@ -54,18 +52,19 @@ void * edata; /* Local Prototypes */ /********************/ -#ifndef SKIP_UNUSED_DUMP_ROUTINES -static int h5str_dump_region_blocks(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_obj); -static int h5str_dump_region_points(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_obj); -#endif +static int h5str_dump_region_blocks(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_obj, + int expand_data); +static int h5str_dump_region_points(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_obj, + int expand_data); +static int h5str_dump_region_attribute(JNIEnv *env, h5str_t *str, hid_t region_id); static int h5str_is_zero(const void *_mem, size_t size); static hid_t h5str_get_native_type(hid_t type); static hid_t h5str_get_little_endian_type(hid_t type); static hid_t h5str_get_big_endian_type(hid_t type); static htri_t h5str_detect_vlen(hid_t tid); static htri_t h5str_detect_vlen_str(hid_t tid); -static int h5tools_dump_simple_data(JNIEnv *env, FILE *stream, hid_t container, hid_t type, void *_mem, - hsize_t nelmts); +static int h5str_dump_simple_data(JNIEnv *env, FILE *stream, hid_t container, hid_t type, void *_mem, + hsize_t nelmts); static int h5str_render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t block_nelmts); static int render_bin_output_region_data_blocks(FILE *stream, hid_t region_id, hid_t container, int ndims, @@ -185,13 +184,14 @@ h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_ H5T_class_t tclass = H5T_NO_CLASS; const char delimiter[] = " ," H5_COMPOUND_BEGIN_INDICATOR H5_COMPOUND_END_INDICATOR H5_ARRAY_BEGIN_INDICATOR H5_ARRAY_END_INDICATOR H5_VLEN_BEGIN_INDICATOR H5_VLEN_END_INDICATOR; - size_t typeSize = 0; - hid_t mtid = H5I_INVALID_HID; - char * this_str = NULL; - char * token; - char * cptr = NULL; - int n; - size_t retVal = 0; + + size_t retVal = 0; + size_t typeSize = 0; + hid_t mtid = H5I_INVALID_HID; + char * this_str = NULL; + char * cptr = NULL; + char * token; + int n; if (!in_str) H5_NULL_ARGUMENT_ERROR(ENVONLY, "h5str_convert: in_str is NULL"); @@ -239,7 +239,7 @@ h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_ case sizeof(long double): { long double tmp_ldouble = 0.0; - sscanf(token, "%Lf", &tmp_ldouble); + sscanf(token, "%Lg", &tmp_ldouble); HDmemcpy(cptr, &tmp_ldouble, sizeof(long double)); break; } @@ -644,27 +644,27 @@ h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_ * * Purpose: Object reference -- show the name of the referenced object. * - * Return: Nothing + * Return: SUCCEED or FAIL *------------------------------------------------------------------------- */ -void -h5str_sprint_reference(JNIEnv *env, h5str_t *out_str, hid_t container, void *ref_p) +int +h5str_sprint_reference(JNIEnv *env, h5str_t *out_str, void *ref_p) { - ssize_t buf_size; - char * ref_name = NULL; - const H5R_ref_t *ref_vp = (H5R_ref_t *)ref_p; + ssize_t buf_size; + char * ref_name = NULL; + H5R_ref_t *ref_vp = (H5R_ref_t *)ref_p; - UNUSED(container); + int ret_value = FAIL; if (!h5str_append(out_str, " \"")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); buf_size = H5Rget_file_name(ref_vp, NULL, 0); if (buf_size) { ref_name = (char *)HDmalloc(sizeof(char) * (size_t)buf_size + 1); if (H5Rget_file_name(ref_vp, ref_name, buf_size + 1) >= 0) { ref_name[buf_size] = '\0'; if (!h5str_append(out_str, ref_name)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); } HDfree(ref_name); ref_name = NULL; @@ -676,7 +676,7 @@ h5str_sprint_reference(JNIEnv *env, h5str_t *out_str, hid_t container, void *ref if (H5Rget_obj_name(ref_vp, H5P_DEFAULT, ref_name, buf_size + 1) >= 0) { ref_name[buf_size] = '\0'; if (!h5str_append(out_str, ref_name)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); } HDfree(ref_name); ref_name = NULL; @@ -689,17 +689,61 @@ h5str_sprint_reference(JNIEnv *env, h5str_t *out_str, hid_t container, void *ref if (H5Rget_attr_name(ref_vp, ref_name, buf_size + 1) >= 0) { ref_name[buf_size] = '\0'; if (!h5str_append(out_str, ref_name)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); } HDfree(ref_name); ref_name = NULL; } } if (!h5str_append(out_str, "\"")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); + + ret_value = SUCCEED; done: if (ref_name) HDfree(ref_name); + + return ret_value; +} /* h5str_sprint_reference */ + +int +h5str_region_dataset(JNIEnv *env, h5str_t *out_str, H5R_ref_t *ref_vp, int expand_data) +{ + hid_t new_obj_id = H5I_INVALID_HID; + hid_t new_obj_sid = H5I_INVALID_HID; + H5S_sel_type region_type; + + int ret_value = FAIL; + + if ((new_obj_id = H5Ropen_object(ref_vp, H5P_DEFAULT, H5P_DEFAULT)) < 0) { + ret_value = SUCCEED; /* An uncreated region is a valid state */ + goto done; + } + + if ((new_obj_sid = H5Ropen_region(ref_vp, H5P_DEFAULT, H5P_DEFAULT)) < 0) + H5_LIBRARY_ERROR(ENVONLY); + + if ((region_type = H5Sget_select_type(new_obj_sid)) > H5S_SEL_ERROR) { + if (H5S_SEL_POINTS == region_type) { + if (h5str_dump_region_points(ENVONLY, out_str, new_obj_sid, new_obj_id, expand_data) < 0) + CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + } + else if (H5S_SEL_HYPERSLABS == region_type) { + if (h5str_dump_region_blocks(ENVONLY, out_str, new_obj_sid, new_obj_id, expand_data) < 0) + CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + } + } + + ret_value = SUCCEED; +done: + if (new_obj_sid >= 0) + if (H5Sclose(new_obj_sid) < 0) + H5_LIBRARY_ERROR(ENVONLY); + if (new_obj_id >= 0) + if (H5Dclose(new_obj_id) < 0) + H5_LIBRARY_ERROR(ENVONLY); + + return ret_value; } /* @@ -710,8 +754,7 @@ h5str_sprint_reference(JNIEnv *env, h5str_t *out_str, hid_t container, void *ref * FAILURE: 0 */ size_t -h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *in_buf, size_t in_buf_len, - int expand_data) +h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *in_buf, int expand_data) { unsigned char *ucptr = (unsigned char *)in_buf; static char fmt_llong[8], fmt_ullong[8]; @@ -719,7 +762,6 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i size_t typeSize = 0; H5T_sign_t nsign = H5T_SGN_ERROR; hid_t mtid = H5I_INVALID_HID; - hid_t obj = H5I_INVALID_HID; char * cptr = (char *)in_buf; char * this_str = NULL; int n; @@ -734,8 +776,6 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i H5_LIBRARY_ERROR(ENVONLY); if (!(typeSize = H5Tget_size(tid))) H5_LIBRARY_ERROR(ENVONLY); - if (!(nsign = H5Tget_sign(tid))) - H5_LIBRARY_ERROR(ENVONLY); /* Build default formats for long long types */ if (!fmt_llong[0]) { @@ -744,7 +784,6 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i if (HDsnprintf(fmt_ullong, sizeof(fmt_ullong), "%%%su", H5_PRINTF_LL_WIDTH) < 0) H5_JNI_FATAL_ERROR(ENVONLY, "h5str_sprintf: HDsnprintf failure"); } /* end if */ - switch (tclass) { case H5T_FLOAT: { switch (typeSize) { @@ -805,6 +844,8 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i htri_t is_variable; char * tmp_str; + typeSize = 0; + if ((is_variable = H5Tis_variable_str(tid)) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -1003,7 +1044,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i H5_LIBRARY_ERROR(ENVONLY); if (!h5str_append(out_str, H5_COMPOUND_BEGIN_INDICATOR)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); for (i = 0; i < (unsigned)n; i++) { offset = H5Tget_member_offset(tid, i); @@ -1011,12 +1052,12 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i if ((mtid = H5Tget_member_type(tid, i)) < 0) H5_LIBRARY_ERROR(ENVONLY); - if (!h5str_sprintf(ENVONLY, out_str, container, mtid, &cptr[offset], in_buf_len, expand_data)) + if (!h5str_sprintf(ENVONLY, out_str, container, mtid, &cptr[offset], expand_data)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if ((i + 1) < (unsigned)n) if (!h5str_append(out_str, ", ")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); if (H5Tclose(mtid) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -1024,7 +1065,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i } if (!h5str_append(out_str, H5_COMPOUND_END_INDICATOR)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); break; } @@ -1034,7 +1075,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i if (H5Tenum_nameof(tid, cptr, enum_name, sizeof enum_name) >= 0) { if (!h5str_append(out_str, enum_name)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); } else { size_t i; @@ -1057,130 +1098,120 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i } case H5T_REFERENCE: { - if (h5str_is_zero(cptr, typeSize)) { - if (!h5str_append(out_str, "NULL")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - break; - } - if (H5Tequal(tid, H5T_STD_REF)) { - H5O_type_t obj_type = -1; /* Object type */ - H5R_type_t ref_type; /* Reference type */ - const H5R_ref_t *ref_vp = (H5R_ref_t *)cptr; + hid_t new_obj_id = H5I_INVALID_HID; + H5O_type_t obj_type = -1; /* Object type */ + H5R_type_t ref_type; /* Reference type */ + + H5R_ref_t *ref_vp = (H5R_ref_t *)cptr; ref_type = H5Rget_type(ref_vp); - H5Rget_obj_type3(ref_vp, H5P_DEFAULT, &obj_type); switch (ref_type) { - case H5R_OBJECT1: { - /* Object references -- show the type and OID of the referenced object. */ - H5O_info2_t oi; - - if ((obj = H5Ropen_object(ref_vp, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { - H5Oget_info3(obj, &oi, H5O_INFO_BASIC); - if (H5Oclose(obj) < 0) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + case H5R_OBJECT1: + if (H5Rget_obj_type3(ref_vp, H5P_DEFAULT, &obj_type) >= 0) { + switch (obj_type) { + case H5O_TYPE_DATASET: + if (h5str_region_dataset(ENVONLY, out_str, ref_vp, expand_data) < 0) + CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + break; + + case H5O_TYPE_GROUP: + case H5O_TYPE_NAMED_DATATYPE: + case H5O_TYPE_MAP: + case H5O_TYPE_UNKNOWN: + case H5O_TYPE_NTYPES: + default: { + /* Object references -- show the type and OID of the referenced object. */ + H5O_info2_t oi; + char * obj_tok_str = NULL; + if ((new_obj_id = H5Ropen_object(ref_vp, H5P_DEFAULT, H5P_DEFAULT)) >= + 0) { + H5Oget_info3(new_obj_id, &oi, H5O_INFO_BASIC); + H5Otoken_to_str(new_obj_id, &oi.token, &obj_tok_str); + if (H5Dclose(new_obj_id) < 0) + H5_LIBRARY_ERROR(ENVONLY); + } + else + H5_LIBRARY_ERROR(ENVONLY); + + if (NULL == (this_str = (char *)HDmalloc(14))) + H5_OUT_OF_MEMORY_ERROR( + ENVONLY, "h5str_sprintf: failed to allocate string buffer"); + if (HDsprintf(this_str, "%u-", (unsigned)oi.type) < 0) + H5_JNI_FATAL_ERROR(ENVONLY, "h5str_sprintf: HDsprintf failure"); + if (!h5str_append(out_str, this_str)) + H5_LIBRARY_ERROR(ENVONLY); + HDfree(this_str); + this_str = NULL; + + /* Print OID */ + { + char *token_str; + + H5Otoken_to_str(tid, &oi.token, &token_str); + + if (NULL == (this_str = (char *)HDmalloc(64 + strlen(token_str) + 1))) + H5_OUT_OF_MEMORY_ERROR( + ENVONLY, "h5str_sprintf: failed to allocate string buffer"); + if (HDsprintf(this_str, "%lu:%s", oi.fileno, token_str) < 0) + H5_JNI_FATAL_ERROR(ENVONLY, "h5str_sprintf: HDsprintf failure"); + + H5free_memory(token_str); + } + } break; + } /* end switch */ } else - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - - if (NULL == (this_str = (char *)HDmalloc(14))) - H5_OUT_OF_MEMORY_ERROR(ENVONLY, - "h5str_sprintf: failed to allocate string buffer"); - if (HDsprintf(this_str, "%u-", (unsigned)oi.type) < 0) - H5_JNI_FATAL_ERROR(ENVONLY, "h5str_sprintf: HDsprintf failure"); - if (!h5str_append(out_str, this_str)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - HDfree(this_str); - this_str = NULL; - - switch (obj_type) { - case H5O_TYPE_GROUP: - if (!h5str_append(out_str, H5_TOOLS_GROUP)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - break; - - case H5O_TYPE_DATASET: - if (!h5str_append(out_str, H5_TOOLS_DATASET)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - break; - - case H5O_TYPE_NAMED_DATATYPE: - if (!h5str_append(out_str, H5_TOOLS_DATATYPE)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - break; - - case H5O_TYPE_MAP: - case H5O_TYPE_UNKNOWN: - case H5O_TYPE_NTYPES: - default: - break; - } /* end switch */ - H5Oclose(obj); - h5str_sprint_reference(ENVONLY, out_str, container, ref_vp); - - /* Print OID */ - { - char *token_str; - - H5Otoken_to_str(tid, &oi.token, &token_str); - - if (NULL == (this_str = (char *)HDmalloc(64 + strlen(token_str) + 1))) - H5_OUT_OF_MEMORY_ERROR(ENVONLY, - "h5str_sprintf: failed to allocate string buffer"); - if (HDsprintf(this_str, "%lu:%s", oi.fileno, token_str) < 0) - H5_JNI_FATAL_ERROR(ENVONLY, "h5str_sprintf: HDsprintf failure"); - - H5free_memory(token_str); - } - - } - - break; + H5_LIBRARY_ERROR(ENVONLY); + break; case H5R_DATASET_REGION1: - if (!h5str_append(out_str, H5_TOOLS_DATASET)) + if (h5str_region_dataset(ENVONLY, out_str, ref_vp, expand_data) < 0) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - h5str_sprint_reference(ENVONLY, out_str, container, (void *)cptr); break; case H5R_OBJECT2: - switch (obj_type) { - case H5O_TYPE_GROUP: - if (!h5str_append(out_str, H5_TOOLS_GROUP)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - break; - - case H5O_TYPE_DATASET: - if (!h5str_append(out_str, H5_TOOLS_DATASET)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - break; - - case H5O_TYPE_NAMED_DATATYPE: - if (!h5str_append(out_str, H5_TOOLS_DATATYPE)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - break; - - case H5O_TYPE_MAP: - case H5O_TYPE_UNKNOWN: - case H5O_TYPE_NTYPES: - default: - break; - } /* end switch */ - h5str_sprint_reference(ENVONLY, out_str, container, (void *)cptr); + if (H5Rget_obj_type3(ref_vp, H5P_DEFAULT, &obj_type) >= 0) { + switch (obj_type) { + case H5O_TYPE_GROUP: + break; + + case H5O_TYPE_DATASET: + if (h5str_region_dataset(ENVONLY, out_str, ref_vp, expand_data) < 0) + CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + break; + + case H5O_TYPE_NAMED_DATATYPE: + break; + + case H5O_TYPE_MAP: + case H5O_TYPE_UNKNOWN: + case H5O_TYPE_NTYPES: + default: + break; + } /* end switch */ + } + else + H5_JNI_FATAL_ERROR(ENVONLY, "h5str_sprintf: H5R_OBJECT2 failed"); break; case H5R_DATASET_REGION2: - if (!h5str_append(out_str, H5_TOOLS_DATASET)) + if (h5str_region_dataset(ENVONLY, out_str, ref_vp, expand_data) < 0) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - h5str_sprint_reference(ENVONLY, out_str, container, (void *)cptr); break; case H5R_ATTR: - if (!h5str_append(out_str, H5_TOOLS_ATTRIBUTE)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - h5str_sprint_reference(ENVONLY, out_str, container, (void *)cptr); + if ((new_obj_id = H5Ropen_attr(ref_vp, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { + if (h5str_dump_region_attribute(ENVONLY, out_str, new_obj_id) < 0) + CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + if (H5Aclose(new_obj_id) < 0) + H5_LIBRARY_ERROR(ENVONLY); + } break; case H5R_BADTYPE: case H5R_MAXTYPE: default: break; } /* end switch */ + + if (H5Rdestroy(ref_vp) < 0) + H5_LIBRARY_ERROR(ENVONLY); } else if (H5Tequal(tid, H5T_STD_REF_DSETREG)) { /* (H5R_DSET_REG_REF_BUF_SIZE == typeSize) */ @@ -1200,7 +1231,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i int rank = 0; if (!h5str_append(out_str, H5_ARRAY_BEGIN_INDICATOR)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); if ((mtid = H5Tget_super(tid)) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -1218,17 +1249,16 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i total_elmts *= dims[i]; for (i = 0; i < total_elmts; i++) { - if (!h5str_sprintf(ENVONLY, out_str, container, mtid, &(cptr[i * baseSize]), in_buf_len, - expand_data)) + if (!h5str_sprintf(ENVONLY, out_str, container, mtid, &(cptr[i * baseSize]), expand_data)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if ((i + 1) < total_elmts) if (!h5str_append(out_str, ", ")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); } if (!h5str_append(out_str, H5_ARRAY_END_INDICATOR)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); if (H5Tclose(mtid) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -1249,20 +1279,20 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i H5_LIBRARY_ERROR(ENVONLY); if (!h5str_append(out_str, H5_VLEN_BEGIN_INDICATOR)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); for (i = 0; i < (unsigned)vl_buf->len; i++) { if (!h5str_sprintf(ENVONLY, out_str, container, mtid, &(((char *)vl_buf->p)[i * baseSize]), - vl_buf->len, expand_data)) + expand_data)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if ((i + 1) < (unsigned)vl_buf->len) if (!h5str_append(out_str, ", ")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); } if (!h5str_append(out_str, H5_VLEN_END_INDICATOR)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); if (H5Tclose(mtid) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -1304,7 +1334,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i if (this_str) { if (!h5str_append(out_str, this_str)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); HDfree(this_str); this_str = NULL; @@ -1405,12 +1435,12 @@ h5str_print_region_data_blocks(JNIEnv *env, hid_t region_id, h5str_t *str, int n for (numindex = 0; numindex < numelem; numindex++) { if (!h5str_sprintf(ENVONLY, str, region_id, type_id, ((char *)region_buf + numindex * type_size), - 0, 1)) + 1)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if (numindex + 1 < numelem) if (!h5str_append(str, ", ")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); } /* end for (jndx = 0; jndx < numelem; jndx++, region_elmtno++, ctx.cur_elmt++) */ } /* end for (blkndx = 0; blkndx < nblocks; blkndx++) */ @@ -1434,7 +1464,7 @@ h5str_print_region_data_blocks(JNIEnv *env, hid_t region_id, h5str_t *str, int n } /* end h5str_print_region_data_blocks */ int -h5str_dump_region_blocks_data(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_id) +h5str_dump_region_blocks(JNIEnv *env, h5str_t *str, hid_t region_space, hid_t region_id, int expand_data) { hssize_t nblocks; hsize_t alloc_size; @@ -1443,29 +1473,31 @@ h5str_dump_region_blocks_data(JNIEnv *env, h5str_t *str, hid_t region, hid_t reg hid_t type_id = H5I_INVALID_HID; int ndims = -1; int ret_value = FAIL; + int i; + char tmp_str[256]; /* * This function fails if the region does not have blocks. */ - H5E_BEGIN_TRY { nblocks = H5Sget_select_hyper_nblocks(region); } + H5E_BEGIN_TRY { nblocks = H5Sget_select_hyper_nblocks(region_space); } H5E_END_TRY; - if (nblocks < 0) - H5_LIBRARY_ERROR(ENVONLY); - - if ((ndims = H5Sget_simple_extent_ndims(region)) < 0) + if (nblocks <= 0) { + ret_value = SUCCEED; + goto done; + } + if ((ndims = H5Sget_simple_extent_ndims(region_space)) < 0) H5_LIBRARY_ERROR(ENVONLY); /* Print block information */ alloc_size = (hsize_t)nblocks * (hsize_t)ndims * 2 * (hsize_t)sizeof(ptdata[0]); - if (alloc_size == (hsize_t)((size_t)alloc_size)) { - if (NULL == (ptdata = (hsize_t *)HDmalloc((size_t)alloc_size))) - H5_OUT_OF_MEMORY_ERROR(ENVONLY, - "h5str_dump_region_blocks_data: failed to allocate region block buffer"); + if (NULL == (ptdata = (hsize_t *)HDmalloc((size_t)alloc_size))) + H5_OUT_OF_MEMORY_ERROR(ENVONLY, "h5str_dump_region_blocks: failed to allocate region block buffer"); - if (H5Sget_select_hyper_blocklist(region, (hsize_t)0, (hsize_t)nblocks, ptdata) < 0) - H5_LIBRARY_ERROR(ENVONLY); + if (H5Sget_select_hyper_blocklist(region_space, (hsize_t)0, (hsize_t)nblocks, ptdata) < 0) + H5_LIBRARY_ERROR(ENVONLY); + if (expand_data) { if ((dtype = H5Dget_type(region_id)) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -1474,66 +1506,19 @@ h5str_dump_region_blocks_data(JNIEnv *env, h5str_t *str, hid_t region, hid_t reg if (h5str_print_region_data_blocks(ENVONLY, region_id, str, ndims, type_id, nblocks, ptdata) < 0) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - } /* if (alloc_size == (hsize_t)((size_t)alloc_size)) */ - - ret_value = SUCCEED; - -done: - if (type_id >= 0) - H5Tclose(type_id); - if (dtype >= 0) - H5Tclose(dtype); - if (ptdata) - HDfree(ptdata); - - return ret_value; -} /* end h5str_dump_region_blocks_data */ - -#ifndef SKIP_UNUSED_DUMP_ROUTINES -static int -h5str_dump_region_blocks(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_id) -{ - hssize_t nblocks; - hsize_t alloc_size; - hsize_t *ptdata = NULL; - char tmp_str[256]; - int ndims = -1; - int ret_value = FAIL; - - UNUSED(region_id); - - /* - * This function fails if the region does not have blocks. - */ - H5E_BEGIN_TRY { nblocks = H5Sget_select_hyper_nblocks(region); } - H5E_END_TRY; - - if (nblocks < 0) - H5_LIBRARY_ERROR(ENVONLY); - - if ((ndims = H5Sget_simple_extent_ndims(region)) < 0) - H5_LIBRARY_ERROR(ENVONLY); - - /* Print block information */ - alloc_size = (hsize_t)nblocks * (hsize_t)ndims * 2 * (hsize_t)sizeof(ptdata[0]); - if (alloc_size == (hsize_t)((size_t)alloc_size)) { - int i; - - if (NULL == (ptdata = (hsize_t *)HDmalloc((size_t)alloc_size))) - H5_OUT_OF_MEMORY_ERROR(ENVONLY, - "h5str_dump_region_blocks: failed to allocate region block buffer"); - - if (H5Sget_select_hyper_blocklist(region, (hsize_t)0, (hsize_t)nblocks, ptdata) < 0) + } + else { + if (!h5str_append(str, " REGION_TYPE BLOCK")) H5_LIBRARY_ERROR(ENVONLY); if (!h5str_append(str, " {")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); for (i = 0; i < nblocks; i++) { int j; if (!h5str_append(str, " ")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); /* Start coordinates and opposite corner */ for (j = 0; j < ndims; j++) { @@ -1543,7 +1528,7 @@ h5str_dump_region_blocks(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_i H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_region_blocks: HDsprintf failure"); if (!h5str_append(str, tmp_str)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); } for (j = 0; j < ndims; j++) { @@ -1554,28 +1539,30 @@ h5str_dump_region_blocks(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_i H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_region_blocks: HDsprintf failure"); if (!h5str_append(str, tmp_str)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); } if (!h5str_append(str, ") ")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); tmp_str[0] = '\0'; } if (!h5str_append(str, " }")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - } /* if (alloc_size == (hsize_t)((size_t)alloc_size)) */ - + H5_LIBRARY_ERROR(ENVONLY); + } ret_value = SUCCEED; done: + if (type_id >= 0) + H5Tclose(type_id); + if (dtype >= 0) + H5Tclose(dtype); if (ptdata) HDfree(ptdata); return ret_value; } /* end h5str_dump_region_blocks */ -#endif /*------------------------------------------------------------------------- * Purpose: Print the data values from a dataset referenced by region points. @@ -1628,12 +1615,12 @@ h5str_print_region_data_points(JNIEnv *env, hid_t region_space, hid_t region_id, if (H5Sget_simple_extent_dims(mem_space, total_size, NULL) < 0) H5_LIBRARY_ERROR(ENVONLY); - if (!h5str_sprintf(ENVONLY, str, region_id, type_id, ((char *)region_buf + jndx * type_size), 0, 1)) + if (!h5str_sprintf(ENVONLY, str, region_id, type_id, ((char *)region_buf + jndx * type_size), 1)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if (jndx + 1 < (size_t)npoints) if (!h5str_append(str, ", ")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_LIBRARY_ERROR(ENVONLY); } /* end for (jndx = 0; jndx < npoints; jndx++, elmtno++) */ ret_value = SUCCEED; @@ -1650,140 +1637,93 @@ h5str_print_region_data_points(JNIEnv *env, hid_t region_space, hid_t region_id, } /* end h5str_print_region_data_points */ int -h5str_dump_region_points_data(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_id) +h5str_dump_region_points(JNIEnv *env, h5str_t *str, hid_t region_space, hid_t region_id, int expand_data) { - hssize_t npoints; hsize_t alloc_size; + hssize_t npoints = -1; hsize_t *ptdata = NULL; hid_t dtype = H5I_INVALID_HID; hid_t type_id = H5I_INVALID_HID; int ndims = -1; int ret_value = FAIL; + int i; + char tmp_str[256]; /* * This function fails if the region does not have points. */ - H5E_BEGIN_TRY { npoints = H5Sget_select_elem_npoints(region); } + H5E_BEGIN_TRY { npoints = H5Sget_select_elem_npoints(region_space); } H5E_END_TRY; - if (npoints < 0) - H5_LIBRARY_ERROR(ENVONLY); - - if ((ndims = H5Sget_simple_extent_ndims(region)) < 0) + if (npoints <= 0) { + ret_value = SUCCEED; + goto done; + } + if ((ndims = H5Sget_simple_extent_ndims(region_space)) < 0) H5_LIBRARY_ERROR(ENVONLY); /* Print point information */ - if (npoints > 0) { - alloc_size = (hsize_t)npoints * (hsize_t)ndims * (hsize_t)sizeof(ptdata[0]); - if (alloc_size == (hsize_t)((size_t)alloc_size)) { - if (NULL == (ptdata = (hsize_t *)HDmalloc((size_t)alloc_size))) - H5_OUT_OF_MEMORY_ERROR( - ENVONLY, "h5str_dump_region_points_data: failed to allocate region point data buffer"); + alloc_size = (hsize_t)npoints * (hsize_t)ndims * (hsize_t)sizeof(ptdata[0]); + if (NULL == (ptdata = (hsize_t *)HDmalloc((size_t)alloc_size))) + H5_OUT_OF_MEMORY_ERROR(ENVONLY, + "h5str_dump_region_points: failed to allocate region point data buffer"); - if (H5Sget_select_elem_pointlist(region, (hsize_t)0, (hsize_t)npoints, ptdata) < 0) - H5_LIBRARY_ERROR(ENVONLY); + if (H5Sget_select_elem_pointlist(region_space, (hsize_t)0, (hsize_t)npoints, ptdata) < 0) + H5_LIBRARY_ERROR(ENVONLY); - if ((dtype = H5Dget_type(region_id)) < 0) - H5_LIBRARY_ERROR(ENVONLY); + if (expand_data) { + if ((dtype = H5Dget_type(region_id)) < 0) + H5_LIBRARY_ERROR(ENVONLY); - if ((type_id = H5Tget_native_type(dtype, H5T_DIR_DEFAULT)) < 0) - H5_LIBRARY_ERROR(ENVONLY); + if ((type_id = H5Tget_native_type(dtype, H5T_DIR_DEFAULT)) < 0) + H5_LIBRARY_ERROR(ENVONLY); - if (h5str_print_region_data_points(ENVONLY, region, region_id, str, ndims, type_id, npoints, - ptdata) < 0) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - } + if (h5str_print_region_data_points(ENVONLY, region_space, region_id, str, ndims, type_id, npoints, + ptdata) < 0) + CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); } + else { + if (!h5str_append(str, " REGION_TYPE POINT")) + H5_LIBRARY_ERROR(ENVONLY); - ret_value = SUCCEED; - -done: - if (type_id >= 0) - H5Tclose(type_id); - if (dtype >= 0) - H5Tclose(dtype); - if (ptdata) - HDfree(ptdata); - - return ret_value; -} /* end h5str_dump_region_points_data */ - -#ifndef SKIP_UNUSED_DUMP_ROUTINES -static int -h5str_dump_region_points(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_id) -{ - hssize_t npoints; - hsize_t alloc_size; - hsize_t *ptdata = NULL; - char tmp_str[256]; - int ndims = -1; - int ret_value = FAIL; - - UNUSED(region_id); - - /* - * This function fails if the region does not have points. - */ - H5E_BEGIN_TRY { npoints = H5Sget_select_elem_npoints(region); } - H5E_END_TRY; - - if (npoints < 0) - H5_LIBRARY_ERROR(ENVONLY); - - if ((ndims = H5Sget_simple_extent_ndims(region)) < 0) - H5_LIBRARY_ERROR(ENVONLY); - - /* Print point information */ - if (npoints > 0) { - int i; + if (!h5str_append(str, " {")) + H5_LIBRARY_ERROR(ENVONLY); - alloc_size = (hsize_t)npoints * (hsize_t)ndims * (hsize_t)sizeof(ptdata[0]); - if (alloc_size == (hsize_t)((size_t)alloc_size)) { - if (NULL == (ptdata = (hsize_t *)HDmalloc((size_t)alloc_size))) - H5_OUT_OF_MEMORY_ERROR(ENVONLY, - "h5str_dump_region_points: failed to allocate region point buffer"); + for (i = 0; i < npoints; i++) { + int j; - if (H5Sget_select_elem_pointlist(region, (hsize_t)0, (hsize_t)npoints, ptdata) < 0) + if (!h5str_append(str, " ")) H5_LIBRARY_ERROR(ENVONLY); - if (!h5str_append(str, " {")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - - for (i = 0; i < npoints; i++) { - int j; - - if (!h5str_append(str, " ")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - - for (j = 0; j < ndims; j++) { - tmp_str[0] = '\0'; - - if (HDsprintf(tmp_str, "%s%lu", j ? "," : "(", (unsigned long)(ptdata[i * ndims + j])) < - 0) - H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_region_points: HDsprintf failure"); + for (j = 0; j < ndims; j++) { + tmp_str[0] = '\0'; - if (!h5str_append(str, tmp_str)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - } /* end for (j = 0; j < ndims; j++) */ + if (HDsprintf(tmp_str, "%s%lu", j ? "," : "(", (unsigned long)(ptdata[i * ndims + j])) < 0) + H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_region_points: HDsprintf failure"); - if (!h5str_append(str, ") ")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - } /* end for (i = 0; i < npoints; i++) */ + if (!h5str_append(str, tmp_str)) + H5_LIBRARY_ERROR(ENVONLY); + } /* end for (j = 0; j < ndims; j++) */ - if (!h5str_append(str, " }")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - } /* end if (alloc_size == (hsize_t)((size_t) alloc_size)) */ - } /* end if (npoints > 0) */ + if (!h5str_append(str, ") ")) + H5_LIBRARY_ERROR(ENVONLY); + } /* end for (i = 0; i < npoints; i++) */ + if (!h5str_append(str, " }")) + H5_LIBRARY_ERROR(ENVONLY); + } ret_value = SUCCEED; done: + if (type_id >= 0) + H5Tclose(type_id); + if (dtype >= 0) + H5Tclose(dtype); if (ptdata) HDfree(ptdata); return ret_value; } /* end h5str_dump_region_points */ -#endif static int h5str_is_zero(const void *_mem, size_t size) @@ -2308,30 +2248,22 @@ h5str_render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hs /* Region data */ for (block_index = 0; block_index < block_nelmts; block_index++) { mem = ((unsigned char *)_mem) + block_index * size; - if ((region_id = H5Ropen_object((const H5R_ref_t *)mem, H5P_DEFAULT, H5P_DEFAULT)) < 0) + if ((region_id = H5Ropen_object((H5R_ref_t *)mem, H5P_DEFAULT, H5P_DEFAULT)) < 0) continue; - else { - if ((region_space = - H5Ropen_region((const H5R_ref_t *)mem, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { - if (!h5str_is_zero(mem, H5Tget_size(H5T_STD_REF))) { - region_type = H5Sget_select_type(region_space); - if (region_type == H5S_SEL_POINTS) - ret_value = render_bin_output_region_points(stream, region_space, - region_id, container); - else - ret_value = render_bin_output_region_blocks(stream, region_space, - region_id, container); - } - H5Sclose(region_space); - } /* end if (region_space >= 0) */ - H5Dclose(region_id); - } - - if ((region_type = H5Sget_select_type(region_space)) < 0) { + if ((region_space = H5Ropen_region((H5R_ref_t *)mem, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { + if (!h5str_is_zero(mem, H5Tget_size(H5T_STD_REF))) { + region_type = H5Sget_select_type(region_space); + if (region_type == H5S_SEL_POINTS) + ret_value = render_bin_output_region_points(stream, region_space, region_id, + container); + else if (region_type == H5S_SEL_HYPERSLABS) + ret_value = render_bin_output_region_blocks(stream, region_space, region_id, + container); + } H5Sclose(region_space); - H5Dclose(region_id); - continue; - } + } /* end if (region_space >= 0) */ + H5Dclose(region_id); + if (ret_value < 0) break; } @@ -2711,6 +2643,109 @@ render_bin_output_region_points(FILE *stream, hid_t region_space, hid_t region_i return ret_value; } /* end render_bin_output_region_points */ +/*------------------------------------------------------------------------- + * Purpose: Print some values from an attribute referenced by object reference. + * + * Parameters Description: + * FILE *buffer is the string into which to render + *------------------------------------------------------------------------- + */ +static int +h5str_dump_region_attribute(JNIEnv *env, h5str_t *str, hid_t region_id) +{ + int ret_value = SUCCEED; + hid_t atype = H5I_INVALID_HID; + hid_t type_id = H5I_INVALID_HID; + hid_t region_space = H5I_INVALID_HID; + hsize_t total_size[H5S_MAX_RANK]; /* total size of dataset*/ + size_t i; /* counter */ + size_t size; /* datum size */ + int sndims; /* rank of dataspace */ + hsize_t p_nelmts; /* total selected elmts */ + hsize_t alloc_size; + + unsigned char *buf = NULL; /* buffer for raw data */ + + /* VL data special information */ + unsigned int vl_data = 0; /* contains VL datatypes */ + + if ((region_space = H5Aget_space(region_id)) < 0) { + ret_value = FAIL; + goto done; + } + + if ((sndims = H5Sget_simple_extent_ndims(region_space)) < 0) { + ret_value = FAIL; + goto done; + } + + /* Assume entire data space to be read */ + H5Sget_simple_extent_dims(region_space, total_size, NULL); + p_nelmts = 1; + + for (i = 0; i < sndims; i++) + p_nelmts *= total_size[i]; + + if ((atype = H5Aget_type(region_id)) < 0) { + ret_value = FAIL; + goto done; + } + if ((type_id = H5Tget_native_type(atype, H5T_DIR_DEFAULT)) < 0) { + ret_value = FAIL; + goto done; + } + + /* Check if we have VL data in the dataset's datatype */ + if (h5str_detect_vlen(type_id) == TRUE) + vl_data = TRUE; + + if (!(size = H5Tget_size(type_id))) { + ret_value = FAIL; + goto done; + } + + alloc_size = p_nelmts * size; + HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/ + if (NULL != (buf = (unsigned char *)HDmalloc((size_t)alloc_size))) { + /* Read the data */ + if (H5Aread(region_id, type_id, buf) >= 0) { + + for (i = 0; i < p_nelmts; i++) { + size_t bytes_in = 0; /* # of bytes to write */ + void * memref = buf + i * size; + + if (!(bytes_in = h5str_sprintf(ENVONLY, str, region_id, type_id, memref, 1))) + CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + + if ((i < p_nelmts - 1) && (bytes_in > 0)) { + if (!h5str_append(str, ", ")) + H5_LIBRARY_ERROR(ENVONLY); + } + } + + /* Reclaim any VL memory, if necessary */ + if (vl_data) { + if (H5Treclaim(type_id, region_space, H5P_DEFAULT, buf) < 0) + H5_LIBRARY_ERROR(ENVONLY); + } + } + else + H5_LIBRARY_ERROR(ENVONLY); + } + +done: + if (buf) + HDfree(buf); + if (region_space >= 0) + H5Sclose(region_space); + if (type_id >= 0) + H5Tclose(type_id); + if (atype >= 0) + H5Tclose(type_id); + + return ret_value; +} + int h5str_dump_simple_dset(JNIEnv *env, FILE *stream, hid_t dset, int binary_order) { @@ -2865,7 +2900,7 @@ h5str_dump_simple_dset(JNIEnv *env, FILE *stream, hid_t dset, int binary_order) H5_LIBRARY_ERROR(ENVONLY); if (binary_order == 99) { - if (h5tools_dump_simple_data(ENVONLY, stream, dset, p_type, sm_buf, hs_nelmts) < 0) + if (h5str_dump_simple_data(ENVONLY, stream, dset, p_type, sm_buf, hs_nelmts) < 0) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); } else { @@ -2936,7 +2971,7 @@ H5Tdetect_variable_str(hid_t tid) } /* end H5Tdetect_variable_str */ static int -h5tools_dump_simple_data(JNIEnv *env, FILE *stream, hid_t container, hid_t type, void *_mem, hsize_t nelmts) +h5str_dump_simple_data(JNIEnv *env, FILE *stream, hid_t container, hid_t type, void *_mem, hsize_t nelmts) { unsigned char *mem = (unsigned char *)_mem; h5str_t buffer; /* string into which to render */ @@ -2956,38 +2991,38 @@ h5tools_dump_simple_data(JNIEnv *env, FILE *stream, hid_t container, hid_t type, h5str_new(&buffer, 32 * size); if (!buffer.s) - H5_OUT_OF_MEMORY_ERROR(ENVONLY, "h5tools_dump_simple_data: failed to allocate buffer"); + H5_OUT_OF_MEMORY_ERROR(ENVONLY, "h5str_dump_simple_data: failed to allocate buffer"); - if (!(bytes_in = h5str_sprintf(ENVONLY, &buffer, container, type, memref, 0, 1))) + if (!(bytes_in = h5str_sprintf(ENVONLY, &buffer, container, type, memref, 1))) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - if (i > 0) { + if ((i > 0) && (bytes_in > 0)) { if (HDfprintf(stream, ", ") < 0) - H5_JNI_FATAL_ERROR(ENVONLY, "h5tools_dump_simple_data: HDfprintf failure"); + H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_simple_data: HDfprintf failure"); if (line_count >= H5TOOLS_TEXT_BLOCK) { line_count = 0; if (HDfprintf(stream, "\n") < 0) - H5_JNI_FATAL_ERROR(ENVONLY, "h5tools_dump_simple_data: HDfprintf failure"); + H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_simple_data: HDfprintf failure"); } } if (HDfprintf(stream, "%s", buffer.s) < 0) - H5_JNI_FATAL_ERROR(ENVONLY, "h5tools_dump_simple_data: HDfprintf failure"); + H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_simple_data: HDfprintf failure"); h5str_free(&buffer); } /* end for (i = 0; i < nelmts... */ if (HDfprintf(stream, "\n") < 0) - H5_JNI_FATAL_ERROR(ENVONLY, "h5tools_dump_simple_data: HDfprintf failure"); + H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_simple_data: HDfprintf failure"); done: if (buffer.s) h5str_free(&buffer); return ret_value; -} /* end h5tools_dump_simple_data */ +} /* end h5str_dump_simple_data */ /* * Utility Java APIs @@ -3041,7 +3076,7 @@ Java_hdf_hdf5lib_H5_H5AreadComplex(JNIEnv *env, jclass clss, jlong attr_id, jlon for (i = 0; i < (size_t)n; i++) { h5str.s[0] = '\0'; - if (!h5str_sprintf(ENVONLY, &h5str, attr_id, mem_type_id, readBuf + (i * size), 0, 0)) + if (!h5str_sprintf(ENVONLY, &h5str, attr_id, mem_type_id, readBuf + (i * size), 0)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if (NULL == (jstr = ENVPTR->NewStringUTF(ENVONLY, h5str.s))) diff --git a/java/src/jni/h5util.h b/java/src/jni/h5util.h index 4b79eda58c6..a5e9607816a 100644 --- a/java/src/jni/h5util.h +++ b/java/src/jni/h5util.h @@ -41,13 +41,11 @@ extern void h5str_resize(h5str_t *str, size_t new_len); extern char * h5str_append(h5str_t *str, const char *cstr); extern size_t h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_buf, size_t out_buf_offset); -extern void h5str_sprint_reference(JNIEnv *env, h5str_t *out_str, hid_t container, void *ref_p); +extern int h5str_sprint_reference(JNIEnv *env, h5str_t *out_str, void *ref_p); extern size_t h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *in_buf, - size_t in_buf_len, int expand_data); + int expand_data); extern void h5str_array_free(char **strs, size_t len); extern int h5str_dump_simple_dset(JNIEnv *env, FILE *stream, hid_t dset, int binary_order); -extern int h5str_dump_region_blocks_data(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_obj); -extern int h5str_dump_region_points_data(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_obj); extern htri_t H5Tdetect_variable_str(hid_t tid); diff --git a/java/src/jni/h5vlImp.c b/java/src/jni/h5vlImp.c index 9b48d21228f..40f8863c95d 100644 --- a/java/src/jni/h5vlImp.c +++ b/java/src/jni/h5vlImp.c @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5vlImp.h b/java/src/jni/h5vlImp.h index 70c50062fbd..bf467aff563 100644 --- a/java/src/jni/h5vlImp.h +++ b/java/src/jni/h5vlImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/h5zImp.h b/java/src/jni/h5zImp.h index 924776c731c..4e8982e033a 100644 --- a/java/src/jni/h5zImp.h +++ b/java/src/jni/h5zImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/src/jni/nativeData.h b/java/src/jni/nativeData.h index 398dfc9a8cc..0150c75809d 100644 --- a/java/src/jni/nativeData.h +++ b/java/src/jni/nativeData.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt index b0a0d5326d5..6544b77b12f 100644 --- a/java/test/CMakeLists.txt +++ b/java/test/CMakeLists.txt @@ -27,6 +27,7 @@ set (HDF5_JAVA_TEST_SOURCES TestH5Lbasic TestH5Lcreate TestH5R + TestH5Rref TestH5P TestH5PData TestH5Pfapl @@ -93,6 +94,8 @@ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/h5ex_g_iterateL2.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_files") HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/h5ex_g_iterateO1.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_files") HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/h5ex_g_iterateO2.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_files") +HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/trefer_reg.h5" "${PROJECT_BINARY_DIR}/trefer_reg.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files") +HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/trefer_attr.h5" "${PROJECT_BINARY_DIR}/trefer_attr.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files") add_custom_target(${HDF5_JAVA_TEST_LIB_TARGET}_files ALL COMMENT "Copying files needed by ${HDF5_JAVA_TEST_LIB_TARGET} tests" DEPENDS ${${HDF5_JAVA_TEST_LIB_TARGET}_files_list}) @@ -206,6 +209,8 @@ if (HDF5_TEST_JAVA AND HDF5_TEST_SERIAL) HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/${voltest}/h5ex_g_iterateL2.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files") HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/${voltest}/h5ex_g_iterateO1.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files") HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/${voltest}/h5ex_g_iterateO2.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files") + HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/trefer_reg.h5" "${PROJECT_BINARY_DIR}/${voltest}/trefer_reg.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files") + HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/trefer_attr.h5" "${PROJECT_BINARY_DIR}/${voltest}/trefer_attr.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files") add_custom_target(${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files ALL COMMENT "Copying files needed by ${HDF5_JAVA_TEST_LIB_TARGET} tests" DEPENDS ${${HDF5_JAVA_TEST_LIB_TARGET}_${voltest}_files_list}) diff --git a/java/test/Makefile.am b/java/test/Makefile.am index e953c6b50f5..41cd56eecc7 100644 --- a/java/test/Makefile.am +++ b/java/test/Makefile.am @@ -1,6 +1,5 @@ # # 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 @@ -58,6 +57,7 @@ noinst_JAVA = \ TestH5Lbasic.java \ TestH5Lcreate.java \ TestH5R.java \ + TestH5Rref.java \ TestH5P.java \ TestH5PData.java \ TestH5Pfapl.java \ diff --git a/java/test/TestH5.java b/java/test/TestH5.java index 1f9ea06bf30..a6b60d38514 100644 --- a/java/test/TestH5.java +++ b/java/test/TestH5.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -32,6 +31,7 @@ import hdf.hdf5lib.H5; import hdf.hdf5lib.HDF5Constants; +import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; import org.junit.After; @@ -47,22 +47,21 @@ */ public class TestH5 { @Rule public TestName testname = new TestName(); - @Before - public void showTestName() { - System.out.print(testname.getMethodName()); - } - @After - public void nextTestName() { - System.out.println(); - } private static final String H5_FILE = "testData.h5"; private static final String EXPORT_FILE = "testExport.txt"; + private static final String H5_DREG_FILE = "trefer_reg.h5"; + private static final String EXPORT_DREG_FILE = "testExportReg.txt"; + private static final String H5_AREG_FILE = "trefer_attr.h5"; + private static final String EXPORT_AREG_FILE = "testExportAReg.txt"; private static final int DIM_X = 4; private static final int DIM_Y = 6; + private static final int DIM_BLKS = 36; + private static final int DIM_PNTS = 10; + private static final int DIM_ATTR = 12; private static final int RANK = 2; - long H5fid = -1; - long H5dsid = -1; - long H5did = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5did = HDF5Constants.H5I_INVALID_HID; long[] H5dims = { DIM_X, DIM_Y }; private final void _deleteFile(String filename) { @@ -78,7 +77,7 @@ private final void _deleteFile(String filename) { } private final long _createDataset(long fid, long dsid, String name, long dapl) { - long did = -1; + long did = HDF5Constants.H5I_INVALID_HID; try { did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32LE, dsid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl); @@ -115,22 +114,64 @@ private final void _createH5File() { } } - public final void _closeH5File() throws HDF5LibraryException { + private final void _closeH5File() { if (H5did >= 0) try {H5.H5Dclose(H5did);} catch (Exception ex) {} if (H5dsid > 0) try {H5.H5Sclose(H5dsid);} catch (Exception ex) {} if (H5fid > 0) try {H5.H5Fclose(H5fid);} catch (Exception ex) {} - H5fid = -1; - H5dsid = -1; - H5did = -1; + H5fid = HDF5Constants.H5I_INVALID_HID; + H5dsid = HDF5Constants.H5I_INVALID_HID; + H5did = HDF5Constants.H5I_INVALID_HID; + } + + public void _openH5File(String filename, String dsetname) { + try { + H5fid = H5.H5Fopen(filename, + HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT); + } + catch (Throwable err) { + err.printStackTrace(); + fail("TestH5._openH5file: " + err); + } + assertTrue("TestH5._openH5file: H5.H5Fopen: ", H5fid >= 0); + try { + H5did = H5.H5Dopen(H5fid, dsetname, HDF5Constants.H5P_DEFAULT); + } + catch (Throwable err) { + err.printStackTrace(); + fail("TestH5._openH5file: " + err); + } + assertTrue("TestH5._openH5file: H5.H5Dopen: ", H5did >= 0); + try { + H5dsid = H5.H5Dget_space(H5did); + } + catch (Throwable err) { + err.printStackTrace(); + fail("TestH5._openH5file: " + err); + } + assertTrue("TestH5._openH5file: H5.H5Screate_simple: ",H5dsid > 0); } public final void _deleteH5file() { + _closeH5File(); _deleteFile(H5_FILE); } + @After + public void closeH5File() throws HDF5LibraryException { + _closeH5File(); + System.out.println(); + } + + @Before + public void verifyCount() + throws NullPointerException, HDF5Exception { + assertTrue("H5 open ids is 0", H5.getOpenIDCount()==0); + System.out.print(testname.getMethodName()); + } + /** * Test method for {@link hdf.hdf5lib.H5#J2C(int)}. * NOTE: @@ -411,4 +452,84 @@ public void testH5export_dataset() { } _deleteH5file(); } + + @Test + public void testH5export_regdataset() { + int[] dset_data_expect = {66, 69, 72, 75, 78, 81, 96, 99, 102, 105, 108, + 111, 126, 129, 132, 135, 138, 141, 156, 159, 162, 165, 168, 171, + 186, 189, 192, 195, 198, 201, 216, 219, 222, 225, 228, 231, + 207, 66, 252, 48, 84, 96, 12, 14, 213, 99}; + int[] dset_indata = new int[DIM_BLKS+DIM_PNTS]; + String objName = "/Dataset1"; + + _openH5File(H5_DREG_FILE, objName); + + try { + H5.H5export_dataset(EXPORT_DREG_FILE, H5_DREG_FILE, objName, 99); + } + catch (HDF5LibraryException err) { + err.printStackTrace(); + fail("H5export_dataset failed: " + err); + } + + File file = new File(EXPORT_DREG_FILE); + + try { + Reader reader = new FileReader(EXPORT_DREG_FILE); + StreamTokenizer streamTokenizer = new StreamTokenizer(reader); + int indx = 0; + while(streamTokenizer.nextToken() != StreamTokenizer.TT_EOF){ + if(streamTokenizer.ttype == StreamTokenizer.TT_NUMBER) { + dset_indata[indx] = (int)streamTokenizer.nval; + indx++; + } + } + reader.close(); + } + catch (IOException err) { + err.printStackTrace(); + fail("read file failed: " + err); + } + for(int row = 0; row < DIM_X; row++) + assertTrue("H5export_dataset: <"+row+">"+dset_indata[row], dset_indata[row]==dset_data_expect[row]); + } + + @Test + public void testH5export_attrdataset() { + int[] dset_data_expect = {0, 3, 6, 9, 1, 4, 7, 10, 2, 5, 8, 11}; + int[] dset_indata = new int[DIM_ATTR]; + String objName = "/Dataset3"; + + _openH5File(H5_AREG_FILE, objName); + + try { + H5.H5export_dataset(EXPORT_AREG_FILE, H5_AREG_FILE, objName, 99); + } + catch (HDF5LibraryException err) { + err.printStackTrace(); + fail("H5export_dataset failed: " + err); + } + + File file = new File(EXPORT_AREG_FILE); + + try { + Reader reader = new FileReader(EXPORT_AREG_FILE); + StreamTokenizer streamTokenizer = new StreamTokenizer(reader); + int indx = 0; + int jndx = 0; + while(streamTokenizer.nextToken() != StreamTokenizer.TT_EOF){ + if(streamTokenizer.ttype == StreamTokenizer.TT_NUMBER) { + dset_indata[indx] = (int)streamTokenizer.nval; + indx++; + } + } + reader.close(); + } + catch (IOException err) { + err.printStackTrace(); + fail("read file failed: " + err); + } + for(int row = 0; row < DIM_X; row++) + assertTrue("H5export_dataset: <"+row+">"+dset_indata[row], dset_indata[row]==dset_data_expect[row]); + } } diff --git a/java/test/TestH5A.java b/java/test/TestH5A.java index cff03f95d44..f2134d2a2fe 100644 --- a/java/test/TestH5A.java +++ b/java/test/TestH5A.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -43,14 +42,14 @@ public class TestH5A { private static final String H5_FILE = "testA.h5"; private static final int DIM_X = 4; private static final int DIM_Y = 6; - long H5fid = -1; - long H5dsid = -1; - long H5did = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5did = HDF5Constants.H5I_INVALID_HID; long[] H5dims = { DIM_X, DIM_Y }; - long type_id = -1; - long space_id = -1; - long lapl_id = -1; - long aapl_id = -1; + long type_id = HDF5Constants.H5I_INVALID_HID; + long space_id = HDF5Constants.H5I_INVALID_HID; + long lapl_id = HDF5Constants.H5I_INVALID_HID; + long aapl_id = HDF5Constants.H5I_INVALID_HID; private final void _deleteFile(String filename) { File file = new File(filename); @@ -61,7 +60,7 @@ private final void _deleteFile(String filename) { } private final long _createDataset(long fid, long dsid, String name, long dapl) { - long did = -1; + long did = HDF5Constants.H5I_INVALID_HID; try { did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl); @@ -132,7 +131,7 @@ public void deleteH5file() throws HDF5LibraryException { @Test public void testH5Acreate2() { - long attr_id = -1; + long attr_id = HDF5Constants.H5I_INVALID_HID; try { attr_id = H5.H5Acreate(H5did, "dset", type_id, space_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); assertTrue("testH5Acreate2", attr_id >= 0); @@ -160,8 +159,8 @@ public void testH5Acreate2_nullname() throws Throwable { @Test public void testH5Aopen() { String attr_name = "dset"; - long attribute_id = -1; - long attr_id = -1; + long attribute_id = HDF5Constants.H5I_INVALID_HID; + long attr_id = HDF5Constants.H5I_INVALID_HID; try { attr_id = H5.H5Acreate(H5did, attr_name, type_id, space_id, @@ -197,8 +196,8 @@ public void testH5Aopen_by_idx() { int idx_type = HDF5Constants.H5_INDEX_CRT_ORDER; int order = HDF5Constants.H5_ITER_INC; long n = 0; - long attr_id = -1; - long attribute_id = -1; + long attr_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; try { attr_id = H5.H5Acreate(H5did, "file", type_id, space_id, @@ -256,7 +255,7 @@ public void testH5Aopen_by_idx() { public void testH5Acreate_by_name() { String obj_name = "."; String attr_name = "DATASET"; - long attribute_id = -1; + long attribute_id = HDF5Constants.H5I_INVALID_HID; boolean bool_val = false; try { @@ -288,7 +287,7 @@ public void testH5Arename() throws Throwable, HDF5LibraryException, NullPointerE long loc_id = H5fid; String old_attr_name = "old"; String new_attr_name = "new"; - long attr_id = -1; + long attr_id = HDF5Constants.H5I_INVALID_HID; int ret_val = -1; boolean bool_val = false; @@ -326,7 +325,7 @@ public void testH5Arename_by_name() { String obj_name = "."; String old_attr_name = "old"; String new_attr_name = "new"; - long attr_id = -1; + long attr_id = HDF5Constants.H5I_INVALID_HID; int ret_val = -1; boolean bool_val = false; @@ -368,7 +367,7 @@ public void testH5Aget_name() { String obj_name = "."; String attr_name = "DATASET1"; String ret_name = null; - long attribute_id = -1; + long attribute_id = HDF5Constants.H5I_INVALID_HID; try { attribute_id = H5.H5Acreate_by_name(H5fid, obj_name, attr_name, @@ -398,8 +397,8 @@ public void testH5Aget_name_by_idx() { int idx_type = HDF5Constants.H5_INDEX_NAME; int order = HDF5Constants.H5_ITER_INC; int n = 0; - long attr1_id = -1; - long attr2_id = -1; + long attr1_id = HDF5Constants.H5I_INVALID_HID; + long attr2_id = HDF5Constants.H5I_INVALID_HID; try { attr1_id = H5.H5Acreate_by_name(loc_id, obj_name, attr_name, @@ -435,8 +434,8 @@ public void testH5Aget_name_by_idx() { @Test public void testH5Aget_storage_size() { - long attr_id = -1; - long attr_size = -1; + long attr_id = HDF5Constants.H5I_INVALID_HID; + long attr_size = HDF5Constants.H5I_INVALID_HID; try { attr_id = H5.H5Acreate(H5did, "dset", type_id, space_id, @@ -458,8 +457,8 @@ public void testH5Aget_storage_size() { @Test public void testH5Aget_info() { H5A_info_t attr_info = null; - long attribute_id = -1; - long attr_id = -1; + long attribute_id = HDF5Constants.H5I_INVALID_HID; + long attr_id = HDF5Constants.H5I_INVALID_HID; try { attr_id = H5.H5Acreate(H5did, "dset", type_id, space_id, @@ -490,8 +489,8 @@ public void testH5Aget_info() { @Test public void testH5Aget_info1() { H5A_info_t attr_info = null; - long attribute_id = -1; - long attr_id = -1; + long attribute_id = HDF5Constants.H5I_INVALID_HID; + long attr_id = HDF5Constants.H5I_INVALID_HID; int order = HDF5Constants.H5_ITER_INC; try { @@ -526,8 +525,8 @@ public void testH5Aget_info1() { @Test public void testH5Aget_info_by_idx() { - long attr_id = -1; - long attr2_id = -1;; + long attr_id = HDF5Constants.H5I_INVALID_HID; + long attr2_id = HDF5Constants.H5I_INVALID_HID;; H5A_info_t attr_info = null; try { @@ -582,7 +581,7 @@ public void testH5Aget_info_by_idx() { @Test public void testH5Aget_info_by_name() { - long attr_id = -1; + long attr_id = HDF5Constants.H5I_INVALID_HID; H5A_info_t attr_info = null; String obj_name = "."; String attr_name = "DATASET"; @@ -607,7 +606,7 @@ public void testH5Aget_info_by_name() { @Test public void testH5Adelete_by_name() { - long attr_id = -1; + long attr_id = HDF5Constants.H5I_INVALID_HID; int ret_val = -1; boolean bool_val = false; boolean exists = false; @@ -650,8 +649,8 @@ public void testH5Adelete_by_name() { @Test public void testH5Aexists() { boolean exists = false; - long attr_id = -1; - long attribute_id = -1; + long attr_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; try { exists = H5.H5Aexists(H5fid, "None"); @@ -689,10 +688,10 @@ public void testH5Aexists() { @Test public void testH5Adelete_by_idx_order() { boolean exists = false; - long attr1_id = -1; - long attr2_id = -1; - long attr3_id = -1; - long attr4_id = -1; + long attr1_id = HDF5Constants.H5I_INVALID_HID; + long attr2_id = HDF5Constants.H5I_INVALID_HID; + long attr3_id = HDF5Constants.H5I_INVALID_HID; + long attr4_id = HDF5Constants.H5I_INVALID_HID; try { attr1_id = H5.H5Acreate_by_name(H5fid, ".", "attribute1", @@ -731,9 +730,9 @@ public void testH5Adelete_by_idx_order() { @Test public void testH5Adelete_by_idx_name1() { boolean exists = false; - long attr1_id = -1; - long attr2_id = -1; - long attr3_id = -1; + long attr1_id = HDF5Constants.H5I_INVALID_HID; + long attr2_id = HDF5Constants.H5I_INVALID_HID; + long attr3_id = HDF5Constants.H5I_INVALID_HID; try { attr1_id = H5.H5Acreate_by_name(H5fid, ".", "attribute1", @@ -766,10 +765,10 @@ public void testH5Adelete_by_idx_name1() { @Test public void testH5Adelete_by_idx_name2() { boolean exists = false; - long attr1_id = -1; - long attr2_id = -1; - long attr3_id = -1; - long attr4_id = -1; + long attr1_id = HDF5Constants.H5I_INVALID_HID; + long attr2_id = HDF5Constants.H5I_INVALID_HID; + long attr3_id = HDF5Constants.H5I_INVALID_HID; + long attr4_id = HDF5Constants.H5I_INVALID_HID; try { attr1_id = H5.H5Acreate_by_name(H5fid, ".", "attribute1", @@ -821,8 +820,8 @@ public void testH5Adelete_by_idx_invalidobject() throws Throwable { public void testH5Aopen_by_name() { String obj_name = "."; String attr_name = "DATASET"; - long attribute_id = -1; - long aid = -1; + long attribute_id = HDF5Constants.H5I_INVALID_HID; + long aid = HDF5Constants.H5I_INVALID_HID; try { attribute_id = H5.H5Acreate_by_name(H5fid, obj_name, attr_name, @@ -856,9 +855,9 @@ public void testH5Aopen_by_name() { @Test public void testH5Awrite_readVL() { String attr_name = "VLdata"; - long attr_id = -1; - long atype_id = -1; - long aspace_id = -1; + long attr_id = HDF5Constants.H5I_INVALID_HID; + long atype_id = HDF5Constants.H5I_INVALID_HID; + long aspace_id = HDF5Constants.H5I_INVALID_HID; String[] str_data = { "Parting", "is such", "sweet", "sorrow." }; long[] dims = { str_data.length }; long lsize = 1; @@ -923,8 +922,8 @@ public void testH5Awrite_readVL() { public void testH5Aget_create_plist() { String attr_name = "DATASET1"; int char_encoding = 0; - long plist_id = -1; - long attribute_id = -1; + long plist_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; try { plist_id = H5.H5Pcreate(HDF5Constants.H5P_ATTRIBUTE_CREATE); @@ -984,10 +983,10 @@ public void testH5Aget_create_plist() { @Test public void testH5Aiterate() { - long attr1_id = -1; - long attr2_id = -1; - long attr3_id = -1; - long attr4_id = -1; + long attr1_id = HDF5Constants.H5I_INVALID_HID; + long attr2_id = HDF5Constants.H5I_INVALID_HID; + long attr3_id = HDF5Constants.H5I_INVALID_HID; + long attr4_id = HDF5Constants.H5I_INVALID_HID; class idata { public String attr_name = null; @@ -1052,10 +1051,10 @@ public int callback(long group, String name, H5A_info_t info, H5A_iterate_t op_d @Test public void testH5Aiterate_by_name() { - long attr1_id = -1; - long attr2_id = -1; - long attr3_id = -1; - long attr4_id = -1; + long attr1_id = HDF5Constants.H5I_INVALID_HID; + long attr2_id = HDF5Constants.H5I_INVALID_HID; + long attr3_id = HDF5Constants.H5I_INVALID_HID; + long attr4_id = HDF5Constants.H5I_INVALID_HID; class idata { public String attr_name = null; diff --git a/java/test/TestH5D.java b/java/test/TestH5D.java index 21f0879f02d..863ce791624 100644 --- a/java/test/TestH5D.java +++ b/java/test/TestH5D.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -39,13 +38,13 @@ public class TestH5D { private static final int DIM_X = 4; private static final int DIM_Y = 6; private static final int RANK = 2; - long H5fid = -1; - long H5faplid = -1; - long H5dsid = -1; - long H5dtid = -1; - long H5did = -1; - long H5did0 = -1; - long H5dcpl_id = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5faplid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5dtid = HDF5Constants.H5I_INVALID_HID; + long H5did = HDF5Constants.H5I_INVALID_HID; + long H5did0 = HDF5Constants.H5I_INVALID_HID; + long H5dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] H5dims = { DIM_X, DIM_Y }; // Values for the status of space allocation @@ -195,9 +194,9 @@ private final void _closeH5file() throws HDF5LibraryException { try {H5.H5Fclose(H5fid);} catch (Exception ex) {} } - private final void _openH5file(String name, long dapl) { + private final void _openH5file(String filename, String dsetname, long dapl) { try { - H5fid = H5.H5Fopen(H5_FILE, + H5fid = H5.H5Fopen(filename, HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT); } catch (Throwable err) { @@ -206,7 +205,7 @@ private final void _openH5file(String name, long dapl) { } assertTrue("TestH5D._openH5file: H5.H5Fopen: ",H5fid >= 0); try { - H5did = H5.H5Dopen(H5fid, name, dapl); + H5did = H5.H5Dopen(H5fid, dsetname, dapl); } catch (Throwable err) { err.printStackTrace(); @@ -268,7 +267,7 @@ public void deleteH5file() throws HDF5LibraryException { @Test public void testH5Dcreate() { - long dataset_id = -1; + long dataset_id = HDF5Constants.H5I_INVALID_HID; try { dataset_id = H5.H5Dcreate(H5fid, "dset", HDF5Constants.H5T_STD_I32BE, H5dsid, @@ -292,7 +291,7 @@ public void testH5Dcreate() { @Test public void testH5Dcreate_anon() { - long dataset_id = -1; + long dataset_id = HDF5Constants.H5I_INVALID_HID; try { dataset_id = H5.H5Dcreate_anon(H5fid, HDF5Constants.H5T_STD_I32BE, H5dsid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); @@ -315,12 +314,12 @@ public void testH5Dcreate_anon() { @Test public void testH5Dopen() { - long dataset_id = -1; + long dataset_id = HDF5Constants.H5I_INVALID_HID; _createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT); try { H5.H5Dclose(H5did); - H5did = -1; + H5did = HDF5Constants.H5I_INVALID_HID; dataset_id = H5.H5Dopen(H5fid, "dset", HDF5Constants.H5P_DEFAULT); } catch (Exception err) { @@ -388,8 +387,8 @@ public void testH5Dget_storage_size() { @Test public void testH5Dget_access_plist() { - long dapl_id = -1; - long test_dapl_id = -1; + long dapl_id = HDF5Constants.H5I_INVALID_HID; + long test_dapl_id = HDF5Constants.H5I_INVALID_HID; int[] mdc_nelmts1 = {0}; int[] mdc_nelmts2 = {0}; long[] rdcc_nelmts1 = {0}; @@ -500,7 +499,7 @@ public void testH5Dget_space_status() { @Test(expected = HDF5LibraryException.class) public void testH5Dget_space_closed() throws Throwable { - long dataset_id = -1; + long dataset_id = HDF5Constants.H5I_INVALID_HID; try { dataset_id = H5.H5Dcreate(H5fid, "dset", HDF5Constants.H5T_STD_I32BE, H5dsid, @@ -518,7 +517,7 @@ public void testH5Dget_space_closed() throws Throwable { @Test public void testH5Dget_space() { - long dataspace_id = -1; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; _createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT); try { @@ -542,7 +541,7 @@ public void testH5Dget_space() { @Test(expected = HDF5LibraryException.class) public void testH5Dget_type_closed() throws Throwable { - long dataset_id = -1; + long dataset_id = HDF5Constants.H5I_INVALID_HID; try { dataset_id = H5.H5Dcreate(H5fid, "dset", HDF5Constants.H5T_STD_I32BE, H5dsid, @@ -560,7 +559,7 @@ public void testH5Dget_type_closed() throws Throwable { @Test public void testH5Dget_type() { - long datatype_id = -1; + long datatype_id = HDF5Constants.H5I_INVALID_HID; _createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT); try { diff --git a/java/test/TestH5Dparams.java b/java/test/TestH5Dparams.java index 66f0d838b58..36611394e84 100644 --- a/java/test/TestH5Dparams.java +++ b/java/test/TestH5Dparams.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/test/TestH5Dplist.java b/java/test/TestH5Dplist.java index 97ce0849bd3..774b9dd7f78 100644 --- a/java/test/TestH5Dplist.java +++ b/java/test/TestH5Dplist.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -42,10 +41,10 @@ public class TestH5Dplist { private static final int NDIMS = 2; private static final int FILLVAL = 99; private static final int RANK = 2; - long H5fid = -1; - long H5dsid = -1; - long H5did = -1; - long H5dcpl_id = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5did = HDF5Constants.H5I_INVALID_HID; + long H5dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] H5dims = { DIM_X, DIM_Y }; long[] H5extdims = { EDIM_X, EDIM_Y }; long[] H5chunk_dims = { CHUNK_X, CHUNK_Y }; diff --git a/java/test/TestH5E.java b/java/test/TestH5E.java index 68cd933e69b..cad0a06e41e 100644 --- a/java/test/TestH5E.java +++ b/java/test/TestH5E.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/test/TestH5Edefault.java b/java/test/TestH5Edefault.java index 2f05c752d14..9e93cea48f6 100644 --- a/java/test/TestH5Edefault.java +++ b/java/test/TestH5Edefault.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -58,27 +57,27 @@ public void testH5Eprint2_invalid_classid() throws Throwable { @Ignore public void testH5Eprint() { - /* - * If HDF5_VOL_CONNECTOR is set, this might not be the - * native connector and the error stack might be different. - * Only check for the specific error stack if the native - * connector is being used. - */ - String connector = System.getenv("HDF5_VOL_CONNECTOR"); - if (connector == null) { - try { - H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT); - } - catch (Throwable err) { - } - try { - H5.H5Eprint2(HDF5Constants.H5E_DEFAULT, null); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5Eprint: " + err); - } - } + /* + * If HDF5_VOL_CONNECTOR is set, this might not be the + * native connector and the error stack might be different. + * Only check for the specific error stack if the native + * connector is being used. + */ + String connector = System.getenv("HDF5_VOL_CONNECTOR"); + if (connector == null) { + try { + H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT); + } + catch (Throwable err) { + } + try { + H5.H5Eprint2(HDF5Constants.H5E_DEFAULT, null); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5Eprint: " + err); + } + } } @Test @@ -439,27 +438,27 @@ public void testH5EprintInt_invalid_classid() throws Throwable { @Ignore public void testH5EprintInt() { - /* - * If HDF5_VOL_CONNECTOR is set, this might not be the - * native connector and the error stack might be different. - * Only check for the specific error stack if the native - * connector is being used. - */ - String connector = System.getenv("HDF5_VOL_CONNECTOR"); - if (connector == null) { - try { - H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT); - } - catch (Throwable err) { - } - try { - H5.H5Eprint2(HDF5Constants.H5E_DEFAULT, null); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5EprintInt: " + err); - } - } + /* + * If HDF5_VOL_CONNECTOR is set, this might not be the + * native connector and the error stack might be different. + * Only check for the specific error stack if the native + * connector is being used. + */ + String connector = System.getenv("HDF5_VOL_CONNECTOR"); + if (connector == null) { + try { + H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT); + } + catch (Throwable err) { + } + try { + H5.H5Eprint2(HDF5Constants.H5E_DEFAULT, null); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5EprintInt: " + err); + } + } } @Test diff --git a/java/test/TestH5Eparams.java b/java/test/TestH5Eparams.java index e74475f066d..e55f1fc702f 100644 --- a/java/test/TestH5Eparams.java +++ b/java/test/TestH5Eparams.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/test/TestH5Eregister.java b/java/test/TestH5Eregister.java index 99f8303b208..99e8e5f004b 100644 --- a/java/test/TestH5Eregister.java +++ b/java/test/TestH5Eregister.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/test/TestH5F.java b/java/test/TestH5F.java index 3ef463575b1..16786b95fc4 100644 --- a/java/test/TestH5F.java +++ b/java/test/TestH5F.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -49,7 +48,7 @@ public class TestH5F { HDF5Constants.H5F_OBJ_DATASET, HDF5Constants.H5F_OBJ_GROUP, HDF5Constants.H5F_OBJ_DATATYPE, HDF5Constants.H5F_OBJ_ATTR, HDF5Constants.H5F_OBJ_ALL }; - long H5fid = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; private final void _deleteFile(String filename) { File file = new File(filename); @@ -74,7 +73,7 @@ public void createH5file() public void deleteH5file() throws HDF5LibraryException { if (H5fid > 0) { try {H5.H5Fclose(H5fid);} catch (Exception ex) {} - H5fid = -1; + H5fid = HDF5Constants.H5I_INVALID_HID; } _deleteFile(H5_FILE); System.out.println(); @@ -82,7 +81,7 @@ public void deleteH5file() throws HDF5LibraryException { @Test public void testH5Fget_create_plist() { - long plist = -1; + long plist = HDF5Constants.H5I_INVALID_HID; try { plist = H5.H5Fget_create_plist(H5fid); @@ -106,7 +105,7 @@ public void testH5Fget_create_plist_closed() throws Throwable { @Test public void testH5Fget_access_plist() { - long plist = -1; + long plist = HDF5Constants.H5I_INVALID_HID; try { plist = H5.H5Fget_access_plist(H5fid); @@ -134,7 +133,7 @@ public void testH5Fget_intent_rdwr() { if (H5fid > 0) { try {H5.H5Fclose(H5fid);} catch (Exception ex) {} - H5fid = -1; + H5fid = HDF5Constants.H5I_INVALID_HID; } try { @@ -159,7 +158,7 @@ public void testH5Fget_intent_rdonly() { if (H5fid > 0) { try {H5.H5Fclose(H5fid);} catch (Exception ex) {} - H5fid = -1; + H5fid = HDF5Constants.H5I_INVALID_HID; } try { @@ -182,8 +181,8 @@ public void testH5Fget_intent_rdonly() { public void testH5Fget_fileno_same() { long fileno1 = 0; long fileno2 = 0; - long fid1 = -1; - long fid2 = -1; + long fid1 = HDF5Constants.H5I_INVALID_HID; + long fid2 = HDF5Constants.H5I_INVALID_HID; try { fid1 = H5.H5Fcreate(H5_FILE2, HDF5Constants.H5F_ACC_TRUNC, @@ -213,7 +212,7 @@ public void testH5Fget_fileno_same() { public void testH5Fget_fileno_diff() { long fileno1 = 0; long fileno2 = 0; - long fid2 = -1; + long fid2 = HDF5Constants.H5I_INVALID_HID; try { fid2 = H5.H5Fcreate(H5_FILE2, HDF5Constants.H5F_ACC_TRUNC, diff --git a/java/test/TestH5Fbasic.java b/java/test/TestH5Fbasic.java index 225e31151fe..4f3d9286e73 100644 --- a/java/test/TestH5Fbasic.java +++ b/java/test/TestH5Fbasic.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -35,7 +34,7 @@ public class TestH5Fbasic { @Rule public TestName testname = new TestName(); private static final String H5_FILE = "testFb.h5"; private static final String TXT_FILE = "testFb.txt"; - long H5fid = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; private final void _deleteFile(String filename) { File file = new File(filename); @@ -90,7 +89,7 @@ public void testH5Fcreate_EXCL() throws Throwable { @Test(expected = HDF5LibraryException.class) public void testH5Fopen_read_only() throws Throwable { - long fid = -1; + long fid = HDF5Constants.H5I_INVALID_HID; try { fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR, @@ -125,8 +124,8 @@ public void testH5Fopen_read_only() throws Throwable { @Test(expected = HDF5LibraryException.class) public void testH5Freopen_closed() throws Throwable { - long fid = -1; - long fid2 = -1; + long fid = HDF5Constants.H5I_INVALID_HID; + long fid2 = HDF5Constants.H5I_INVALID_HID; try { fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR, @@ -148,8 +147,8 @@ public void testH5Freopen_closed() throws Throwable { @Test public void testH5Freopen() { - long fid = -1; - long fid2 = -1; + long fid = HDF5Constants.H5I_INVALID_HID; + long fid2 = HDF5Constants.H5I_INVALID_HID; try { fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR, @@ -182,7 +181,7 @@ public void testH5Freopen() { @Test public void testH5Fclose() { - long fid = -1; + long fid = HDF5Constants.H5I_INVALID_HID; try { fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR, @@ -202,7 +201,7 @@ public void testH5Fclose() { @Test(expected = HDF5LibraryException.class) public void testH5Fclose_twice() throws Throwable { - long fid = -1; + long fid = HDF5Constants.H5I_INVALID_HID; try { fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR, diff --git a/java/test/TestH5Fparams.java b/java/test/TestH5Fparams.java index 85bfdf5c4a7..0376485d907 100644 --- a/java/test/TestH5Fparams.java +++ b/java/test/TestH5Fparams.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -105,7 +104,7 @@ public void testH5Fclose_negative() throws Throwable { @Test public void testH5Fcreate() { - long fid = -1; + long fid = HDF5Constants.H5I_INVALID_HID; File file = null; try { @@ -132,7 +131,7 @@ public void testH5Fcreate() { @Test public void testH5Fflush_global() { - long fid = -1; + long fid = HDF5Constants.H5I_INVALID_HID; try { fid = H5.H5Fcreate("test.h5", HDF5Constants.H5F_ACC_TRUNC, @@ -158,7 +157,7 @@ public void testH5Fflush_global() { @Test public void testH5Fflush_local() { - long fid = -1; + long fid = HDF5Constants.H5I_INVALID_HID; try { fid = H5.H5Fcreate("test.h5", HDF5Constants.H5F_ACC_TRUNC, @@ -184,7 +183,7 @@ public void testH5Fflush_local() { @Test public void testH5Fget_info() { - long fid = -1; + long fid = HDF5Constants.H5I_INVALID_HID; try { try { @@ -215,7 +214,7 @@ public void testH5Fget_info() { @Ignore//(expected = HDF5FunctionArgumentException.class) public void testH5Fset_libver_bounds_invalidlow() throws Throwable { - long fid = -1; + long fid = HDF5Constants.H5I_INVALID_HID; try { try { @@ -234,7 +233,7 @@ public void testH5Fset_libver_bounds_invalidlow() throws Throwable { @Ignore//(expected = HDF5FunctionArgumentException.class) public void testH5Fset_libver_bounds_invalidhigh() throws Throwable { - long fid = -1; + long fid = HDF5Constants.H5I_INVALID_HID; try { try { diff --git a/java/test/TestH5Fswmr.java b/java/test/TestH5Fswmr.java index 6a7ccfa351b..1ec78fe9974 100644 --- a/java/test/TestH5Fswmr.java +++ b/java/test/TestH5Fswmr.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -33,9 +32,9 @@ public class TestH5Fswmr { @Rule public TestName testname = new TestName(); private static final String H5_FILE = "testswmr.h5"; - long H5fid = -1; - long H5fapl = -1; - long H5fcpl = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5fapl = HDF5Constants.H5I_INVALID_HID; + long H5fcpl = HDF5Constants.H5I_INVALID_HID; private final void _deleteFile(String filename) { File file = new File(filename); @@ -63,15 +62,15 @@ public void createH5file() public void deleteH5file() throws HDF5LibraryException { if (H5fapl > 0) { try {H5.H5Pclose(H5fapl);} catch (Exception ex) {} - H5fapl = -1; + H5fapl = HDF5Constants.H5I_INVALID_HID; } if (H5fcpl > 0) { try {H5.H5Pclose(H5fcpl);} catch (Exception ex) {} - H5fcpl = -1; + H5fcpl = HDF5Constants.H5I_INVALID_HID; } if (H5fid > 0) { try {H5.H5Fclose(H5fid);} catch (Exception ex) {} - H5fid = -1; + H5fid = HDF5Constants.H5I_INVALID_HID; } _deleteFile(H5_FILE); System.out.println(); diff --git a/java/test/TestH5G.java b/java/test/TestH5G.java index abd964215f9..edf2cbe848a 100644 --- a/java/test/TestH5G.java +++ b/java/test/TestH5G.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -39,11 +38,11 @@ public class TestH5G { private static final String[] GROUPS = { "/G1", "/G1/G11", "/G1/G12", "/G1/G11/G111", "/G1/G11/G112", "/G1/G11/G113", "/G1/G11/G114" }; private static final String[] GROUPS2 = { "/G1", "/G1/G14", "/G1/G12", "/G1/G13", "/G1/G11"}; - long H5fid = -1; - long H5fid2 = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5fid2 = HDF5Constants.H5I_INVALID_HID; private final long _createGroup(long fid, String name) { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; try { gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); @@ -58,8 +57,8 @@ private final long _createGroup(long fid, String name) { } private final long _createGroup2(long fid, String name) { - long gid = -1; - long gcpl = -1; + long gid = HDF5Constants.H5I_INVALID_HID; + long gcpl = HDF5Constants.H5I_INVALID_HID; try { gcpl = H5.H5Pcreate(HDF5Constants.H5P_GROUP_CREATE); //create gcpl } @@ -92,12 +91,12 @@ private final long _createGroup2(long fid, String name) { } private final long _openGroup(long fid, String name) { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; try { gid = H5.H5Gopen(fid, name, HDF5Constants.H5P_DEFAULT); } catch (Throwable err) { - gid = -1; + gid = HDF5Constants.H5I_INVALID_HID; err.printStackTrace(); fail("H5.H5Gopen: " + err); } @@ -134,7 +133,7 @@ public void createH5file() assertTrue("TestH5G.createH5file: H5.H5Fcreate: ", H5fid > 0); assertTrue("TestH5G.createH5file: H5.H5Fcreate: ", H5fid2 > 0); - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; for (int i = 0; i < GROUPS.length; i++) { gid = _createGroup(H5fid, GROUPS[i]); @@ -165,7 +164,7 @@ public void deleteH5file() throws HDF5LibraryException { @Test public void testH5Gopen() { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; for (int i = 0; i < GROUPS.length; i++) { try { gid = H5.H5Gopen(H5fid, GROUPS[i], HDF5Constants.H5P_DEFAULT); @@ -185,8 +184,8 @@ public void testH5Gopen() { @Test public void testH5Gget_create_plist() { - long gid = -1; - long pid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; + long pid = HDF5Constants.H5I_INVALID_HID; for (int i = 0; i < GROUPS.length; i++) { try { @@ -325,7 +324,7 @@ public void testH5Gget_obj_info_all_gid() { int names_found = 0; try { names_found = H5.H5Gget_obj_info_all(gid, null, objNames, objTypes, lnkTypes, - objTokens, HDF5Constants.H5_INDEX_NAME); + objTokens, HDF5Constants.H5_INDEX_NAME); } catch (Throwable err) { err.printStackTrace(); @@ -366,7 +365,7 @@ public void testH5Gget_obj_info_all_gid2() { int names_found = 0; try { names_found = H5.H5Gget_obj_info_all(gid, null, objNames, objTypes, lnkTypes, - objTokens, HDF5Constants.H5_INDEX_NAME); + objTokens, HDF5Constants.H5_INDEX_NAME); } catch (Throwable err) { err.printStackTrace(); @@ -401,7 +400,7 @@ public void testH5Gget_obj_info_max() { int names_found = 0; try { names_found = H5.H5Gget_obj_info_max(gid, objNames, objTypes, lnkTypes, - objTokens, groups_max_size); + objTokens, groups_max_size); } catch (Throwable err) { err.printStackTrace(); @@ -432,7 +431,7 @@ public void testH5Gget_obj_info_max_limit() { int names_found = 0; try { names_found = H5.H5Gget_obj_info_max(gid, objNames, objTypes, lnkTypes, - objTokens, groups_max_size); + objTokens, groups_max_size); } catch (Throwable err) { err.printStackTrace(); diff --git a/java/test/TestH5Gbasic.java b/java/test/TestH5Gbasic.java index aea417ef6ae..6e2e4505e6e 100644 --- a/java/test/TestH5Gbasic.java +++ b/java/test/TestH5Gbasic.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -33,10 +32,10 @@ public class TestH5Gbasic { @Rule public TestName testname = new TestName(); private static final String H5_FILE = "testGb.h5"; - long H5fid = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; private final long _createGroup(long fid, String name) { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; try { gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); @@ -85,7 +84,7 @@ public void testH5Gclose_invalid() throws Throwable { @Test(expected = NullPointerException.class) public void testH5Gcreate_null() throws Throwable { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; // it should fail because the group name is null gid = H5.H5Gcreate(H5fid, null, HDF5Constants.H5P_DEFAULT, @@ -102,7 +101,7 @@ public void testH5Gcreate_invalid() throws Throwable { @Test public void testH5Gcreate() { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; try { gid = H5.H5Gcreate(H5fid, "/testH5Gcreate", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, @@ -145,7 +144,7 @@ public void testH5Gcreate_exists() throws Throwable { @Test public void testH5Gcreate_anon() { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; try { gid = H5.H5Gcreate_anon(H5fid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); @@ -161,7 +160,7 @@ public void testH5Gcreate_anon() { @Test(expected = NullPointerException.class) public void testH5Gopen_null() throws Throwable { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; gid = H5.H5Gopen(H5fid, null, HDF5Constants.H5P_DEFAULT); @@ -175,7 +174,7 @@ public void testH5Gopen_invalid() throws Throwable { @Test(expected = HDF5LibraryException.class) public void testH5Gopen_not_exists() throws Throwable { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; gid = H5.H5Gopen(H5fid, "Never_created", HDF5Constants.H5P_DEFAULT); @@ -209,7 +208,7 @@ public void testH5Gget_create_plist_invalid() throws Throwable { @Test public void testH5Gget_create_plist() { - long pid = -1; + long pid = HDF5Constants.H5I_INVALID_HID; long gid = _createGroup(H5fid, "/testH5Gcreate"); assertTrue(gid > 0); diff --git a/java/test/TestH5Giterate.java b/java/test/TestH5Giterate.java index af210ca4dcd..388d2acace9 100644 --- a/java/test/TestH5Giterate.java +++ b/java/test/TestH5Giterate.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -31,15 +30,15 @@ public class TestH5Giterate { @Rule public TestName testname = new TestName(); private static final String H5_FILE = "h5ex_g_iterate.hdf"; - long H5fid = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; private final long _openGroup(long fid, String name) { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; try { gid = H5.H5Gopen(fid, name, HDF5Constants.H5P_DEFAULT); } catch (Throwable err) { - gid = -1; + gid = HDF5Constants.H5I_INVALID_HID; err.printStackTrace(); fail("H5.H5Gcreate: " + err); } diff --git a/java/test/TestH5Lbasic.java b/java/test/TestH5Lbasic.java index bc4d65cb749..a28fc3d16b0 100644 --- a/java/test/TestH5Lbasic.java +++ b/java/test/TestH5Lbasic.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -35,7 +34,7 @@ public class TestH5Lbasic { @Rule public TestName testname = new TestName(); private static final String H5_FILE = "h5ex_g_iterateL1.hdf"; - long H5fid = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; @Before public void openH5file() diff --git a/java/test/TestH5Lcreate.java b/java/test/TestH5Lcreate.java index de29c1e4080..44af2e57cfc 100644 --- a/java/test/TestH5Lcreate.java +++ b/java/test/TestH5Lcreate.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -41,13 +40,13 @@ public class TestH5Lcreate { private static final String H5_FILE = "testL.h5"; private static final int DIM_X = 4; private static final int DIM_Y = 6; - long H5fcpl = -1; - long H5fid = -1; - long H5dsid = -1; - long H5did1 = -1; - long H5did2 = -1; - long H5gcpl = -1; - long H5gid = -1; + long H5fcpl = HDF5Constants.H5I_INVALID_HID; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5did1 = HDF5Constants.H5I_INVALID_HID; + long H5did2 = HDF5Constants.H5I_INVALID_HID; + long H5gcpl = HDF5Constants.H5I_INVALID_HID; + long H5gid = HDF5Constants.H5I_INVALID_HID; long[] H5dims = { DIM_X, DIM_Y }; private final void _deleteFile(String filename) { @@ -64,7 +63,7 @@ private final void _deleteFile(String filename) { } private final long _createDataset(long fid, long dsid, String name, long dapl) { - long did = -1; + long did = HDF5Constants.H5I_INVALID_HID; try { did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, @@ -80,7 +79,7 @@ private final long _createDataset(long fid, long dsid, String name, long dapl) { } private final long _createGroup(long fid, String name) { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; try { H5gcpl = HDF5Constants.H5P_DEFAULT; gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT, diff --git a/java/test/TestH5Lparams.java b/java/test/TestH5Lparams.java index 2ce1eca2b71..30ee242fc70 100644 --- a/java/test/TestH5Lparams.java +++ b/java/test/TestH5Lparams.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/test/TestH5Obasic.java b/java/test/TestH5Obasic.java index 89474c4471b..350b7aaf7e4 100644 --- a/java/test/TestH5Obasic.java +++ b/java/test/TestH5Obasic.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -41,7 +40,7 @@ public class TestH5Obasic { private static final String H5_FILE = "h5ex_g_iterateO1.hdf"; private static H5O_token_t H5la_ds1 = null; private static H5O_token_t H5la_l1 = null; - long H5fid = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; @Before public void openH5file() @@ -69,7 +68,7 @@ public void closeH5file() throws HDF5LibraryException { @Test(expected = HDF5LibraryException.class) public void testH5Oopen_not_exists() throws Throwable { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; oid = H5.H5Oopen(H5fid, "Never_created", HDF5Constants.H5P_DEFAULT); @@ -78,7 +77,7 @@ public void testH5Oopen_not_exists() throws Throwable { @Test public void testH5Oget_info_dataset() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_info_t obj_info = null; try { @@ -96,7 +95,7 @@ public void testH5Oget_info_dataset() { @Test public void testH5Oget_info_hardlink() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_info_t obj_info = null; try { oid = H5.H5Oopen(H5fid, "L1", HDF5Constants.H5P_DEFAULT); @@ -113,7 +112,7 @@ public void testH5Oget_info_hardlink() { @Test public void testH5Oget_info_group() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_info_t obj_info = null; try { oid = H5.H5Oopen(H5fid, "G1", HDF5Constants.H5P_DEFAULT); @@ -130,7 +129,7 @@ public void testH5Oget_info_group() { @Test public void testH5Oget_info_datatype() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_info_t obj_info = null; try { oid = H5.H5Oopen(H5fid, "DT1", HDF5Constants.H5P_DEFAULT); @@ -234,7 +233,7 @@ public void testH5Oget_info_by_idx_not_exist_create() throws Throwable { @Test public void testH5Oget_info_by_idx_n0() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_info_t obj_info = null; try { oid = H5.H5Oopen(H5fid, "DS1", HDF5Constants.H5P_DEFAULT); @@ -260,7 +259,7 @@ public void testH5Oget_info_by_idx_n0() { @Test public void testH5Oget_info_by_idx_n3() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_info_t obj_info = null; try { oid = H5.H5Oopen(H5fid, "L1", HDF5Constants.H5P_DEFAULT); @@ -286,7 +285,7 @@ public void testH5Oget_info_by_idx_n3() { @Test public void testH5Oget_native_info_dataset() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_native_info_t native_info = null; try { @@ -306,7 +305,7 @@ public void testH5Oget_native_info_dataset() { @Test public void testH5Oget_native_info_hardlink() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_native_info_t native_info = null; try { @@ -326,7 +325,7 @@ public void testH5Oget_native_info_hardlink() { @Test public void testH5Oget_native_info_group() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_native_info_t native_info = null; try { @@ -346,7 +345,7 @@ public void testH5Oget_native_info_group() { @Test public void testH5Oget_native_info_datatype() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_native_info_t native_info = null; try { @@ -376,10 +375,10 @@ public void testH5Oget_native_info_by_name_not_exists() throws Throwable { @Test public void testH5Oget_native_info_by_name_dataset() { - H5O_native_info_t native_info = null; + H5O_native_info_t native_info = null; try { - native_info = H5.H5Oget_native_info_by_name(H5fid, "DS1", HDF5Constants.H5P_DEFAULT); + native_info = H5.H5Oget_native_info_by_name(H5fid, "DS1", HDF5Constants.H5P_DEFAULT); } catch (Throwable err) { err.printStackTrace(); @@ -393,10 +392,10 @@ public void testH5Oget_native_info_by_name_dataset() { @Test public void testH5Oget_native_info_by_name_hardlink() { - H5O_native_info_t native_info = null; + H5O_native_info_t native_info = null; try { - native_info = H5.H5Oget_native_info_by_name(H5fid, "L1", HDF5Constants.H5P_DEFAULT); + native_info = H5.H5Oget_native_info_by_name(H5fid, "L1", HDF5Constants.H5P_DEFAULT); } catch (Throwable err) { err.printStackTrace(); @@ -410,10 +409,10 @@ public void testH5Oget_native_info_by_name_hardlink() { @Test public void testH5Oget_native_info_by_name_group() { - H5O_native_info_t native_info = null; + H5O_native_info_t native_info = null; try { - native_info = H5.H5Oget_native_info_by_name(H5fid, "G1", HDF5Constants.H5P_DEFAULT); + native_info = H5.H5Oget_native_info_by_name(H5fid, "G1", HDF5Constants.H5P_DEFAULT); } catch (Throwable err) { err.printStackTrace(); @@ -427,10 +426,10 @@ public void testH5Oget_native_info_by_name_group() { @Test public void testH5Oget_native_info_by_name_datatype() { - H5O_native_info_t native_info = null; + H5O_native_info_t native_info = null; try { - native_info = H5.H5Oget_native_info_by_name(H5fid, "DT1", HDF5Constants.H5P_DEFAULT); + native_info = H5.H5Oget_native_info_by_name(H5fid, "DT1", HDF5Constants.H5P_DEFAULT); } catch (Throwable err) { err.printStackTrace(); @@ -464,7 +463,7 @@ public void testH5Oget_native_info_by_idx_not_exist_create() throws Throwable { @Test public void testH5Oget_native_info_by_idx_n0() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_native_info_t native_info = null; H5O_hdr_info_t ohdr; H5_ih_info_t oinfo; @@ -486,7 +485,7 @@ public void testH5Oget_native_info_by_idx_n0() { try {H5.H5Oclose(oid);} catch (Exception ex) {} try { - native_info = H5.H5Oget_native_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT); + native_info = H5.H5Oget_native_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 0, HDF5Constants.H5P_DEFAULT); } catch (Throwable err) { err.printStackTrace(); @@ -503,7 +502,7 @@ public void testH5Oget_native_info_by_idx_n0() { @Test public void testH5Oget_native_info_by_idx_n3() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_native_info_t native_info = null; H5O_hdr_info_t ohdr; H5_ih_info_t oinfo; @@ -525,7 +524,7 @@ public void testH5Oget_native_info_by_idx_n3() { try {H5.H5Oclose(oid);} catch (Exception ex) {} try { - native_info = H5.H5Oget_native_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 3, HDF5Constants.H5P_DEFAULT); + native_info = H5.H5Oget_native_info_by_idx(H5fid, "/", HDF5Constants.H5_INDEX_NAME, HDF5Constants.H5_ITER_INC, 3, HDF5Constants.H5P_DEFAULT); } catch (Throwable err) { err.printStackTrace(); @@ -630,7 +629,7 @@ public void testH5Oexists_by_name() { @Test public void testH5Oopen_by_token() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_info_t obj_info = null; try { try { @@ -668,7 +667,7 @@ public void testH5Oopen_by_token() { @Test public void testH5Oopen_by_idx_n0() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_info_t obj_info = null; try { try { @@ -706,7 +705,7 @@ public void testH5Oopen_by_idx_n0() { @Test public void testH5Oopen_by_idx_n3() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_info_t obj_info = null; try { try { diff --git a/java/test/TestH5Ocopy.java b/java/test/TestH5Ocopy.java index 4888e76ad01..b3b1acd9cdc 100644 --- a/java/test/TestH5Ocopy.java +++ b/java/test/TestH5Ocopy.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -36,13 +35,13 @@ public class TestH5Ocopy { private static final String FILENAME = "testRefsattribute.h5"; private static final int DIM_X = 4; private static final int DIM_Y = 6; - long H5fid = -1; - long H5dsid = -1; - long H5did1 = -1; - long H5did2 = -1; - long H5gcpl = -1; - long H5gid = -1; - long H5dsid2 = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5did1 = HDF5Constants.H5I_INVALID_HID; + long H5did2 = HDF5Constants.H5I_INVALID_HID; + long H5gcpl = HDF5Constants.H5I_INVALID_HID; + long H5gid = HDF5Constants.H5I_INVALID_HID; + long H5dsid2 = HDF5Constants.H5I_INVALID_HID; long[] dims = { 2 }; private final void _deleteFile(String filename) { @@ -59,7 +58,7 @@ private final void _deleteFile(String filename) { } private final long _createDataset(long fid, long dsid, String name, long dapl) { - long did = -1; + long did = HDF5Constants.H5I_INVALID_HID; try { did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, @@ -75,7 +74,7 @@ private final long _createDataset(long fid, long dsid, String name, long dapl) { } private final long _createGroup(long fid, String name) { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; try { H5gcpl = HDF5Constants.H5P_DEFAULT; gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT, @@ -136,10 +135,10 @@ public void deleteH5file() throws HDF5LibraryException { @Test public void testH5OcopyRefsAttr() { - long ocp_plist_id = -1; + long ocp_plist_id = HDF5Constants.H5I_INVALID_HID; byte rbuf0[]=null , rbuf1[] = null; byte[] dset_data = new byte[16]; - long attribute_id = -1; + long attribute_id = HDF5Constants.H5I_INVALID_HID; try { @@ -184,9 +183,9 @@ public void testH5OcopyRefsAttr() { public void testH5OcopyRefsDatasettodiffFile() { byte rbuf1[] = null; byte[] dset_data = new byte[16]; - long ocp_plist_id = -1; - long dataset_id = -1; - long H5fid2 = -1; + long ocp_plist_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long H5fid2 = HDF5Constants.H5I_INVALID_HID; try { rbuf1 = H5.H5Rcreate(H5fid, "DS2", HDF5Constants.H5R_OBJECT, -1); @@ -244,9 +243,9 @@ public void testH5OcopyRefsDatasettodiffFile() { public void testH5OcopyRefsDatasettosameFile() { byte rbuf0[]=null , rbuf1[] = null; byte[] dset_data = new byte[16]; - long ocp_plist_id = -1; - long dataset_id = -1; - long did = -1; + long ocp_plist_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long did = HDF5Constants.H5I_INVALID_HID; int obj_type = -1; byte[] read_data = new byte[16]; @@ -328,9 +327,9 @@ public void testH5OcopyRefsDatasettosameFile() { // @Test(expected = HDF5LibraryException.class) // public void testH5OcopyInvalidRef() throws Throwable { // final long _pid_ = HDF5Constants.H5P_DEFAULT; -// long sid = -1; -// long did = -1; -// long aid = -1; +// long sid = HDF5Constants.H5I_INVALID_HID; +// long did = HDF5Constants.H5I_INVALID_HID; +// long aid = HDF5Constants.H5I_INVALID_HID; // // try { // sid = H5.H5Screate_simple(1, new long[] {1}, null); diff --git a/java/test/TestH5Ocreate.java b/java/test/TestH5Ocreate.java index 959e99021f4..78ea7441694 100644 --- a/java/test/TestH5Ocreate.java +++ b/java/test/TestH5Ocreate.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -41,13 +40,13 @@ public class TestH5Ocreate { private static final String H5_FILE = "testO.h5"; private static final int DIM_X = 4; private static final int DIM_Y = 6; - long H5fcpl = -1; - long H5fid = -1; - long H5dsid = -1; - long H5did1 = -1; - long H5did2 = -1; - long H5gcpl = -1; - long H5gid = -1; + long H5fcpl = HDF5Constants.H5I_INVALID_HID; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5did1 = HDF5Constants.H5I_INVALID_HID; + long H5did2 = HDF5Constants.H5I_INVALID_HID; + long H5gcpl = HDF5Constants.H5I_INVALID_HID; + long H5gid = HDF5Constants.H5I_INVALID_HID; long[] H5dims = { DIM_X, DIM_Y }; private final void _deleteFile(String filename) { @@ -64,7 +63,7 @@ private final void _deleteFile(String filename) { } private final long _createDataset(long fid, long dsid, String name, long dapl) { - long did = -1; + long did = HDF5Constants.H5I_INVALID_HID; try { did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, @@ -80,7 +79,7 @@ private final long _createDataset(long fid, long dsid, String name, long dapl) { } private final long _createGroup(long fid, String name) { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; try { H5gcpl = HDF5Constants.H5P_DEFAULT; gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT, @@ -293,7 +292,7 @@ public void testH5Oget_info_externallink() { @Test public void testH5Olink() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_info_t obj_info = null; H5O_info_t dst_obj_info = null; try { @@ -380,7 +379,7 @@ public int callback(long group, String name, H5O_info_t info, H5O_iterate_opdata @Test public void testH5Ocomment() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; String obj_comment = null; try { oid = H5.H5Oopen(H5fid, "DS1", HDF5Constants.H5P_DEFAULT); @@ -405,7 +404,7 @@ public void testH5Ocomment() { @Test public void testH5Ocomment_clear() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; String obj_comment = null; try { oid = H5.H5Oopen(H5fid, "DS1", HDF5Constants.H5P_DEFAULT); @@ -506,7 +505,7 @@ public void testH5Ocomment_by_name_clear() { @Test public void testH5Oinc_dec_count() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_info_t obj_info = null; try { try { diff --git a/java/test/TestH5Oparams.java b/java/test/TestH5Oparams.java index 1ad31cb78cd..5cbabe11b0a 100644 --- a/java/test/TestH5Oparams.java +++ b/java/test/TestH5Oparams.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/test/TestH5P.java b/java/test/TestH5P.java index 786c330f81e..38791282000 100644 --- a/java/test/TestH5P.java +++ b/java/test/TestH5P.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -41,20 +40,20 @@ public class TestH5P { private static final int DIM_X = 4; private static final int DIM_Y = 6; long[] H5dims = { DIM_X, DIM_Y }; - long H5fid = -1; - long H5dsid = -1; - long H5did = -1; - long lapl_id = -1; - long fapl_id = -1; - long fcpl_id = -1; - long ocpl_id = -1; - long ocp_plist_id = -1; - long lcpl_id = -1; - long plapl_id = -1; - long plist_id = -1; - long gapl_id = -1; - long gcpl_id = -1; - long acpl_id = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5did = HDF5Constants.H5I_INVALID_HID; + long lapl_id = HDF5Constants.H5I_INVALID_HID; + long fapl_id = HDF5Constants.H5I_INVALID_HID; + long fcpl_id = HDF5Constants.H5I_INVALID_HID; + long ocpl_id = HDF5Constants.H5I_INVALID_HID; + long ocp_plist_id = HDF5Constants.H5I_INVALID_HID; + long lcpl_id = HDF5Constants.H5I_INVALID_HID; + long plapl_id = HDF5Constants.H5I_INVALID_HID; + long plist_id = HDF5Constants.H5I_INVALID_HID; + long gapl_id = HDF5Constants.H5I_INVALID_HID; + long gcpl_id = HDF5Constants.H5I_INVALID_HID; + long acpl_id = HDF5Constants.H5I_INVALID_HID; private final void _deleteFile(String filename) { File file = new File(filename); @@ -65,7 +64,7 @@ private final void _deleteFile(String filename) { } private final long _createDataset(long fid, long dsid, String name, long dapl) { - long did = -1; + long did = HDF5Constants.H5I_INVALID_HID; try { did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl); diff --git a/java/test/TestH5PData.java b/java/test/TestH5PData.java index 82864cd04ee..8b04629e75b 100644 --- a/java/test/TestH5PData.java +++ b/java/test/TestH5PData.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -37,10 +36,10 @@ public class TestH5PData { private static final String H5_FILE = "testPD.h5"; private static final int DIM_X = 12; private static final int DIM_Y = 18; - long H5fid = -1; - long H5dsid = -1; - long H5did = -1; - long plist_id = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5did = HDF5Constants.H5I_INVALID_HID; + long plist_id = HDF5Constants.H5I_INVALID_HID; long[] H5dims = { DIM_X, DIM_Y }; double windchillF[][] = {{36.0, 31.0, 25.0, 19.0, 13.0, 7.0, 1.0, -5.0, -11.0, -16.0, -22.0, -28.0, -34.0, -40.0, -46.0, -52.0, -57.0, -63.0}, @@ -66,7 +65,7 @@ private final void _deleteFile(String filename) { } private final long _createFloatDataset(long fid, long dsid, String name, long dapl) { - long did = -1; + long did = HDF5Constants.H5I_INVALID_HID; try { did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_NATIVE_FLOAT, dsid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl); diff --git a/java/test/TestH5PL.java b/java/test/TestH5PL.java index 98665dc8617..d44cc0b878a 100644 --- a/java/test/TestH5PL.java +++ b/java/test/TestH5PL.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -147,11 +146,11 @@ public void TestH5PLpaths() { @Ignore public void TestH5PLdlopen() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long fapl_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long fapl_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; try { int[] cd_values = {9, 0, 0, 0}; int[] libversion = {0, 0, 0}; diff --git a/java/test/TestH5Pfapl.java b/java/test/TestH5Pfapl.java index d5d090122c6..cc674e2cdd1 100644 --- a/java/test/TestH5Pfapl.java +++ b/java/test/TestH5Pfapl.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -47,17 +46,17 @@ public class TestH5Pfapl { private static final int DIM_Y = 6; private static final int DIMF_X = 12; private static final int DIMF_Y = 18; - long H5fid = -1; - long H5dsid = -1; - long H5did = -1; - long H5Fdsid = -1; - long H5Fdid = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5did = HDF5Constants.H5I_INVALID_HID; + long H5Fdsid = HDF5Constants.H5I_INVALID_HID; + long H5Fdid = HDF5Constants.H5I_INVALID_HID; long[] H5dims = { DIM_X, DIM_Y }; - long fapl_id = -1; - long plapl_id = -1; - long dapl_id = -1; - long plist_id = -1; - long btplist_id = -1; + long fapl_id = HDF5Constants.H5I_INVALID_HID; + long plapl_id = HDF5Constants.H5I_INVALID_HID; + long dapl_id = HDF5Constants.H5I_INVALID_HID; + long plist_id = HDF5Constants.H5I_INVALID_HID; + long btplist_id = HDF5Constants.H5I_INVALID_HID; long[] H5Fdims = { DIMF_X, DIMF_Y }; double windchillF[][] = {{36.0, 31.0, 25.0, 19.0, 13.0, 7.0, 1.0, -5.0, -11.0, -16.0, -22.0, -28.0, -34.0, -40.0, -46.0, -52.0, -57.0, -63.0}, @@ -130,7 +129,7 @@ private final void _deleteMultiFile() { } private final long _createDataset(long fid, long dsid, String name, long dapl) { - long did = -1; + long did = HDF5Constants.H5I_INVALID_HID; try { did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl); @@ -385,7 +384,7 @@ public void testH5Pset_elink_fapl() { @Test public void testH5Pget_elink_fapl() { - long ret_val_id = -1; + long ret_val_id = HDF5Constants.H5I_INVALID_HID; try { ret_val_id = H5.H5Pget_elink_fapl(plapl_id); assertTrue("H5Pget_elink_fapl", ret_val_id >= 0); @@ -403,7 +402,7 @@ public void testH5Pget_elink_fapl() { @Test public void testH5P_elink_fapl() { - long ret_val_id = -1; + long ret_val_id = HDF5Constants.H5I_INVALID_HID; try { H5.H5Pset_elink_fapl(plapl_id, fapl_id ); ret_val_id = H5.H5Pget_elink_fapl(plapl_id); @@ -421,7 +420,7 @@ public void testH5P_elink_fapl() { @Test public void testH5P_elink_file_cache_size() { - long elink_fapl_id = -1; + long elink_fapl_id = HDF5Constants.H5I_INVALID_HID; int efc_size = 0; try { H5.H5Pset_elink_fapl(plapl_id, fapl_id ); diff --git a/java/test/TestH5Pfaplhdfs.java b/java/test/TestH5Pfaplhdfs.java index 398a4d4c5eb..d9226662d69 100644 --- a/java/test/TestH5Pfaplhdfs.java +++ b/java/test/TestH5Pfaplhdfs.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -34,11 +33,11 @@ public class TestH5Pfaplhdfs { @Rule public TestName testname = new TestName(); - long fapl_id = -1; - long plapl_id = -1; - long dapl_id = -1; - long plist_id = -1; - long btplist_id = -1; + long fapl_id = HDF5Constants.H5I_INVALID_HID; + long plapl_id = HDF5Constants.H5I_INVALID_HID; + long dapl_id = HDF5Constants.H5I_INVALID_HID; + long plist_id = HDF5Constants.H5I_INVALID_HID; + long btplist_id = HDF5Constants.H5I_INVALID_HID; @Before public void createFileAccess() throws NullPointerException, HDF5Exception diff --git a/java/test/TestH5Pfapls3.java b/java/test/TestH5Pfapls3.java index a55856ce325..dda27169880 100644 --- a/java/test/TestH5Pfapls3.java +++ b/java/test/TestH5Pfapls3.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -34,11 +33,11 @@ public class TestH5Pfapls3 { @Rule public TestName testname = new TestName(); - long fapl_id = -1; - long plapl_id = -1; - long dapl_id = -1; - long plist_id = -1; - long btplist_id = -1; + long fapl_id = HDF5Constants.H5I_INVALID_HID; + long plapl_id = HDF5Constants.H5I_INVALID_HID; + long dapl_id = HDF5Constants.H5I_INVALID_HID; + long plist_id = HDF5Constants.H5I_INVALID_HID; + long btplist_id = HDF5Constants.H5I_INVALID_HID; @Before public void createFileAccess() throws NullPointerException, HDF5Exception diff --git a/java/test/TestH5Plist.java b/java/test/TestH5Plist.java index 7c436930550..0d5307164b7 100644 --- a/java/test/TestH5Plist.java +++ b/java/test/TestH5Plist.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -85,7 +84,7 @@ public class TestH5Plist { PROP3_NAME, PROP4_NAME}; - long plist_class_id = -1; + long plist_class_id = HDF5Constants.H5I_INVALID_HID; @Before public void createPropClass()throws NullPointerException, HDF5Exception @@ -114,9 +113,9 @@ public void deleteFileAccess() throws HDF5LibraryException { @Test public void testH5P_genprop_basic_class() { int status = -1; - long cid1 = -1; // Generic Property class ID - long cid2 = -1; // Generic Property class ID - long cid3 = -1; // Generic Property class ID + long cid1 = HDF5Constants.H5I_INVALID_HID; // Generic Property class ID + long cid2 = HDF5Constants.H5I_INVALID_HID; // Generic Property class ID + long cid3 = HDF5Constants.H5I_INVALID_HID; // Generic Property class ID String name = null; // Name of class try { @@ -162,7 +161,7 @@ public void testH5P_genprop_basic_class() { // Close parent class try { H5.H5Pclose_class(cid2); - cid2 = -1; + cid2 = HDF5Constants.H5I_INVALID_HID; } catch (Throwable err) { err.printStackTrace(); @@ -172,7 +171,7 @@ public void testH5P_genprop_basic_class() { // Close class try { H5.H5Pclose_class(plist_class_id); - plist_class_id = -1; + plist_class_id = HDF5Constants.H5I_INVALID_HID; } catch (Throwable err) { err.printStackTrace(); @@ -242,7 +241,7 @@ public void testH5P_genprop_basic_class() { // Close parent class's parent try { H5.H5Pclose_class(cid3); - cid3 = -1; + cid3 = HDF5Constants.H5I_INVALID_HID; } catch (Throwable err) { err.printStackTrace(); @@ -252,7 +251,7 @@ public void testH5P_genprop_basic_class() { // Close parent class's parent try { H5.H5Pclose_class(cid2); - cid2 = -1; + cid2 = HDF5Constants.H5I_INVALID_HID; } catch (Throwable err) { err.printStackTrace(); @@ -262,7 +261,7 @@ public void testH5P_genprop_basic_class() { // Close parent class's parent try { H5.H5Pclose_class(cid1); - cid1 = -1; + cid1 = HDF5Constants.H5I_INVALID_HID; } catch (Throwable err) { err.printStackTrace(); @@ -634,7 +633,7 @@ public int callback(long list_id, String name, H5P_iterate_t op_data) { @Test public void testH5P_genprop_basic_list_prop() { boolean status = false; - long lid1 = -1; // Generic Property list ID + long lid1 = HDF5Constants.H5I_INVALID_HID; // Generic Property list ID long nprops = -1; // Number of properties in class try { @@ -760,7 +759,7 @@ public void testH5P_genprop_basic_list_prop() { // @Test // public void testH5P_genprop_class_callback() { // class cdata { -// public long cls_id = -1; +// public long cls_id = HDF5Constants.H5I_INVALID_HID; // public int cls_count = -1; // cdata(long id, int count) { // this.cls_id = id; @@ -813,11 +812,11 @@ public void testH5P_genprop_basic_list_prop() { // } // H5P_cls_close_func_cb cls_close_cb = new H5P_cls_close_callback(); // -// long cid1 = -1; // Generic Property class ID -// long cid2 = -1; // Generic Property class ID -// long lid1 = -1; // Generic Property list ID -// long lid2 = -1; // Generic Property list ID -// long lid3 = -1; // Generic Property list ID +// long cid1 = HDF5Constants.H5I_INVALID_HID; // Generic Property class ID +// long cid2 = HDF5Constants.H5I_INVALID_HID; // Generic Property class ID +// long lid1 = HDF5Constants.H5I_INVALID_HID; // Generic Property list ID +// long lid2 = HDF5Constants.H5I_INVALID_HID; // Generic Property list ID +// long lid3 = HDF5Constants.H5I_INVALID_HID; // Generic Property list ID // long nprops = -1; // Number of properties in class // // try { diff --git a/java/test/TestH5Pvirtual.java b/java/test/TestH5Pvirtual.java index 4c9a763232e..0478356cda6 100644 --- a/java/test/TestH5Pvirtual.java +++ b/java/test/TestH5Pvirtual.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -52,13 +51,13 @@ public class TestH5Pvirtual { private static final int fill_value = -1; long[] H5dims = { DIM_Y }; long[] VDSH5dims = { VDSDIM_X, VDSDIM_Y }; - long H5fid = -1; - long H5dsid = -1; - long H5dssid = -1; - long H5dvsid = -1; - long H5did = -1; - long H5dcplid = -1; - long H5dapl_id = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5dssid = HDF5Constants.H5I_INVALID_HID; + long H5dvsid = HDF5Constants.H5I_INVALID_HID; + long H5did = HDF5Constants.H5I_INVALID_HID; + long H5dcplid = HDF5Constants.H5I_INVALID_HID; + long H5dapl_id = HDF5Constants.H5I_INVALID_HID; private final void _deleteFile(String filename) { File file = new File(filename); @@ -69,8 +68,8 @@ private final void _deleteFile(String filename) { } private final long _createDataset(long fid, long dsid, String name, long dcpl, long dapl) { - long did = -1; - long space_id = -1; + long did = HDF5Constants.H5I_INVALID_HID; + long space_id = HDF5Constants.H5I_INVALID_HID; long[] start = {0, 0}; long[] stride = null; long[] count = {1, 1}; @@ -100,9 +99,9 @@ private final void _createH5File(long fcpl, long fapl) { int[] dset_data = new int[DIM_Y]; // Create source files and datasets for (int i=0; i < 3; i++) { - long space_id = -1; - long dset_id = -1; - long file_id = -1; + long space_id = HDF5Constants.H5I_INVALID_HID; + long dset_id = HDF5Constants.H5I_INVALID_HID; + long file_id = HDF5Constants.H5I_INVALID_HID; for (int j = 0; j < DIM_Y; j++) dset_data[j] = i+1; try { @@ -265,7 +264,7 @@ public void testH5Pget_source_datasetname() throws Throwable { @Test public void testH5Pget_selection_source_dataset() throws Throwable { - long src_space = -1; + long src_space = HDF5Constants.H5I_INVALID_HID; long src_selection = -1; H5did = _createDataset(H5fid, H5dsid, "VDS", H5dcplid, H5dapl_id); diff --git a/java/test/TestH5R.java b/java/test/TestH5R.java index a51c7b62abb..031b8e49ace 100644 --- a/java/test/TestH5R.java +++ b/java/test/TestH5R.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -39,11 +38,11 @@ public class TestH5R { private static final String H5_FILE = "testH5R.h5"; private static final int DIM_X = 4; private static final int DIM_Y = 6; - long H5fid = -1; - long H5dsid = -1; - long H5did = -1; - long H5gid = -1; - long H5did2 = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5did = HDF5Constants.H5I_INVALID_HID; + long H5gid = HDF5Constants.H5I_INVALID_HID; + long H5did2 = HDF5Constants.H5I_INVALID_HID; long[] H5dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; int FILLVAL = 99; @@ -62,7 +61,7 @@ private final void _deleteFile(String filename) { } private final long _createDataset(long fid, long dsid, String name, long dapl) { - long did = -1; + long did = HDF5Constants.H5I_INVALID_HID; try { did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, @@ -78,7 +77,7 @@ private final long _createDataset(long fid, long dsid, String name, long dapl) { } private final long _createGroup(long fid, String name) { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; try { gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); @@ -150,109 +149,6 @@ public void deleteH5file() throws HDF5LibraryException { System.out.println(); } - // Test v1.8 APIs params - /* - * @Ignore public void testH5Rget_name() { long loc_id = H5fid; int ref_type = - * HDF5Constants.H5R_OBJECT; long ret_val = -1; byte[] ref = null; String[] name = {""}; String - * objName = "/dset"; - * - * try { ref = H5.H5Rcreate(H5fid, objName, ref_type, -1); } catch (Throwable err) { - * err.printStackTrace(); fail("H5.H5Rget_name:H5Rcreate " + err); } - * - * try { ret_val = H5.H5Rget_name(loc_id, ref_type, ref, name, 16); } catch (Throwable err) { - * err.printStackTrace(); fail("H5.H5Rget_name: " + err); } - * - * assertTrue("testH5Rget_name: H5Rget_name", ret_val>0); assertTrue("The name of the object: ", - * objName.equals(name[0])); } - * - * @Ignore public void testH5Rget_obj_type2() { int ref_type=HDF5Constants.H5R_OBJECT; byte[] - * ref=null; - * - * String objName = "/dset"; int obj_type = -1; - * - * try { ref = H5.H5Rcreate(H5fid, objName, ref_type, -1); } catch(Throwable err) { - * err.printStackTrace(); } - * - * try { obj_type = H5.H5Rget_obj_type(H5fid, HDF5Constants.H5R_OBJECT, ref); } catch (Throwable - * err) { err.printStackTrace(); fail("H5.H5Rget_obj_type2: " + err); } assertEquals(obj_type, - * HDF5Constants.H5O_TYPE_DATASET); } - * - * @Ignore public void testH5Rcreate_refobj() { byte[] ref = null; - * - * try { ref = H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_OBJECT, -1); } catch (Throwable err) { - * err.printStackTrace(); fail("H5.H5Rcreate: " + err); } assertNotNull(ref); } - * - * @Ignore public void testH5Rcreate_regionrefobj() { byte[] ref = null; try { ref = - * H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_DATASET_REGION, H5dsid); } catch (Throwable err) { - * err.printStackTrace(); fail("H5.H5Rcreate: " + err); } assertNotNull(ref); } - * - * @Ignore public void testH5Rdereference() { byte[] ref1 = null; byte[] ref2 = null; long - * dataset_id = -1; long group_id = -1; try { //Create reference on dataset ref1 = - * H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_DATASET_REGION, H5dsid); dataset_id= - * H5.H5Rdereference(H5fid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_DATASET_REGION, ref1); - * - * //Create reference on group ref2 = H5.H5Rcreate(H5gid, "/Group1", HDF5Constants.H5R_OBJECT, -1); - * group_id= H5.H5Rdereference(H5gid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_OBJECT, ref2); - * assertNotNull(ref1); assertNotNull(ref2); assertTrue(dataset_id >= 0); assertTrue(group_id >= 0); - * } catch (Throwable err) { err.printStackTrace(); fail("TestH5Rdereference " + err); } finally { - * try {H5.H5Dclose(dataset_id);} catch (Exception ex) {} try {H5.H5Gclose(group_id);} catch - * (Exception ex) {} } } - * - * @Ignore public void testH5Rget_region() { byte[] ref = null; long dsid = -1; try { ref = - * H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_DATASET_REGION, H5dsid); dsid = - * H5.H5Rget_region(H5fid, HDF5Constants.H5R_DATASET_REGION, ref); assertNotNull(ref); - * assertTrue(dsid >= 0); } catch (Throwable err) { err.printStackTrace(); - * fail("TestH5Rget_region: " + err); } finally { try {H5.H5Sclose(dsid);} catch (Exception ex) {} } - * } - * - * @Ignore//(expected = IllegalArgumentException.class) public void testH5Rget_name_Invalidreftype() - * throws Throwable { byte[] ref = null; String[] name = {""}; ref = H5.H5Rcreate(H5fid, "/dset", - * HDF5Constants.H5R_OBJECT, -1); H5.H5Rget_name(H5fid, HDF5Constants.H5R_DATASET_REGION, ref, name, - * 16); } - * - * @Ignore//(expected = NullPointerException.class) public void testH5Rget_name_NULLreference() - * throws Throwable { byte[] ref = null; String[] name = {""}; H5.H5Rget_name(H5fid, - * HDF5Constants.H5R_OBJECT, ref, name, 16); } - * - * @Ignore//(expected = HDF5LibraryException.class) public void - * testH5Rget_obj_type2_Invalidreftype() throws Throwable { byte[] ref = null; ref = - * H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_OBJECT, -1); H5.H5Rget_obj_type(H5fid, - * HDF5Constants.H5R_DATASET_REGION, ref); } - * - * @Ignore//(expected = HDF5LibraryException.class) public void testH5Rcreate_InvalidObjectName() - * throws Throwable { byte[] ref=H5.H5Rcreate(H5fid, "/GROUPS", HDF5Constants.H5R_OBJECT, -1); } - * - * @Ignore//(expected = HDF5LibraryException.class) public void testH5Rcreate_Invalidspace_id() - * throws Throwable { byte[] ref=H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_DATASET_REGION, -1); - * } - * - * @Ignore//(expected = IllegalArgumentException.class) public void testH5Rcreate_Invalidreftype() - * throws Throwable { byte[] ref=H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_BADTYPE, -1); } - * - * @Ignore//(expected = IllegalArgumentException.class) public void - * testH5Rgetregion_Invalidreftype() throws Throwable { byte[] ref = null; ref = H5.H5Rcreate(H5fid, - * "/dset", HDF5Constants.H5R_OBJECT, H5dsid); H5.H5Rget_region(H5fid, - * HDF5Constants.H5R_DATASET_REGION, ref); } - * - * @Ignore//(expected = IllegalArgumentException.class) public void - * testH5Rgetregion_Badreferencetype() throws Throwable { byte[] ref = null; ref = - * H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_OBJECT, H5dsid); H5.H5Rget_region(H5fid, - * HDF5Constants.H5R_OBJECT, ref); } - * - * @Ignore//(expected = NullPointerException.class) public void testH5Rgetregion_Nullreference() - * throws Throwable { byte[] ref = null; H5.H5Rget_region(H5fid, HDF5Constants.H5R_DATASET_REGION, - * ref); } - * - * @Ignore//(expected = NullPointerException.class) public void testH5Rdereference_Nullreference() - * throws Throwable { byte[] ref = null; H5.H5Rdereference(H5did2, HDF5Constants.H5P_DEFAULT, - * HDF5Constants.H5R_OBJECT, ref); } - * - * @Ignore//(expected = IllegalArgumentException.class) public void - * testH5Rdereference_Invalidreference() throws Throwable { byte[] ref1 = null; byte[] ref2 = null; - * ref1 = H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_DATASET_REGION, H5dsid); ref2 = - * H5.H5Rcreate(H5gid, "/Group1", HDF5Constants.H5R_OBJECT, -1); H5.H5Rdereference(H5gid, - * HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_OBJECT, ref1); } - */ // Test v1.12 APIs params @Test diff --git a/java/test/TestH5Rref.java b/java/test/TestH5Rref.java new file mode 100644 index 00000000000..e306d7a5e5c --- /dev/null +++ b/java/test/TestH5Rref.java @@ -0,0 +1,562 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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 COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +package test; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import java.io.File; + +import hdf.hdf5lib.H5; +import hdf.hdf5lib.HDF5Constants; +import hdf.hdf5lib.exceptions.HDF5Exception; +import hdf.hdf5lib.exceptions.HDF5LibraryException; +import hdf.hdf5lib.exceptions.HDF5FunctionArgumentException; + +import org.junit.After; +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TestName; + +public class TestH5Rref { + @Rule public TestName testname = new TestName(); + private static final String H5_DREG_FILE = "trefer_reg.h5"; + private static final String H5_AREG_FILE = "trefer_attr.h5"; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5did = HDF5Constants.H5I_INVALID_HID; + + private boolean byteArrayCheck(final byte[] array) { + for (byte b : array) { + if (b != 0) { + return false; + } + } + return true; + } + + public void openH5file(String filename, String dsetname) { + try { + H5fid = H5.H5Fopen(filename, + HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT); + } + catch (Throwable err) { + err.printStackTrace(); + fail("TestH5R._openH5file: " + err); + } + assertTrue("TestH5R._openH5file: H5.H5Fopen: ", H5fid >= 0); + try { + H5did = H5.H5Dopen(H5fid, dsetname, HDF5Constants.H5P_DEFAULT); + } + catch (Throwable err) { + err.printStackTrace(); + fail("TestH5R._openH5file: " + err); + } + assertTrue("TestH5R._openH5file: H5.H5Dopen: ", H5did >= 0); + try { + H5dsid = H5.H5Dget_space(H5did); + } + catch (Throwable err) { + err.printStackTrace(); + fail("TestH5R._openH5file: " + err); + } + assertTrue("TestH5R._openH5file: H5.H5Screate_simple: ",H5dsid > 0); + } + + @After + public void closeH5file() throws HDF5LibraryException { + if (H5did >= 0) + try {H5.H5Dclose(H5did);} catch (Exception ex) {} + if (H5dsid > 0) + try {H5.H5Sclose(H5dsid);} catch (Exception ex) {} + if (H5fid > 0) + try {H5.H5Fclose(H5fid);} catch (Exception ex) {} + H5fid = HDF5Constants.H5I_INVALID_HID; + H5dsid = HDF5Constants.H5I_INVALID_HID; + H5did = HDF5Constants.H5I_INVALID_HID; + System.out.println(); + } + + @Before + public void verifyCount() + throws NullPointerException, HDF5Exception { + assertTrue("H5 open ids is 0", H5.getOpenIDCount()==0); + System.out.print(testname.getMethodName()); + } + + // Test v1.12 APIs params + + @Test + public void testH5Rget_object() { + int ref_type = HDF5Constants.H5R_OBJECT1; + long f_type = HDF5Constants.H5I_INVALID_HID; + int obj_type = -1; + int ndims = 1; + long ret_val = -1; + byte[][] refbuf = null; + String name = ""; + String objName = "/DS_NA"; + + try { + openH5file(H5_DREG_FILE, objName); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Rget_object: openH5file: " + err); + } + try { + f_type = H5.H5Dget_type(H5did); + int result = H5.H5Tget_class(f_type); + assertTrue("testH5Rget_object: H5Tget_class", result > 0); + String class_name = H5.H5Tget_class_name(result); + assertTrue("testH5Rget_object: H5Tget_class", class_name.compareTo("H5T_REFERENCE")==0); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Rget_object: " + err); + } + finally { + try {H5.H5Tclose(f_type);} catch (Exception ex) {} + } + try { + ndims = H5.H5Sget_simple_extent_ndims(H5dsid); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Rget_object: H5Sget_simple_extent_ndims: " + err); + } + refbuf = new byte[ndims][HDF5Constants.H5R_REF_BUF_SIZE]; + // Read the reference from the dataset. + try { + H5.H5Dread(H5did, HDF5Constants.H5T_STD_REF, + HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, + HDF5Constants.H5P_DEFAULT, refbuf); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Rget_object: H5Dread: " + err); + } + + for (int i = 0; i < ndims; i++) { + try { + ret_val = H5.H5Rget_type(refbuf[i]); + assertTrue("testH5Rget_object: H5Rget_type["+i+"]="+ret_val, ret_val == ref_type); + if (!byteArrayCheck(refbuf[i])) { + try { + obj_type = H5.H5Rget_obj_type3(refbuf[i], HDF5Constants.H5P_DEFAULT); + assertEquals(obj_type, HDF5Constants.H5O_TYPE_DATASET); + } + catch (Throwable err2) { + err2.printStackTrace(); + fail("testH5Rget_object: H5.H5Rget_obj_type3: " + err2); + } + } + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Rget_object: H5Rget_type: " + err); + } + finally { + H5.H5Rdestroy(refbuf[i]); + } + } + } + + @Test + public void testH5Rget_obj_type3() { + long f_type = HDF5Constants.H5I_INVALID_HID; + int ref_type = HDF5Constants.H5R_DATASET_REGION2; + int obj_type = -1; + int ndims = 1; + long ret_val = -1; + byte[][] refbuf = null; + String objName = "/Dataset1"; + + try { + openH5file(H5_DREG_FILE, objName); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Rget_obj_type3: openH5file: " + err); + } + try { + f_type = H5.H5Dget_type(H5did); + int result = H5.H5Tget_class(f_type); + assertTrue("testH5Rget_obj_type3: H5Tget_class", result > 0); + String class_name = H5.H5Tget_class_name(result); + assertTrue("testH5Rget_obj_type3: H5Tget_class="+class_name, class_name.compareTo("H5T_REFERENCE")==0); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Rget_obj_type3: " + err); + } + finally { + try {H5.H5Tclose(f_type);} catch (Exception ex) {} + } + try { + ndims = H5.H5Sget_simple_extent_ndims(H5dsid); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Rget_obj_type3: H5Sget_simple_extent_ndims: " + err); + } + refbuf = new byte[ndims][HDF5Constants.H5R_REF_BUF_SIZE]; + // Read the reference from the dataset. + try { + H5.H5Dread(H5did, HDF5Constants.H5T_STD_REF, + HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, + HDF5Constants.H5P_DEFAULT, refbuf); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Rget_obj_type3: H5Dread: " + err); + } + + for (int i = 0; i < ndims; i++) { + try { + ret_val = H5.H5Rget_type(refbuf[i]); + assertTrue("testH5Rget_obj_type3: H5Rget_type["+i+"]="+ret_val, ret_val == ref_type); + if (!byteArrayCheck(refbuf[i])) { + try { + obj_type = H5.H5Rget_obj_type3(refbuf[i], HDF5Constants.H5P_DEFAULT); + assertEquals(obj_type, HDF5Constants.H5O_TYPE_DATASET); + } + catch (Throwable err2) { + err2.printStackTrace(); + fail("testH5Rget_obj_type3: H5.H5Rget_obj_type3: " + err2); + } + } + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Rget_obj_type3: H5Rget_type: " + err); + } + finally { + H5.H5Rdestroy(refbuf[i]); + } + } + } + + @Test + public void testH5Rget_region_dataset() { + long f_type = HDF5Constants.H5I_INVALID_HID; + long loc_id = HDF5Constants.H5I_INVALID_HID; + long loc_sid = HDF5Constants.H5I_INVALID_HID; + int ref_type = HDF5Constants.H5R_DATASET_REGION2; + int ndims = 1; + long ret_val = -1; + byte[][] refbuf = null; + String name = ""; + String objName = "/Dataset1"; + + try { + openH5file(H5_DREG_FILE, objName); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Rget_region_dataset: openH5file: " + err); + } + try { + f_type = H5.H5Dget_type(H5did); + int result = H5.H5Tget_class(f_type); + assertTrue("testH5Rget_region_dataset: H5Tget_class", result > 0); + String class_name = H5.H5Tget_class_name(result); + assertTrue("testH5Rget_region_dataset: H5Tget_class="+class_name, class_name.compareTo("H5T_REFERENCE")==0); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Rget_region_dataset: " + err); + } + finally { + try {H5.H5Tclose(f_type);} catch (Exception ex) {} + } + try { + ndims = H5.H5Sget_simple_extent_ndims(H5dsid); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Rget_region_dataset: H5Sget_simple_extent_ndims: " + err); + } + refbuf = new byte[ndims][HDF5Constants.H5R_REF_BUF_SIZE]; + // Read the reference from the dataset. + try { + H5.H5Dread(H5did, HDF5Constants.H5T_STD_REF, + HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, + HDF5Constants.H5P_DEFAULT, refbuf); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Rget_obj_type3: H5Dread: " + err); + } + for (int i = 0; i < ndims; i++) { + try { + ret_val = H5.H5Rget_type(refbuf[i]); + assertTrue("testH5Rget_region_dataset: H5Rget_type["+i+"]="+ret_val, ret_val == ref_type); + try { + loc_id = H5.H5Ropen_object(refbuf[i], HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); + assertTrue(loc_id >= 0); + boolean regionzero = byteArrayCheck(refbuf[i]); + if (i > 1) + assertTrue(regionzero); + else { + try { + loc_sid = H5.H5Ropen_region(refbuf[i], HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); + assertTrue(loc_sid >= 0); + int region_type = -1; + try { + int reg_ndims = H5.H5Sget_simple_extent_ndims(loc_sid); + region_type = H5.H5Sget_select_type(loc_sid); + if (i == 1) + assertTrue(region_type == HDF5Constants.H5S_SEL_POINTS); + else + assertTrue(region_type == HDF5Constants.H5S_SEL_HYPERSLABS); + if (region_type == HDF5Constants.H5S_SEL_POINTS) { + long reg_npoints = H5.H5Sget_select_elem_npoints(loc_sid); + // Coordinates for get point selection + long getcoord[] = new long[reg_ndims * (int)reg_npoints]; + // Known coordinates for point selection + long coord[][] = {{6,9},{2,2},{8,4},{1,6},{2,8},{3,2}, + {0,4},{9,0},{7,1},{3,3}}; + try { + H5.H5Sget_select_elem_pointlist(loc_sid, 0, reg_npoints, getcoord); + assertTrue("H5.H5Sget_select_elem_pointlist", coord[0][0] == getcoord[0]); + assertTrue("H5.H5Sget_select_elem_pointlist", coord[0][1] == getcoord[1]); + assertTrue("H5.H5Sget_select_elem_pointlist", coord[1][0] == getcoord[2]); + assertTrue("H5.H5Sget_select_elem_pointlist", coord[1][1] == getcoord[3]); + assertTrue("H5.H5Sget_select_elem_pointlist", coord[2][0] == getcoord[4]); + assertTrue("H5.H5Sget_select_elem_pointlist", coord[2][1] == getcoord[5]); + } + catch (Throwable err3) { + err3.printStackTrace(); + fail("H5.H5Sget_select_elem_pointlist: " + err3); + } + } + else if (region_type == HDF5Constants.H5S_SEL_HYPERSLABS) { + long reg_nblocks = H5.H5Sget_select_hyper_nblocks(loc_sid); + assertTrue("H5Sget_select_hyper_nblocks", reg_nblocks == 1); + // Coordinates for get block selection + long getblocks[] = new long[reg_ndims * (int)reg_nblocks * 2]; + long start[] = {2,2}; + long block[] = {8,8}; + try { + H5.H5Sget_select_hyper_blocklist(loc_sid, 0, reg_nblocks, getblocks); + assertTrue("H5.H5Sget_select_hyper_blocklist", start[0] == getblocks[0]); + assertTrue("H5.H5Sget_select_hyper_blocklist", start[1] == getblocks[1]); + assertTrue("H5.H5Sget_select_hyper_blocklist", (block[0]-1) == getblocks[2]); + assertTrue("H5.H5Sget_select_hyper_blocklist", (block[1]-1) == getblocks[3]); + } + catch (Throwable err3) { + err3.printStackTrace(); + fail("H5.H5Sget_select_hyper_blocklist: " + err3); + } + } + } + catch (Throwable err2) { + err2.printStackTrace(); + fail("testH5Rget_region_dataset: H5Sget_select_type: " + err2); + } + } + catch (Throwable err1) { + err1.printStackTrace(); + fail("testH5Rget_region_dataset: " + err1); + } + finally { + try {H5.H5Sclose(loc_sid);} catch (Exception ex) {} + } + } + } + catch (Throwable err0) { + err0.printStackTrace(); + fail("testH5Rget_region_dataset: " + err0); + } + finally { + try {H5.H5Dclose(loc_id);} catch (Exception ex) {} + } + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Rget_region_dataset: H5Rget_type: " + err); + } + finally { + H5.H5Rdestroy(refbuf[i]); + } + } //for (int i = 0; i < ndims; i++) + } + + @Test + public void testH5Rget_region_attribute() { + long f_type = HDF5Constants.H5I_INVALID_HID; + long loc_id = HDF5Constants.H5I_INVALID_HID; + long loc_sid = HDF5Constants.H5I_INVALID_HID; + int ref_type = HDF5Constants.H5R_ATTR; + int obj_type = -1; + int ndims = 1; + long ret_val = -1; + byte[][] refbuf = null; + String objName = "/Dataset3"; + + try { + openH5file(H5_AREG_FILE, objName); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Rget_region_attribute: openH5file: " + err); + } + try { + f_type = H5.H5Dget_type(H5did); + int result = H5.H5Tget_class(f_type); + assertTrue("testH5Rget_region_attribute: H5Tget_class", result > 0); + String class_name = H5.H5Tget_class_name(result); + assertTrue("testH5Rget_region_attribute: H5Tget_class="+class_name, class_name.compareTo("H5T_REFERENCE")==0); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Rget_region_attribute: " + err); + } + finally { + try {H5.H5Tclose(f_type);} catch (Exception ex) {} + } + try { + ndims = H5.H5Sget_simple_extent_ndims(H5dsid); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Rget_region_attribute: H5Sget_simple_extent_ndims: " + err); + } + refbuf = new byte[ndims][HDF5Constants.H5R_REF_BUF_SIZE]; + // Read the reference from the dataset. + try { + H5.H5Dread(H5did, HDF5Constants.H5T_STD_REF, + HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, + HDF5Constants.H5P_DEFAULT, refbuf); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Rget_region_attribute: H5Dread: " + err); + } + + for (int i = 0; i < ndims; i++) { + try { + ret_val = H5.H5Rget_type(refbuf[i]); + assertTrue("testH5Rget_region_attribute: H5Rget_type["+i+"]="+ret_val, ret_val == ref_type); + try { + loc_id = H5.H5Ropen_attr(refbuf[i], HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); + assertTrue(loc_id >= 0); + if (!byteArrayCheck(refbuf[i])) { + try { + loc_sid = H5.H5Aget_space(loc_id); + assertTrue(loc_sid >= 0); + } + catch (Throwable err1) { + err1.printStackTrace(); + fail("testH5Rget_region_attribute: " + err1); + } + finally { + try {H5.H5Sclose(loc_sid);} catch (Exception ex) {} + } + } + } + catch (Throwable err0) { + err0.printStackTrace(); + fail("testH5Rget_region_attribute: " + err0); + } + finally { + try {H5.H5Aclose(loc_id);} catch (Exception ex) {} + } + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Rget_region_attribute: H5Rget_type: " + err); + } + finally { + H5.H5Rdestroy(refbuf[i]); + } + } + } + + +// These tests need to be updated with new APIs +// @Test// +// public void testH5Rget_group() { +// long loc_id = H5fid; +// int ref_type = HDF5Constants.H5R_OBJECT2; +// long ret_val = -1; +// byte[] ref = null; +// String name = ""; +// String objName = "/dset"; +// +// try { +// ref = H5.H5Rcreate_object(H5fid, objName, HDF5Constants.H5P_DEFAULT); +// } +// catch (Throwable err) { +// err.printStackTrace(); +// fail("testH5Rget_object: H5Rcreate_object " + err); +// } +// try { +// dataset_id= H5.H5Rdereference(H5fid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_DATASET_REGION, ref1); +// +// //Create reference on group +// ref2 = H5.H5Rcreate(H5gid, "/Group1", HDF5Constants.H5R_OBJECT, -1); +// group_id= H5.H5Rdereference(H5gid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_OBJECT, ref2); +// assertNotNull(ref1); +// assertNotNull(ref2); +// assertTrue(dataset_id >= 0); +// assertTrue(group_id >= 0); +// } +// catch (Throwable err) { +// err.printStackTrace(); +// fail("TestH5Rdereference " + err); +// } +// finally { +// try {H5.H5Dclose(dataset_id);} catch (Exception ex) {} +// try {H5.H5Gclose(group_id);} catch (Exception ex) {} +// } +// } + +// @Test// +// public void testH5Rget_attr() { +// long loc_id = H5fid; +// int ref_type = HDF5Constants.H5R_OBJECT2; +// long ret_val = -1; +// byte[] ref = null; +// String name = ""; +// String objName = "/dset"; +// +// try { +// ref = H5.H5Rcreate_object(H5fid, objName, HDF5Constants.H5P_DEFAULT); +// } +// catch (Throwable err) { +// err.printStackTrace(); +// fail("testH5Rget_object: H5Rcreate_object " + err); +// } +// try { +// dsid = H5.H5Rget_region(H5fid, HDF5Constants.H5R_DATASET_REGION, ref); +// assertNotNull(ref); +// assertTrue(dsid >= 0); +// } +// catch (Throwable err) { +// err.printStackTrace(); +// fail("TestH5Rget_region: " + err); +// } +// finally { +// try {H5.H5Sclose(dsid);} catch (Exception ex) {} +// } +// } + +} diff --git a/java/test/TestH5S.java b/java/test/TestH5S.java index 03943a4e860..7eeed7a67b6 100644 --- a/java/test/TestH5S.java +++ b/java/test/TestH5S.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -30,7 +29,7 @@ public class TestH5S { @Rule public TestName testname = new TestName(); - long H5sid = -1; + long H5sid = HDF5Constants.H5I_INVALID_HID; int H5rank = 2; long H5dims[] = {5, 5}; long H5maxdims[] = {10, 10}; @@ -181,7 +180,7 @@ public void testH5Sset_extent_none() { @Test public void testH5Scopy() { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; int read_rank = -1; try { @@ -201,7 +200,7 @@ public void testH5Scopy() { @Test public void testH5Sextent_copy() { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; int class_type = -1; try { @@ -222,7 +221,7 @@ public void testH5Sextent_copy() { @Test public void testH5Sextent_equal() { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; boolean result = false; try { @@ -252,8 +251,8 @@ public void testH5Sextent_equal() { @Test public void testH5Sencode_decode_null_dataspace() { - long sid = -1; - long decoded_sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; + long decoded_sid = HDF5Constants.H5I_INVALID_HID; byte[] null_sbuf = null; boolean result = false; @@ -299,8 +298,8 @@ public void testH5Sencode_decode_null_dataspace() { @Test public void testH5Sencode_decode_scalar_dataspace() { - long sid = -1; - long decoded_sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; + long decoded_sid = HDF5Constants.H5I_INVALID_HID; byte[] scalar_sbuf = null; boolean result = false; int iresult = -1; @@ -470,7 +469,7 @@ public void testH5Soffset_simple() { @Test public void testH5Sget_select_hyper() { - long space1 = -1; + long space1 = HDF5Constants.H5I_INVALID_HID; long start[] = {0,0}; long stride[] = {1,1}; long count[] = {1,1}; @@ -508,7 +507,7 @@ public void testH5Sget_select_hyper() { @Test public void testH5Sget_select_valid() { - long space1 = -1; + long space1 = HDF5Constants.H5I_INVALID_HID; long start[] = {1,0}; long stride[] = {1,1}; long count[] = {2,3}; diff --git a/java/test/TestH5Sbasic.java b/java/test/TestH5Sbasic.java index e6698c6ecc9..548ac956621 100644 --- a/java/test/TestH5Sbasic.java +++ b/java/test/TestH5Sbasic.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -56,7 +55,7 @@ public void testH5Sget_simple_extent_type_invalid() throws Throwable { @Test public void testH5Screate_scalar() { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; int class_type = -1; try { sid = H5.H5Screate(HDF5Constants.H5S_SCALAR); @@ -75,7 +74,7 @@ public void testH5Screate_scalar() { @Test public void testH5Screate_null() { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; int class_type = -1; try { sid = H5.H5Screate(HDF5Constants.H5S_NULL); @@ -125,7 +124,7 @@ public void testH5Screate_simple_dims_exceed() throws Throwable { @Test public void testH5Screate_simple() { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; int class_type = -1; int rank = 2; long dims[] = {5, 5}; @@ -148,7 +147,7 @@ public void testH5Screate_simple() { @Test public void testH5Screate_simple_unlimted() { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; int class_type = -1; int rank = 2; long dims[] = {5, 5}; @@ -171,7 +170,7 @@ public void testH5Screate_simple_unlimted() { @Test public void testH5Screate_simple_unlimted_1d() { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; int class_type = -1; int rank = 1; long dims[] = {5}; @@ -194,7 +193,7 @@ public void testH5Screate_simple_unlimted_1d() { @Test public void testH5Screate_simple_max_default() { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; int rank = 2; long dims[] = {5, 5}; @@ -213,7 +212,7 @@ public void testH5Screate_simple_max_default() { @Test public void testH5Screate_simple_extent() { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; int rank = 2; long dims[] = {5, 5}; long maxdims[] = {10, 10}; @@ -270,7 +269,7 @@ public void testH5Sselect_adjust_invalid() throws Throwable { @Test(expected = IllegalArgumentException.class) public void testH5Sselect_adjust_rank_offset() throws Throwable { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; long offset[][] = {{0,1},{2,4},{5,6}}; try { @@ -292,7 +291,7 @@ public void testH5Sselect_intersect_block_invalid() throws Throwable { @Test(expected = IllegalArgumentException.class) public void testH5Sselect_intersect_block_rank_start() throws Throwable { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; long start[] = new long[2]; long end[] = null; @@ -308,7 +307,7 @@ public void testH5Sselect_intersect_block_rank_start() throws Throwable { @Test(expected = IllegalArgumentException.class) public void testH5Sselect_intersect_block_rank_end() throws Throwable { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; long start[] = null; long end[] = new long[2]; @@ -336,7 +335,7 @@ public void testH5Scombine_hyperslab_invalid() throws Throwable { @Test(expected = NullPointerException.class) public void testH5Scombine_hyperslab_null_start() throws Throwable { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; long start[] = null; long stride[] = null; long count[] = new long[2]; @@ -354,7 +353,7 @@ public void testH5Scombine_hyperslab_null_start() throws Throwable { @Test(expected = NullPointerException.class) public void testH5Scombine_hyperslab_null_count() throws Throwable { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; long start[] = new long[2]; long stride[] = null; long count[] = null; diff --git a/java/test/TestH5T.java b/java/test/TestH5T.java index 18b5985caf4..c882f8ee4e7 100644 --- a/java/test/TestH5T.java +++ b/java/test/TestH5T.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -33,8 +32,8 @@ public class TestH5T { @Rule public TestName testname = new TestName(); private static final String H5_FILE = "testT.h5"; - long H5fid = -1; - long H5strdid = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5strdid = HDF5Constants.H5I_INVALID_HID; private final void _deleteFile(String filename) { File file = null; @@ -129,7 +128,7 @@ public void testH5Tset_size() { @Test public void testH5Tarray_create() { - long filetype_id = -1; + long filetype_id = HDF5Constants.H5I_INVALID_HID; long[] adims = { 3, 5 }; try { @@ -148,7 +147,7 @@ public void testH5Tarray_create() { @Test public void testH5Tget_array_ndims() { - long filetype_id = -1; + long filetype_id = HDF5Constants.H5I_INVALID_HID; int ndims = 0; long[] adims = { 3, 5 }; @@ -176,7 +175,7 @@ public void testH5Tget_array_ndims() { @Test public void testH5Tget_array_dims() { - long filetype_id = -1; + long filetype_id = HDF5Constants.H5I_INVALID_HID; int ndims = 0; long[] adims = { 3, 5 }; long[] rdims = new long[2]; @@ -207,7 +206,7 @@ public void testH5Tget_array_dims() { @Test public void testH5Tenum_functions() { - long filetype_id =-1; + long filetype_id =HDF5Constants.H5I_INVALID_HID; String enum_type ="Enum_type"; byte[] enum_val = new byte[1]; String enum_name = null; @@ -275,7 +274,7 @@ public void testH5Tenum_functions() { @Test public void testH5Tenum_create_functions() { - long filetype_id = -1; + long filetype_id = HDF5Constants.H5I_INVALID_HID; byte[] enum_val = new byte[1]; // Create a enumerate datatype @@ -315,7 +314,7 @@ public void testH5Tenum_create_functions() { @Test public void testH5Topaque_functions() { - long filetype_id = -1; + long filetype_id = HDF5Constants.H5I_INVALID_HID; String opaque_name = null; // Create a opaque datatype @@ -345,7 +344,7 @@ public void testH5Topaque_functions() { @Test public void testH5Tvlen_create() { - long filetype_id = -1; + long filetype_id = HDF5Constants.H5I_INVALID_HID; try { filetype_id = H5.H5Tvlen_create(HDF5Constants.H5T_C_S1); @@ -368,7 +367,7 @@ public void testH5Tvlen_create() { @Test public void testH5Tis_variable_str() { - long filetype_id = -1; + long filetype_id = HDF5Constants.H5I_INVALID_HID; try { filetype_id = H5.H5Tcopy(HDF5Constants.H5T_C_S1); @@ -399,7 +398,7 @@ public void testH5Tis_variable_str() { @Test public void testH5Tcompound_functions() { - long filetype_id =-1; + long filetype_id =HDF5Constants.H5I_INVALID_HID; // Create a compound datatype try { diff --git a/java/test/TestH5Tbasic.java b/java/test/TestH5Tbasic.java index 6dbc6e32ed0..7aac2ab24eb 100644 --- a/java/test/TestH5Tbasic.java +++ b/java/test/TestH5Tbasic.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -40,7 +39,7 @@ public void nextTestName() { @Test public void testH5Tcopy() { - long H5strdid = -1; + long H5strdid = HDF5Constants.H5I_INVALID_HID; try { H5strdid = H5.H5Tcopy(HDF5Constants.H5T_C_S1); assertTrue("H5.H5Tcopy",H5strdid > 0); @@ -57,7 +56,7 @@ public void testH5Tcopy() { @Test public void testH5Tequal() { - long H5strdid = -1; + long H5strdid = HDF5Constants.H5I_INVALID_HID; try { H5strdid = H5.H5Tcopy(HDF5Constants.H5T_C_S1); assertTrue("H5.H5Tcopy",H5strdid > 0); @@ -76,7 +75,7 @@ public void testH5Tequal() { @Test public void testH5Tequal_not() { - long H5strdid = -1; + long H5strdid = HDF5Constants.H5I_INVALID_HID; try { H5strdid = H5.H5Tcopy(HDF5Constants.H5T_STD_U64LE); assertTrue("H5.H5Tcopy",H5strdid > 0); @@ -98,8 +97,8 @@ public void testH5Tconvert() { String[] strs = {"a1234","b1234"}; int srcLen = 5; int dstLen = 10; - long srcId = -1; - long dstId = -1; + long srcId = HDF5Constants.H5I_INVALID_HID; + long dstId = HDF5Constants.H5I_INVALID_HID; int dimSize = strs.length; byte[] buf = new byte[dimSize*dstLen]; @@ -131,7 +130,7 @@ public void testH5Tconvert() { @Test public void testH5Torder_size() { - long H5strdid = -1; + long H5strdid = HDF5Constants.H5I_INVALID_HID; try { // Fixed length string H5strdid = H5.H5Tcopy(HDF5Constants.H5T_C_S1); diff --git a/java/test/TestH5Tparams.java b/java/test/TestH5Tparams.java index 4180de511d3..92a034c8420 100644 --- a/java/test/TestH5Tparams.java +++ b/java/test/TestH5Tparams.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/test/TestH5VL.java b/java/test/TestH5VL.java index 554c1f7eea9..4253d20802e 100644 --- a/java/test/TestH5VL.java +++ b/java/test/TestH5VL.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -72,28 +71,28 @@ public void testH5VLnative_init() { @Test public void testH5VLget_connector_id() { - String H5_FILE = "testFvl.h5"; + String H5_FILE = "testFvl.h5"; long H5fid = H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_TRUNC, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); - try { - long native_id = H5.H5VLget_connector_id(H5fid); - assertTrue("H5.H5VLget_connector_id", native_id >= 0); - - /* - * If HDF5_VOL_CONNECTOR is set, this might not be the - * native connector. Only check for the native connector - * if this isn't set. - */ - String connector = System.getenv("HDF5_VOL_CONNECTOR"); - if (connector == null) - assertEquals(HDF5Constants.H5VL_NATIVE, native_id); - } - catch (Throwable err) { - err.printStackTrace(); - fail("H5.H5VLget_connector_id " + err); - } + try { + long native_id = H5.H5VLget_connector_id(H5fid); + assertTrue("H5.H5VLget_connector_id", native_id >= 0); + + /* + * If HDF5_VOL_CONNECTOR is set, this might not be the + * native connector. Only check for the native connector + * if this isn't set. + */ + String connector = System.getenv("HDF5_VOL_CONNECTOR"); + if (connector == null) + assertEquals(HDF5Constants.H5VL_NATIVE, native_id); + } + catch (Throwable err) { + err.printStackTrace(); + fail("H5.H5VLget_connector_id " + err); + } finally { if (H5fid > 0) { try {H5.H5Fclose(H5fid);} catch (Exception ex) {} @@ -139,14 +138,14 @@ public void testH5VLget_connector_name() { try { String native_name = H5.H5VLget_connector_name(H5fid); - /* - * If HDF5_VOL_CONNECTOR is set, this might not be the - * native connector. Only check for the native connector - * if this isn't set. - */ - String connector = System.getenv("HDF5_VOL_CONNECTOR"); - if (connector == null) - assertTrue("H5.H5VLget_connector_name H5VL_NATIVE", native_name.compareToIgnoreCase(HDF5Constants.H5VL_NATIVE_NAME)==0); + /* + * If HDF5_VOL_CONNECTOR is set, this might not be the + * native connector. Only check for the native connector + * if this isn't set. + */ + String connector = System.getenv("HDF5_VOL_CONNECTOR"); + if (connector == null) + assertTrue("H5.H5VLget_connector_name H5VL_NATIVE", native_name.compareToIgnoreCase(HDF5Constants.H5VL_NATIVE_NAME)==0); } catch (Throwable err) { err.printStackTrace(); diff --git a/java/test/TestH5Z.java b/java/test/TestH5Z.java index 696642b4ada..fde8f1a2d95 100644 --- a/java/test/TestH5Z.java +++ b/java/test/TestH5Z.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in index 2eabdf0964a..81ce13bba1f 100644 --- a/java/test/junit.sh.in +++ b/java/test/junit.sh.in @@ -1,7 +1,6 @@ #! /bin/sh # # 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 @@ -46,6 +45,8 @@ HDFLIB_HOME="$top_srcdir/java/lib" BLDDIR="." BLDLIBDIR="$BLDDIR/testlibs" HDFTEST_HOME="$top_srcdir/java/test" +TOOLS_TESTFILES="$top_srcdir/tools/testfiles" + JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar TESTJARFILE=jar@PACKAGE_TARNAME@test.jar test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR @@ -93,6 +94,7 @@ $HDFTEST_HOME/testfiles/JUnit-TestH5Lparams.txt $HDFTEST_HOME/testfiles/JUnit-TestH5Lbasic.txt $HDFTEST_HOME/testfiles/JUnit-TestH5Lcreate.txt $HDFTEST_HOME/testfiles/JUnit-TestH5R.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Rref.txt $HDFTEST_HOME/testfiles/JUnit-TestH5P.txt $HDFTEST_HOME/testfiles/JUnit-TestH5PData.txt $HDFTEST_HOME/testfiles/JUnit-TestH5Pfapl.txt @@ -146,7 +148,7 @@ COPY_LIBFILES_TO_BLDLIBDIR() fi fi done - if [ "$IS_DARWIN" = "yes" ]; then + if [ "$IS_DARWIN" = "yes" ]; then (cd testlibs; \ install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \ exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \ @@ -248,6 +250,8 @@ COPY_DATAFILES_TO_BLDDIR() $CP -f $HDFTEST_HOME/h5ex_g_iterate.orig $BLDDIR/h5ex_g_iterateL2.hdf $CP -f $HDFTEST_HOME/h5ex_g_iterate.orig $BLDDIR/h5ex_g_iterateO1.hdf $CP -f $HDFTEST_HOME/h5ex_g_iterate.orig $BLDDIR/h5ex_g_iterateO2.hdf + $CP -f $TOOLS_TESTFILES/trefer_reg.h5 $BLDDIR/trefer_reg.h5 + $CP -f $TOOLS_TESTFILES/trefer_attr.h5 $BLDDIR/trefer_attr.h5 } CLEAN_DATAFILES_AND_BLDDIR() @@ -768,6 +772,27 @@ else test yes = "$verbose" && $DIFF JUnit-TestH5R.txt JUnit-TestH5R.out |sed 's/^/ /' fi +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Rref" +TESTING JUnit-TestH5Rref +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Rref > JUnit-TestH5Rref.ext) + +# Extract file name, line number, version and thread IDs because they may be different +sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ + -e 's/line [0-9]*/line (number)/' \ + -e 's/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ + -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ + -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ + JUnit-TestH5Rref.ext > JUnit-TestH5Rref.out + +if diff JUnit-TestH5Rref.out JUnit-TestH5Rref.txt > /dev/null; then + echo " PASSED JUnit-TestH5Rref" +else + echo "**FAILED** JUnit-TestH5Rref" + echo " Expected result differs from actual result" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF JUnit-TestH5Rref.txt JUnit-TestH5Rref.out |sed 's/^/ /' +fi + echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5P" TESTING JUnit-TestH5P ($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5P > JUnit-TestH5P.ext) diff --git a/java/test/testfiles/JUnit-TestH5.txt b/java/test/testfiles/JUnit-TestH5.txt index 4bab633808a..59765d90b93 100644 --- a/java/test/testfiles/JUnit-TestH5.txt +++ b/java/test/testfiles/JUnit-TestH5.txt @@ -3,8 +3,10 @@ JUnit version 4.11 .testJ2C .testH5export_dataset .testIsSerializable +.testH5export_attrdataset .testH5garbage_collect .testH5error_off +.testH5export_regdataset .serializeToDisk .testH5open .testH5check_version @@ -13,5 +15,5 @@ JUnit version 4.11 Time: XXXX -OK (11 tests) +OK (13 tests) diff --git a/java/test/testfiles/JUnit-TestH5Rref.txt b/java/test/testfiles/JUnit-TestH5Rref.txt new file mode 100644 index 00000000000..05019c03561 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Rref.txt @@ -0,0 +1,10 @@ +JUnit version 4.11 +.testH5Rget_region_dataset +.testH5Rget_object +.testH5Rget_region_attribute +.testH5Rget_obj_type3 + +Time: XXXX + +OK (4 tests) + diff --git a/test/use_common.c b/test/use_common.c index f33a21b6664..4a878c7a65e 100644 --- a/test/use_common.c +++ b/test/use_common.c @@ -442,7 +442,7 @@ read_uc_file(hbool_t towait, options_t *opts) { hid_t fid; /* File ID for new HDF5 file */ hid_t dsid; /* dataset ID */ - UC_CTYPE *buffer, *bufptr; /* read data buffer */ + UC_CTYPE *buffer = NULL, *bufptr = NULL; /* read data buffer */ hid_t f_sid; /* dataset file space id */ hid_t m_sid; /* memory space id */ int rank; /* rank */ @@ -605,6 +605,8 @@ read_uc_file(hbool_t towait, options_t *opts) return -1; } + HDfree(buffer); + if (nreadererr) return -1; else diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index d9616e18ee1..f97ef502b0e 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -472,9 +472,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co size_t size = 0; hbool_t iszero1; hbool_t iszero2; - hsize_t nfound = 0; /* differences found */ - double per; - hbool_t both_zero; + hsize_t nfound = 0; /* differences found */ diff_err_t ret_value = opts->err_stat; H5TOOLS_START_DEBUG("ph:%d elemtno:%d - errstat:%d", opts->print_header, elemtno, opts->err_stat); @@ -3364,48 +3362,66 @@ print_pos(diff_opt_t *opts, hsize_t idx, size_t u) hsize_t curr_pos = idx; parallel_print("[ "); - H5TOOLS_DEBUG("do calc_acc_pos[%ld] nelmts:%d - errstat:%d", i, opts->hs_nelmts, opts->err_stat); + H5TOOLS_DEBUG("do calc_acc_pos[%ld] nelmts:%d - errstat:%d", idx, opts->hs_nelmts, + opts->err_stat); if (opts->sset[0] != NULL) { /* Subsetting is used - calculate total position */ - hsize_t elmnt_cnt = 1; - hsize_t dim_cnt = 0; /* previous dim size */ - hsize_t str_cnt = 0; /* previous dim stride */ - hsize_t curr_idx = idx; /* calculated running position */ - hsize_t str_idx = 0; - hsize_t blk_idx = 0; - hsize_t cnt_idx = 0; - hsize_t hs_idx = 0; - j = opts->rank - 1; + hsize_t prev_dim_size = 0; /* previous dim size */ + hsize_t prev_str = 0; /* previouw stride idx*/ + hsize_t str_cnt = 0; /* stride multiplier*/ + hsize_t curr_idx = 0; /* calculated running position */ + hsize_t str_idx = 0; + hsize_t blk_idx = 0; + hsize_t cnt_idx = 0; + hsize_t dim_size = 0; /* current dim size */ + hsize_t elmnt_cnt = 1; + hsize_t next_idx = idx; + hsize_t data_idx = 0; + j = opts->rank - 1; + H5TOOLS_DEBUG("...begin:%ld=> opts->rank:%ld (idx:%ld)", j, opts->rank, idx); do { - cnt_idx = opts->sset[0]->count.data[j]; /* Count value for current dim */ - H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - count:%ld", j, - curr_pos, curr_idx, cnt_idx); - blk_idx = opts->sset[0]->block.data[j]; /* Block value for current dim */ - H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - block:%ld", j, - curr_pos, curr_idx, blk_idx); - hs_idx = cnt_idx * blk_idx; /* hyperslab area value for current dim */ - H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - hs:%ld", j, curr_pos, - curr_idx, hs_idx); - str_idx = opts->sset[0]->stride.data[j]; /* Stride value for current dim */ - H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - stride:%ld", j, - curr_pos, curr_idx, str_idx); - elmnt_cnt *= opts->dims[j]; /* Total number of elements in dimension */ - H5TOOLS_DEBUG("... sset loop:%d with elmnt_cnt:%ld", j, elmnt_cnt); - if (str_idx > blk_idx) - curr_idx += dim_cnt * (str_idx - blk_idx); /* */ - else if (curr_idx >= hs_idx) - curr_idx += dim_cnt * str_cnt; - H5TOOLS_DEBUG("... sset loop:%d with idx:%ld (curr_idx:%ld) - stride:%ld", j, idx, - curr_idx, str_idx); - dim_cnt = elmnt_cnt; /* */ - if (str_idx > blk_idx) - str_cnt = str_idx - blk_idx; /* */ - else - str_cnt = str_idx; /* */ - H5TOOLS_DEBUG("... sset loop:%d with dim_cnt:%ld - str_cnt:%ld", j, dim_cnt, str_cnt); + curr_idx = next_idx; /* New current data position */ + cnt_idx = opts->sset[0]->count.data[j]; /* Count value for current dim */ + blk_idx = opts->sset[0]->block.data[j]; /* Block value for current dim */ + str_idx = opts->sset[0]->stride.data[j]; /* Stride value for current dim */ + H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - c:%ld b:%ld s:%ld", j, + curr_pos, curr_idx, cnt_idx, blk_idx, str_idx); + dim_size = opts->dims[j]; /* Current dimension size */ + // elmnt_cnt *= dim_size; /* Total number of elements in dimension */ + H5TOOLS_DEBUG("... sset loop:%d with elmnt_cnt:%ld - (prev_dim_size:%ld - dim_size:%ld) " + "- str_cnt:%ld", + j, elmnt_cnt, prev_dim_size, dim_size, str_cnt); + data_idx = elmnt_cnt * dim_size; + H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (data_idx:%ld)", j, curr_pos, data_idx); + for (i = 0; i < cnt_idx; i++) { + H5TOOLS_DEBUG("... ... data loop:%d with cnt_idx:%ld - str_cnt:%ld (curr_idx:%ld - " + "data_idx:%ld)", + i, cnt_idx, str_cnt, curr_idx, data_idx); + if (curr_idx >= data_idx) { + /* get to next block */ + data_idx += str_idx * dim_size; + /* get next block */ + str_cnt++; + H5TOOLS_DEBUG( + "... ... data loop:%d with cnt_idx:%ld - str_cnt:%ld - data_idx:%ld", i, + cnt_idx, str_cnt, data_idx); + } + H5TOOLS_DEBUG("... ... end data loop:%d with dim_cnt:%ld - str_cnt:%ld - " + "(curr_idx:%ld - data_idx:%ld)", + i, dim_size, str_cnt, curr_idx, data_idx); + } + next_idx += dim_size * str_cnt; // + prev_dim_size; + H5TOOLS_DEBUG("... sset loop:%d with curr_idx:%ld (next_idx:%ld)", j, curr_idx, next_idx); + str_cnt = 0; + prev_str = str_idx; + prev_dim_size = dim_size; + H5TOOLS_DEBUG("... end sset loop:%d with prev_dim_size:%ld (curr_idx:%ld - data_idx:%ld) " + "- str_cnt:%ld", + j, prev_dim_size, curr_idx, data_idx, str_cnt); + elmnt_cnt *= dim_size; /* Total number of elements in dimension */ j--; - } while (curr_idx >= elmnt_cnt && j >= 0); + } while (next_idx >= elmnt_cnt && j >= 0); curr_pos = curr_idx; /* New current position */ H5TOOLS_DEBUG("pos loop:%d,%d with elmnt_cnt:%ld - curr_pos:%ld", i, j, elmnt_cnt, curr_pos); } /* if (opts->sset[0] != NULL) */ diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index f6566d960ed..3b7849164ad 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -1778,7 +1778,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t } break; case H5T_ARRAY: { int k, ndims; - hsize_t dims[H5S_MAX_RANK], temp_nelmts, nelmts; + hsize_t dims[H5S_MAX_RANK], temp_nelmts, nelmts = 0; hid_t memb = H5I_INVALID_HID; H5TOOLS_DEBUG("H5T_ARRAY"); diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index dd3ae67b8f7..212b13e4dc9 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -705,7 +705,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai long double templdouble; HDmemcpy(&templdouble, vp, sizeof(long double)); - h5tools_str_append(str, OPT(info->fmt_double, "%Lf"), templdouble); + h5tools_str_append(str, "%Lg", templdouble); #endif } break; diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index 708fb2c2e44..b33d908a65b 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -196,7 +196,7 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti /* long command line option */ int i; const char ch = '='; - char * arg = &argv[opt_ind][2]; + char * arg = HDstrdup(&argv[opt_ind][2]); size_t arg_len = 0; opt_arg = strchr(&argv[opt_ind][2], ch); @@ -208,8 +208,6 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti arg[arg_len] = 0; for (i = 0; l_opts && l_opts[i].name; i++) { - size_t len = HDstrlen(l_opts[i].name); - if (HDstrcmp(arg, l_opts[i].name) == 0) { /* we've found a matching long command line flag */ opt_opt = l_opts[i].shortval; @@ -253,6 +251,8 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti opt_ind++; sp = 1; + + HDfree(arg); } else { register char *cp; /* pointer into current token */ diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c index b51950e7507..99cd6533f5f 100644 --- a/tools/src/h5diff/h5diff_common.c +++ b/tools/src/h5diff/h5diff_common.c @@ -76,7 +76,6 @@ check_options(diff_opt_t *opts) } } -#if TRILABS_227 /*------------------------------------------------------------------------- * Function: parse_hsize_list * @@ -192,7 +191,6 @@ parse_subset_params(const char *dset) return s; } -#endif /*------------------------------------------------------------------------- * Function: parse_command_line @@ -480,11 +478,9 @@ parse_command_line(int argc, const char *argv[], const char **fname1, const char * TRILABS_227 is complete except for an issue with printing indices * the following calls will enable subsetting */ -#if TRILABS_227 opts->sset[0] = parse_subset_params(*objname1); opts->sset[1] = parse_subset_params(*objname2); -#endif H5TOOLS_ENDDEBUG(""); } @@ -822,19 +818,27 @@ usage(void) /* * TRILABS_227 is complete except for an issue with printing indices * the following will be needed for subsetting + */ PRINTVALSTREAM(rawoutstream, " Subsetting options:\n"); - PRINTVALSTREAM(rawoutstream, " Subsetting is available by using the fcompact form of subsetting, as - follows:\n"); PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]\n"); - PRINTVALSTREAM(rawoutstream, " It is not required to use all parameters, but until the last parameter - value used,\n"); PRINTVALSTREAM(rawoutstream, " all of the semicolons (;) are required, even when a - parameter value is not specified. Example:\n"); PRINTVALSTREAM(rawoutstream, " obj1 - /foo/mydataset[START;;COUNT;BLOCK]\n"); PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START]\n"); - PRINTVALSTREAM(rawoutstream, " The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 - in\n"); PRINTVALSTREAM(rawoutstream, " each dimension. START is optional and will default to 0 in each - dimension.\n"); PRINTVALSTREAM(rawoutstream, " Each of START, STRIDE, COUNT, and BLOCK must be a - comma-separated list of integers with\n"); PRINTVALSTREAM(rawoutstream, " one integer for each dimension - of the dataset.\n"); PRINTVALSTREAM(rawoutstream, "\n"); - */ + PRINTVALSTREAM(rawoutstream, + " Subsetting is available by using the fcompact form of subsetting, as follows:\n"); + PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]\n"); + PRINTVALSTREAM(rawoutstream, + " It is not required to use all parameters, but until the last parameter value used,\n"); + PRINTVALSTREAM( + rawoutstream, + " all of the semicolons (;) are required, even when a parameter value is not specified. Example:\n"); + PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START;;COUNT;BLOCK]\n"); + PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START]\n"); + PRINTVALSTREAM(rawoutstream, + " The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in\n"); + PRINTVALSTREAM(rawoutstream, + " each dimension. START is optional and will default to 0 in each dimension.\n"); + PRINTVALSTREAM( + rawoutstream, + " Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with\n"); + PRINTVALSTREAM(rawoutstream, " one integer for each dimension of the dataset.\n"); + PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " Exit code:\n"); PRINTVALSTREAM(rawoutstream, " 0 if no differences, 1 if differences found, 2 if error\n"); PRINTVALSTREAM(rawoutstream, "\n"); diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c index e3f438462d3..471af51a452 100644 --- a/tools/src/h5import/h5import.c +++ b/tools/src/h5import/h5import.c @@ -2536,7 +2536,7 @@ parsePathInfo(struct path_info *path, char *temp) token = HDstrtok(temp, delimiter); if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH) { - (void)HDfprintf(stderr, err1); + (void)HDfprintf(stderr, "%s", err1); return (-1); } HDstrcpy(path->group[i++], token); @@ -2546,7 +2546,7 @@ parsePathInfo(struct path_info *path, char *temp) if (token == NULL) break; if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH) { - (void)HDfprintf(stderr, err1); + (void)HDfprintf(stderr, "%s", err1); return (-1); } HDstrcpy(path->group[i++], token); diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index b29ed729038..86fb9ecc9cf 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -530,7 +530,10 @@ print_native_type(h5tools_str_t *buffer, hid_t type, int ind) h5tools_str_append(buffer, "native hbool_t"); } else { - return print_int_type(buffer, type, ind); + if (H5T_FLOAT == H5Tget_class(type)) + return print_float_type(buffer, type, ind); + else + return print_int_type(buffer, type, ind); } } else { @@ -2648,7 +2651,7 @@ int main(int argc, const char *argv[]) { hid_t file_id = H5I_INVALID_HID; - char * fname = NULL, *oname = NULL, *x; + char * fname = NULL, *oname = NULL, *x = NULL; const char * s = NULL; char * rest; int argno; diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index 20d277d9aa6..0aef7105f97 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -357,14 +357,14 @@ copy_objects(const char *fnamein, const char *fnameout, pack_opt_t *options) done: H5E_BEGIN_TRY { - H5Pclose(fcpl_in); - H5Pclose(gcpl_in); H5Pclose(fcpl); + H5Pclose(options->fout_fapl); + options->fout_fapl = H5P_DEFAULT; + H5Pclose(gcpl_in); H5Gclose(grp_in); - H5Fclose(fidin); + H5Pclose(fcpl_in); H5Fclose(fidout); H5Fclose(fidin); - H5Fclose(fidout); } H5E_END_TRY; if (travt) diff --git a/tools/src/h5repack/h5repack_verify.c b/tools/src/h5repack/h5repack_verify.c index cc5501d3d07..0542d03fa6d 100644 --- a/tools/src/h5repack/h5repack_verify.c +++ b/tools/src/h5repack/h5repack_verify.c @@ -378,9 +378,11 @@ h5repack_cmp_pl(const char *fname1, hid_t fname1_fapl, const char *fname2, hid_t *------------------------------------------------------------------------- */ /* Open the files */ - if ((fid1 = h5tools_fopen(fname1, H5F_ACC_RDONLY, fname1_fapl, TRUE, NULL, 0)) < 0) + if ((fid1 = h5tools_fopen(fname1, H5F_ACC_RDONLY, fname1_fapl, + (fname1_fapl == H5P_DEFAULT) ? FALSE : TRUE, NULL, 0)) < 0) H5TOOLS_GOTO_ERROR((-1), "h5tools_fopen failed <%s>: %s", fname1, H5FOPENERROR); - if ((fid2 = h5tools_fopen(fname2, H5F_ACC_RDONLY, fname2_fapl, TRUE, NULL, 0)) < 0) + if ((fid2 = h5tools_fopen(fname2, H5F_ACC_RDONLY, fname2_fapl, + (fname2_fapl == H5P_DEFAULT) ? FALSE : TRUE, NULL, 0)) < 0) H5TOOLS_GOTO_ERROR((-1), "h5tools_fopen failed <%s>: %s", fname2, H5FOPENERROR); /*------------------------------------------------------------------------- diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c index 2426a11ad2e..8962a76d9ad 100644 --- a/tools/src/misc/h5debug.c +++ b/tools/src/misc/h5debug.c @@ -246,8 +246,8 @@ main(int argc, char *argv[]) haddr_t extra[10]; uint8_t sig[H5F_SIGNATURE_LEN]; size_t u; - H5E_auto2_t func; - void * edata; + H5E_auto2_t func = NULL; + void * edata = NULL; hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ herr_t status = SUCCEED; int exit_value = 0; diff --git a/tools/src/misc/h5repart.c b/tools/src/misc/h5repart.c index 77b40a1a2ba..a75f6d824c0 100644 --- a/tools/src/misc/h5repart.c +++ b/tools/src/misc/h5repart.c @@ -97,7 +97,7 @@ static off_t get_size(const char *progname, int *argno, int argc, char *argv[]) { off_t retval = -1; - char *suffix; + char *suffix = NULL; if (isdigit((int)(argv[*argno][2]))) { retval = HDstrtol(argv[*argno] + 2, &suffix, 10); diff --git a/tools/test/h5diff/testfiles/h5diff_10.txt b/tools/test/h5diff/testfiles/h5diff_10.txt index b5ff01a17dc..3631db7ef2a 100644 --- a/tools/test/h5diff/testfiles/h5diff_10.txt +++ b/tools/test/h5diff/testfiles/h5diff_10.txt @@ -143,6 +143,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/test/h5diff/testfiles/h5diff_600.txt b/tools/test/h5diff/testfiles/h5diff_600.txt index f52d8cca464..8a4ce6d501e 100644 --- a/tools/test/h5diff/testfiles/h5diff_600.txt +++ b/tools/test/h5diff/testfiles/h5diff_600.txt @@ -143,6 +143,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/test/h5diff/testfiles/h5diff_603.txt b/tools/test/h5diff/testfiles/h5diff_603.txt index 84111b3cd2d..d4c73365ddd 100644 --- a/tools/test/h5diff/testfiles/h5diff_603.txt +++ b/tools/test/h5diff/testfiles/h5diff_603.txt @@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/test/h5diff/testfiles/h5diff_606.txt b/tools/test/h5diff/testfiles/h5diff_606.txt index d915d36a7be..3123587b097 100644 --- a/tools/test/h5diff/testfiles/h5diff_606.txt +++ b/tools/test/h5diff/testfiles/h5diff_606.txt @@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/test/h5diff/testfiles/h5diff_612.txt b/tools/test/h5diff/testfiles/h5diff_612.txt index 1ef8cdf4873..ce2d88740f9 100644 --- a/tools/test/h5diff/testfiles/h5diff_612.txt +++ b/tools/test/h5diff/testfiles/h5diff_612.txt @@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/test/h5diff/testfiles/h5diff_615.txt b/tools/test/h5diff/testfiles/h5diff_615.txt index 881362e3f8f..61fd0369e09 100644 --- a/tools/test/h5diff/testfiles/h5diff_615.txt +++ b/tools/test/h5diff/testfiles/h5diff_615.txt @@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/test/h5diff/testfiles/h5diff_621.txt b/tools/test/h5diff/testfiles/h5diff_621.txt index ba39a994752..dc8655d8bc5 100644 --- a/tools/test/h5diff/testfiles/h5diff_621.txt +++ b/tools/test/h5diff/testfiles/h5diff_621.txt @@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/test/h5diff/testfiles/h5diff_622.txt b/tools/test/h5diff/testfiles/h5diff_622.txt index 70421fc0cd0..f20ffbe1f9b 100644 --- a/tools/test/h5diff/testfiles/h5diff_622.txt +++ b/tools/test/h5diff/testfiles/h5diff_622.txt @@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/test/h5diff/testfiles/h5diff_623.txt b/tools/test/h5diff/testfiles/h5diff_623.txt index 0d74268196d..f73d20217b1 100644 --- a/tools/test/h5diff/testfiles/h5diff_623.txt +++ b/tools/test/h5diff/testfiles/h5diff_623.txt @@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/test/h5diff/testfiles/h5diff_624.txt b/tools/test/h5diff/testfiles/h5diff_624.txt index cb8b8b4c7cc..903b7380bb7 100644 --- a/tools/test/h5diff/testfiles/h5diff_624.txt +++ b/tools/test/h5diff/testfiles/h5diff_624.txt @@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake index 0d8563efa71..f54da76ece2 100644 --- a/tools/test/h5dump/CMakeTests.cmake +++ b/tools/test/h5dump/CMakeTests.cmake @@ -127,7 +127,7 @@ ${HDF5_TOOLS_DIR}/testfiles/tintsattrs.ddl ${HDF5_TOOLS_DIR}/testfiles/tintsnodata.ddl ${HDF5_TOOLS_DIR}/testfiles/tlarge_objname.ddl - #${HDF5_TOOLS_DIR}/testfiles/tldouble.ddl + ${HDF5_TOOLS_DIR}/testfiles/tldouble.ddl ${HDF5_TOOLS_DIR}/testfiles/tlonglinks.ddl ${HDF5_TOOLS_DIR}/testfiles/tloop-1.ddl ${HDF5_TOOLS_DIR}/testfiles/tmulti.ddl @@ -293,7 +293,7 @@ ${HDF5_TOOLS_DIR}/testfiles/tintsattrs.h5 ${HDF5_TOOLS_DIR}/testfiles/tintsnodata.h5 ${HDF5_TOOLS_DIR}/testfiles/tlarge_objname.h5 - #${HDF5_TOOLS_DIR}/testfiles/tldouble.h5 + ${HDF5_TOOLS_DIR}/testfiles/tldouble.h5 ${HDF5_TOOLS_DIR}/testfiles/tlonglinks.h5 ${HDF5_TOOLS_DIR}/testfiles/tloop.h5 ${HDF5_TOOLS_DIR}/testfiles/tmulti-b.h5 @@ -1085,7 +1085,7 @@ ADD_H5_TEST (zerodim 0 --enable-error-stack zerodim.h5) # test for long double (some systems do not have long double) - #ADD_H5_TEST (tldouble 0 --enable-error-stack tldouble.h5) +# ADD_H5_TEST (tldouble 0 --enable-error-stack tldouble.h5) # test for vms ADD_H5_TEST (tvms 0 --enable-error-stack tvms.h5) @@ -1170,7 +1170,7 @@ ADD_H5_TEST (err_attr_dspace 1 err_attr_dspace.h5) # test to verify HDFFV-9407: long double full precision - ADD_H5_GREP_TEST (t128bit_float 1 "1.123456789012345" -m %.35Lf t128bit_float.h5) +# ADD_H5_GREP_TEST (t128bit_float 1 "1.123456789012345" -m %.35Lg t128bit_float.h5) ############################################################################## ### P L U G I N T E S T S diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index 2746f700b9f..fed3a565bcc 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -115,6 +115,7 @@ #define FILE85 "tgrpnullspace.h5" #define FILE86 "err_attr_dspace.h5" #define FILE87 "tintsnodata.h5" +#define FILE88 "tldouble_scalar.h5" /*------------------------------------------------------------------------- * prototypes @@ -6332,6 +6333,57 @@ gent_ldouble(void) return -1; } +/*------------------------------------------------------------------------- + * Function: gent_ldouble_scalar + * + * Purpose: make file with a long double scalar dataset + * + *------------------------------------------------------------------------- + */ +static int +gent_ldouble_scalar(void) +{ + hid_t fid; + hid_t did; + hid_t tid; + hid_t sid; + hsize_t dims[1] = {6}; + long double buf[6] = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0}; + + if ((fid = H5Fcreate(FILE88, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + if ((sid = H5Screate(H5S_SCALAR)) < 0) + goto error; + + if ((tid = H5Tarray_create(H5T_NATIVE_LDOUBLE, 1, dims)) < 0) + goto error; + + if (H5Tget_size(tid) == 0) + goto error; + + if ((did = H5Dcreate2(fid, "dset", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) + goto error; + + if (H5Sclose(sid) < 0) + goto error; + if (H5Tclose(tid) < 0) + goto error; + if (H5Dclose(did) < 0) + goto error; + if (H5Fclose(fid) < 0) + goto error; + + return 0; + +error: + HDprintf("error !\n"); + return -1; +} + /*------------------------------------------------------------------------- * Function: gent_binary * diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in index 2c4f2da105c..8f478b0d2e9 100644 --- a/tools/test/h5dump/testh5dump.sh.in +++ b/tools/test/h5dump/testh5dump.sh.in @@ -142,7 +142,7 @@ $SRC_H5DUMP_TESTFILES/thyperslab.h5 $SRC_H5DUMP_TESTFILES/tintsattrs.h5 $SRC_H5DUMP_TESTFILES/tints4dims.h5 $SRC_H5DUMP_TESTFILES/tlarge_objname.h5 -#$SRC_H5DUMP_TESTFILES/tldouble.h5 +$SRC_H5DUMP_TESTFILES/tldouble.h5 $SRC_H5DUMP_TESTFILES/tlonglinks.h5 $SRC_H5DUMP_TESTFILES/tloop.h5 $SRC_H5DUMP_TESTFILES/tmulti-b.h5 @@ -287,7 +287,7 @@ $SRC_H5DUMP_TESTFILES/tints4dimsCountEq.ddl $SRC_H5DUMP_TESTFILES/tints4dimsStride2.ddl $SRC_H5DUMP_TESTFILES/tintsattrs.ddl $SRC_H5DUMP_TESTFILES/tlarge_objname.ddl -#$SRC_H5DUMP_TESTFILES/tldouble.ddl +$SRC_H5DUMP_TESTFILES/tldouble.ddl $SRC_H5DUMP_TESTFILES/tlonglinks.ddl $SRC_H5DUMP_TESTFILES/tloop-1.ddl $SRC_H5DUMP_TESTFILES/tmulti.ddl @@ -1443,7 +1443,7 @@ TOOLTEST3 non_existing.ddl --enable-error-stack tgroup.h5 non_existing.h5 TOOLTEST err_attr_dspace.ddl err_attr_dspace.h5 # test to verify HDFFV-9407: long double full precision -GREPTEST OUTTXT "1.123456789012345" t128bit_float.ddl -m %.35Lf t128bit_float.h5 +#GREPTEST OUTTXT "1.123456789012345" t128bit_float.ddl -m %.35Lf t128bit_float.h5 # Clean up temporary files/directories CLEAN_TESTFILES_AND_TESTDIR diff --git a/tools/testfiles/tldouble.ddl b/tools/testfiles/tldouble.ddl new file mode 100644 index 00000000000..c032ef31a21 --- /dev/null +++ b/tools/testfiles/tldouble.ddl @@ -0,0 +1,11 @@ +HDF5 "tldouble.h5" { +GROUP "/" { + DATASET "dset" { + DATATYPE H5T_NATIVE_LDOUBLE + DATASPACE SIMPLE { ( 3 ) / ( 3 ) } + DATA { + (0): 1, 2, 3 + } + } +} +} From 8691d6c27d555160c0da97e6f098c3ac90249d23 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 1 Mar 2021 13:08:19 -0600 Subject: [PATCH 20/25] revert because logic requires false return --- tools/src/h5ls/h5ls.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index 86fb9ecc9cf..06c90d0e2cd 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -530,10 +530,7 @@ print_native_type(h5tools_str_t *buffer, hid_t type, int ind) h5tools_str_append(buffer, "native hbool_t"); } else { - if (H5T_FLOAT == H5Tget_class(type)) - return print_float_type(buffer, type, ind); - else - return print_int_type(buffer, type, ind); + return print_int_type(buffer, type, ind); } } else { From 373b5aa9e71b2f61803d13c20dd78edbd3e6e7f7 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 2 Mar 2021 10:16:54 -0600 Subject: [PATCH 21/25] Merges from develop #358 patches from vtk #361 fix header guard spelling --- .github/CODEOWNERS | 8 ++-- bin/make_err | 4 +- bin/make_overflow | 4 +- bin/make_vers | 4 +- c++/src/H5ArrayType.h | 6 +-- c++/src/H5AtomType.h | 6 +-- c++/src/H5Attribute.cpp | 2 +- c++/src/H5Attribute.h | 6 +-- c++/src/H5Classes.h | 6 +-- c++/src/H5CompType.h | 6 +-- c++/src/H5Cpp.h | 6 +-- c++/src/H5CppDoc.h | 6 +-- c++/src/H5DaccProp.h | 6 +-- c++/src/H5DataSet.h | 6 +-- c++/src/H5DataSpace.h | 6 +-- c++/src/H5DataType.h | 6 +-- c++/src/H5DcreatProp.h | 6 +-- c++/src/H5DxferProp.h | 6 +-- c++/src/H5EnumType.h | 6 +-- c++/src/H5Exception.h | 6 +-- c++/src/H5FaccProp.h | 6 +-- c++/src/H5FcreatProp.h | 6 +-- c++/src/H5File.h | 6 +-- c++/src/H5FloatType.h | 6 +-- c++/src/H5IntType.h | 6 +-- c++/src/H5LaccProp.h | 6 +-- c++/src/H5LcreatProp.h | 6 +-- c++/src/H5Library.h | 6 +-- c++/src/H5Location.cpp | 2 + c++/src/H5Location.h | 6 +-- c++/src/H5Object.cpp | 14 ++++-- c++/src/H5Object.h | 6 +-- c++/src/H5OcreatProp.h | 6 +-- c++/src/H5PredType.cpp | 3 +- c++/src/H5PredType.h | 6 +-- c++/src/H5PropList.cpp | 3 ++ c++/src/H5PropList.h | 6 +-- c++/src/H5StrType.cpp | 3 +- c++/src/H5StrType.h | 6 +-- c++/src/H5VarLenType.h | 6 +-- c++/test/h5cpputil.h | 4 +- config/cmake/HDF5PluginCache.cmake | 2 +- fortran/src/H5f90.h | 6 +-- fortran/src/H5f90i.h | 6 +-- fortran/src/H5f90proto.h | 6 +-- hl/c++/src/H5PacketTable.h | 2 +- hl/fortran/src/H5IMcc.h | 4 +- hl/fortran/src/H5LTf90proto.h | 6 +-- hl/src/H5DOpublic.h | 4 +- hl/src/H5DSprivate.h | 4 +- hl/src/H5DSpublic.h | 4 +- hl/src/H5HLprivate2.h | 6 +-- hl/src/H5IM.c | 8 +--- hl/src/H5IMprivate.h | 4 +- hl/src/H5IMpublic.h | 4 +- hl/src/H5LDprivate.h | 6 +-- hl/src/H5LDpublic.h | 6 +-- hl/src/H5LT.c | 14 ++---- hl/src/H5LTprivate.h | 4 +- hl/src/H5LTpublic.h | 4 +- hl/src/H5PTprivate.h | 4 +- hl/src/H5PTpublic.h | 4 +- hl/src/H5TBprivate.h | 4 +- hl/src/H5TBpublic.h | 4 +- hl/test/h5hltest.h | 6 +-- hl/tools/gif2h5/hdfgifwr.c | 12 ++--- java/src/jni/exceptionImp.c | 33 +++++++++----- java/src/jni/h5jni.h | 21 ++++++--- java/src/jni/h5util.c | 70 +++++++++++++++--------------- java/test/TestAll.java | 3 +- java/test/TestH5Rref.java | 3 +- src/H5ACmodule.h | 6 +-- src/H5ACpkg.h | 6 +-- src/H5ACprivate.h | 6 +-- src/H5ACpublic.h | 4 +- src/H5Amodule.h | 6 +-- src/H5Apkg.h | 6 +-- src/H5Aprivate.h | 6 +-- src/H5Apublic.h | 6 +-- src/H5B2module.h | 6 +-- src/H5B2pkg.h | 6 +-- src/H5B2private.h | 6 +-- src/H5Bmodule.h | 6 +-- src/H5Bpkg.h | 34 +++++++-------- src/H5Bprivate.h | 6 +-- src/H5CSprivate.h | 6 +-- src/H5CXmodule.h | 6 +-- src/H5CXprivate.h | 10 ++--- src/H5Cimage.c | 3 +- src/H5Clog.h | 6 +-- src/H5Cmodule.h | 6 +-- src/H5Cpkg.h | 6 +-- src/H5Cprivate.h | 6 +-- src/H5Cpublic.h | 4 +- src/H5Dmodule.h | 6 +-- src/H5Dpkg.h | 6 +-- src/H5Dprivate.h | 6 +-- src/H5Dpublic.h | 6 +-- src/H5EAmodule.h | 6 +-- src/H5EApkg.h | 6 +-- src/H5EAprivate.h | 6 +-- src/H5ESpublic.h | 6 +-- src/H5Emodule.h | 6 +-- src/H5Epkg.h | 6 +-- src/H5Eprivate.h | 6 +-- src/H5Epublic.h | 6 +-- src/H5FAmodule.h | 6 +-- src/H5FApkg.h | 6 +-- src/H5FAprivate.h | 6 +-- src/H5FDdrvr_module.h | 6 +-- src/H5FDmodule.h | 6 +-- src/H5FDmulti.c | 2 +- src/H5FDpkg.h | 6 +-- src/H5FDprivate.h | 6 +-- src/H5FDpublic.h | 4 +- src/H5FDstdio.c | 32 +++++++------- src/H5FLmodule.h | 6 +-- src/H5FLprivate.h | 4 +- src/H5FOprivate.h | 6 +-- src/H5FSmodule.h | 6 +-- src/H5FSpkg.h | 6 +-- src/H5FSprivate.h | 6 +-- src/H5Fmodule.h | 6 +-- src/H5Fpkg.h | 6 +-- src/H5Fprivate.h | 6 +-- src/H5Fpublic.h | 18 ++++---- src/H5Gmodule.h | 6 +-- src/H5Gpkg.h | 6 +-- src/H5Gprivate.h | 6 +-- src/H5Gpublic.h | 6 +-- src/H5HFhuge.c | 28 ++++++------ src/H5HFmodule.h | 6 +-- src/H5HFpkg.h | 6 +-- src/H5HFprivate.h | 6 +-- src/H5HGmodule.h | 6 +-- src/H5HGpkg.h | 6 +-- src/H5HGprivate.h | 6 +-- src/H5HLmodule.h | 6 +-- src/H5HLpkg.h | 6 +-- src/H5HLprivate.h | 4 +- src/H5HPprivate.h | 6 +-- src/H5Imodule.h | 6 +-- src/H5Ipkg.h | 6 +-- src/H5Iprivate.h | 6 +-- src/H5Ipublic.h | 6 +-- src/H5Lmodule.h | 6 +-- src/H5Lpkg.h | 6 +-- src/H5Lprivate.h | 6 +-- src/H5Lpublic.h | 6 +-- src/H5MFmodule.h | 6 +-- src/H5MFpkg.h | 6 +-- src/H5MFprivate.h | 6 +-- src/H5MMprivate.h | 6 +-- src/H5MMpublic.h | 6 +-- src/H5MPmodule.h | 6 +-- src/H5MPpkg.h | 6 +-- src/H5MPprivate.h | 6 +-- src/H5Mmodule.h | 6 +-- src/H5Mpkg.h | 6 +-- src/H5Mprivate.h | 6 +-- src/H5Mpublic.h | 6 +-- src/H5Omodule.h | 6 +-- src/H5Opkg.h | 6 +-- src/H5Oprivate.h | 6 +-- src/H5Opublic.h | 6 +-- src/H5PBmodule.h | 6 +-- src/H5PBpkg.h | 6 +-- src/H5PBprivate.h | 6 +-- src/H5PLextern.h | 6 +-- src/H5PLmodule.h | 6 +-- src/H5PLpkg.h | 6 +-- src/H5PLprivate.h | 6 +-- src/H5PLpublic.h | 6 +-- src/H5Pmodule.h | 6 +-- src/H5Ppkg.h | 6 +-- src/H5Pprivate.h | 6 +-- src/H5Ppublic.h | 12 ++--- src/H5RSprivate.h | 6 +-- src/H5Rmodule.h | 6 +-- src/H5Rpkg.h | 6 +-- src/H5Rprivate.h | 6 +-- src/H5Rpublic.h | 6 +-- src/H5SLmodule.h | 6 +-- src/H5SLprivate.h | 6 +-- src/H5SMmodule.h | 6 +-- src/H5SMpkg.h | 6 +-- src/H5SMprivate.h | 6 +-- src/H5STprivate.h | 6 +-- src/H5Smodule.h | 6 +-- src/H5Spkg.h | 6 +-- src/H5Sprivate.h | 6 +-- src/H5Spublic.h | 6 +-- src/H5Tmodule.h | 6 +-- src/H5Tpkg.h | 6 +-- src/H5Tprivate.h | 6 +-- src/H5Tpublic.h | 12 ++--- src/H5UCprivate.h | 6 +-- src/H5VLconnector.h | 6 +-- src/H5VLconnector_passthru.h | 6 +-- src/H5VLmodule.h | 6 +-- src/H5VLnative.h | 6 +-- src/H5VLnative_private.h | 6 +-- src/H5VLpassthru.c | 2 +- src/H5VLpassthru.h | 6 +-- src/H5VLpkg.h | 6 +-- src/H5VLprivate.h | 6 +-- src/H5VLpublic.h | 6 +-- src/H5WBprivate.h | 6 +-- src/H5Zmodule.h | 6 +-- src/H5Zpkg.h | 6 +-- src/H5Zprivate.h | 4 +- src/H5Zpublic.h | 4 +- src/H5module.h | 6 +-- src/H5private.h | 20 ++------- src/H5public.h | 10 ++--- src/hdf5.h | 4 +- test/H5srcdir.h | 6 +-- test/h5test.h | 4 +- test/stab.c | 2 +- test/tattr.c | 4 +- 220 files changed, 742 insertions(+), 734 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 97b74283a40..c807e755938 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -13,7 +13,7 @@ CMakeTests.* @byrnHDF @derobins /bin/ @lrknox @derobins @qkoziol -/c++/ @bmribler @byrnHDF +/c++/ @bmribler @byrnHDF @derobins /config/ @lrknox @derobins @qkoziol @byrnHDF @@ -23,7 +23,7 @@ CMakeTests.* @byrnHDF @derobins /fortran/ @brtnfld @epourmal -/hl/ @bmribler @byrnHDF +/hl/ @bmribler @byrnHDF @derobins /java/ @jhendersonHDF @byrnHDF @@ -37,6 +37,6 @@ CMakeTests.* @byrnHDF @derobins /testpar/ @jhendersonHDF @rawarren @jrmainzer @qkoziol -/tools/ @byrnHDF @bmribler +/tools/ @byrnHDF @bmribler @derobins -/utils/ @lrknox @byrnHDF +/utils/ @lrknox @byrnHDF @derobins diff --git a/bin/make_err b/bin/make_err index 68a32f4e720..f2b044a163c 100755 --- a/bin/make_err +++ b/bin/make_err @@ -64,8 +64,8 @@ sub print_startprotect ($$) { $file =~ s/(\w*)\.h/$1/; # Print the ifdef info - print $fh "\n#ifndef _${file}_H\n"; - print $fh "#define _${file}_H\n"; + print $fh "\n#ifndef ${file}_H\n"; + print $fh "#define ${file}_H\n"; } ############################################################################## diff --git a/bin/make_overflow b/bin/make_overflow index d1d16ee84c0..37d6dedfe73 100755 --- a/bin/make_overflow +++ b/bin/make_overflow @@ -93,8 +93,8 @@ sub print_startprotect ($$) { $file =~ s/(\w*)\.h/$1/; # Print the ifdef info - print $fh "\n#ifndef _${file}_H\n"; - print $fh "#define _${file}_H\n"; + print $fh "\n#ifndef ${file}_H\n"; + print $fh "#define ${file}_H\n"; } ############################################################################## diff --git a/bin/make_vers b/bin/make_vers index 74a4947cc42..7e99d88a2dd 100755 --- a/bin/make_vers +++ b/bin/make_vers @@ -78,8 +78,8 @@ sub print_startprotect ($$) { $file =~ s/(\w*)\.h/$1/; # Print the ifdef info - print $fh "\n#ifndef _${file}_H\n"; - print $fh "#define _${file}_H\n"; + print $fh "\n#ifndef ${file}_H\n"; + print $fh "#define ${file}_H\n"; } ############################################################################## diff --git a/c++/src/H5ArrayType.h b/c++/src/H5ArrayType.h index c2a64934c84..4302352c851 100644 --- a/c++/src/H5ArrayType.h +++ b/c++/src/H5ArrayType.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5ArrayType_H -#define __H5ArrayType_H +#ifndef H5ArrayType_H +#define H5ArrayType_H namespace H5 { @@ -69,4 +69,4 @@ class H5_DLLCPP ArrayType : public DataType { }; // end of ArrayType } // namespace H5 -#endif // __H5ArrayType_H +#endif // H5ArrayType_H diff --git a/c++/src/H5AtomType.h b/c++/src/H5AtomType.h index f5664b84574..84da5e98ff0 100644 --- a/c++/src/H5AtomType.h +++ b/c++/src/H5AtomType.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5AtomType_H -#define __H5AtomType_H +#ifndef H5AtomType_H +#define H5AtomType_H namespace H5 { @@ -83,4 +83,4 @@ class H5_DLLCPP AtomType : public DataType { }; // end of AtomType } // namespace H5 -#endif // __H5AtomType_H +#endif // H5AtomType_H diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp index 08367c5fbb0..81e656f74b5 100644 --- a/c++/src/H5Attribute.cpp +++ b/c++/src/H5Attribute.cpp @@ -41,7 +41,7 @@ namespace H5 { using std::cerr; using std::endl; -class H5_DLLCPP H5Object; // forward declaration for UserData4Aiterate +class H5Object; // forward declaration for UserData4Aiterate //-------------------------------------------------------------------------- // Function: Attribute default constructor diff --git a/c++/src/H5Attribute.h b/c++/src/H5Attribute.h index 5a13c2ebf86..41e5a313a3f 100644 --- a/c++/src/H5Attribute.h +++ b/c++/src/H5Attribute.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5Attribute_H -#define __H5Attribute_H +#ifndef H5Attribute_H +#define H5Attribute_H namespace H5 { @@ -104,4 +104,4 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location { }; // end of Attribute } // namespace H5 -#endif // __H5Attribute_H +#endif // H5Attribute_H diff --git a/c++/src/H5Classes.h b/c++/src/H5Classes.h index 42e3d6961f6..7820ce2564e 100644 --- a/c++/src/H5Classes.h +++ b/c++/src/H5Classes.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5Classes_H -#define __H5Classes_H +#ifndef H5Classes_H +#define H5Classes_H namespace H5 { class Exception; @@ -43,4 +43,4 @@ class H5File; class Attribute; class H5Library; } // namespace H5 -#endif // __H5Classes_H +#endif // H5Classes_H diff --git a/c++/src/H5CompType.h b/c++/src/H5CompType.h index 6d2ce7e871b..6a4c093decc 100644 --- a/c++/src/H5CompType.h +++ b/c++/src/H5CompType.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5CompType_H -#define __H5CompType_H +#ifndef H5CompType_H +#define H5CompType_H namespace H5 { @@ -124,4 +124,4 @@ class H5_DLLCPP CompType : public DataType { }; // end of CompType } // namespace H5 -#endif // __H5CompType_H +#endif // H5CompType_H diff --git a/c++/src/H5Cpp.h b/c++/src/H5Cpp.h index 8fea1f9fc32..9272bdb1f5a 100644 --- a/c++/src/H5Cpp.h +++ b/c++/src/H5Cpp.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5Cpp_H -#define __H5Cpp_H +#ifndef H5Cpp_H +#define H5Cpp_H #include "H5Include.h" #include "H5Exception.h" @@ -58,4 +58,4 @@ #define HOFFSET(TYPE, MEMBER) ((size_t) & ((TYPE *)0)->MEMBER) #endif -#endif // __H5Cpp_H +#endif // H5Cpp_H diff --git a/c++/src/H5CppDoc.h b/c++/src/H5CppDoc.h index 29f3afcd940..4337a6fe911 100644 --- a/c++/src/H5CppDoc.h +++ b/c++/src/H5CppDoc.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5CppDoc_H -#define __H5CppDoc_H +#ifndef H5CppDoc_H +#define H5CppDoc_H //------------------------------------------------------------------------- // The following section will be used to generate the 'Mainpage' @@ -92,4 +92,4 @@ /// This example shows how to work with groups. ///\example h5group.cpp -#endif // __H5CppDoc_H +#endif // H5CppDoc_H diff --git a/c++/src/H5DaccProp.h b/c++/src/H5DaccProp.h index 627c4a4ffd8..7d6b25051c1 100644 --- a/c++/src/H5DaccProp.h +++ b/c++/src/H5DaccProp.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5DSetAccPropList_H -#define __H5DSetAccPropList_H +#ifndef H5DSetAccPropList_H +#define H5DSetAccPropList_H namespace H5 { @@ -69,4 +69,4 @@ class H5_DLLCPP DSetAccPropList : public LinkAccPropList { }; // end of DSetAccPropList } // namespace H5 -#endif // __H5DSetAccPropList_H +#endif // H5DSetAccPropList_H diff --git a/c++/src/H5DataSet.h b/c++/src/H5DataSet.h index c07aad5aa0d..c7454709cfd 100644 --- a/c++/src/H5DataSet.h +++ b/c++/src/H5DataSet.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5DataSet_H -#define __H5DataSet_H +#ifndef H5DataSet_H +#define H5DataSet_H namespace H5 { @@ -153,4 +153,4 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs { }; // end of DataSet } // namespace H5 -#endif // __H5DataSet_H +#endif // H5DataSet_H diff --git a/c++/src/H5DataSpace.h b/c++/src/H5DataSpace.h index 14d030f4547..f16acfcf4f0 100644 --- a/c++/src/H5DataSpace.h +++ b/c++/src/H5DataSpace.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5DataSpace_H -#define __H5DataSpace_H +#ifndef H5DataSpace_H +#define H5DataSpace_H namespace H5 { @@ -155,4 +155,4 @@ class H5_DLLCPP DataSpace : public IdComponent { }; // end of DataSpace } // namespace H5 -#endif // __H5DataSpace_H +#endif // H5DataSpace_H diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h index f97f80663de..49f534859fa 100644 --- a/c++/src/H5DataType.h +++ b/c++/src/H5DataType.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5DataType_H -#define __H5DataType_H +#ifndef H5DataType_H +#define H5DataType_H namespace H5 { @@ -183,4 +183,4 @@ class H5_DLLCPP DataType : public H5Object { }; // end of DataType } // namespace H5 -#endif // __H5DataType_H +#endif // H5DataType_H diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h index 74c4be00e59..3c032ee5c6d 100644 --- a/c++/src/H5DcreatProp.h +++ b/c++/src/H5DcreatProp.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5DSCreatPropList_H -#define __H5DSCreatPropList_H +#ifndef H5DSCreatPropList_H +#define H5DSCreatPropList_H namespace H5 { @@ -159,4 +159,4 @@ class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList { }; // end of DSetCreatPropList } // namespace H5 -#endif // __H5DSCreatPropList_H +#endif // H5DSCreatPropList_H diff --git a/c++/src/H5DxferProp.h b/c++/src/H5DxferProp.h index daeb83ebb38..1e4d66824f8 100644 --- a/c++/src/H5DxferProp.h +++ b/c++/src/H5DxferProp.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5DSetMemXferPropList_H -#define __H5DSetMemXferPropList_H +#ifndef H5DSetMemXferPropList_H +#define H5DSetMemXferPropList_H namespace H5 { @@ -131,4 +131,4 @@ class H5_DLLCPP DSetMemXferPropList : public PropList { }; // end of DSetMemXferPropList } // namespace H5 -#endif // __H5DSetMemXferPropList_H +#endif // H5DSetMemXferPropList_H diff --git a/c++/src/H5EnumType.h b/c++/src/H5EnumType.h index b228d31b805..484405a0b76 100644 --- a/c++/src/H5EnumType.h +++ b/c++/src/H5EnumType.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5EnumType_H -#define __H5EnumType_H +#ifndef H5EnumType_H +#define H5EnumType_H namespace H5 { @@ -87,4 +87,4 @@ class H5_DLLCPP EnumType : public DataType { }; // end of EnumType } // namespace H5 -#endif // __H5EnumType_H +#endif // H5EnumType_H diff --git a/c++/src/H5Exception.h b/c++/src/H5Exception.h index c7b117bb805..566c818eaba 100644 --- a/c++/src/H5Exception.h +++ b/c++/src/H5Exception.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5Exception_H -#define __H5Exception_H +#ifndef H5Exception_H +#define H5Exception_H #include @@ -176,4 +176,4 @@ class H5_DLLCPP IdComponentException : public Exception { }; // end of IdComponentException } // namespace H5 -#endif // __H5Exception_H +#endif // H5Exception_H diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h index a02e2509cf8..998f870bea1 100644 --- a/c++/src/H5FaccProp.h +++ b/c++/src/H5FaccProp.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5FileAccPropList_H -#define __H5FileAccPropList_H +#ifndef H5FileAccPropList_H +#define H5FileAccPropList_H namespace H5 { @@ -168,4 +168,4 @@ class H5_DLLCPP FileAccPropList : public PropList { }; // end of FileAccPropList } // namespace H5 -#endif // __H5FileAccPropList_H +#endif // H5FileAccPropList_H diff --git a/c++/src/H5FcreatProp.h b/c++/src/H5FcreatProp.h index 2b3f46fd2a8..00ae0b1500b 100644 --- a/c++/src/H5FcreatProp.h +++ b/c++/src/H5FcreatProp.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5FileCreatPropList_H -#define __H5FileCreatPropList_H +#ifndef H5FileCreatPropList_H +#define H5FileCreatPropList_H namespace H5 { @@ -109,4 +109,4 @@ class H5_DLLCPP FileCreatPropList : public PropList { }; // end of FileCreatPropList } // namespace H5 -#endif // __H5FileCreatPropList_H +#endif // H5FileCreatPropList_H diff --git a/c++/src/H5File.h b/c++/src/H5File.h index b3f4f2c99ea..d287031c7bc 100644 --- a/c++/src/H5File.h +++ b/c++/src/H5File.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5File_H -#define __H5File_H +#ifndef H5File_H +#define H5File_H namespace H5 { @@ -136,4 +136,4 @@ class H5_DLLCPP H5File : public Group { }; // end of H5File } // namespace H5 -#endif // __H5File_H +#endif // H5File_H diff --git a/c++/src/H5FloatType.h b/c++/src/H5FloatType.h index e254646ead2..c76be955a68 100644 --- a/c++/src/H5FloatType.h +++ b/c++/src/H5FloatType.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5FloatType_H -#define __H5FloatType_H +#ifndef H5FloatType_H +#define H5FloatType_H namespace H5 { @@ -84,4 +84,4 @@ class H5_DLLCPP FloatType : public AtomType { }; // end of FloatType } // namespace H5 -#endif // __H5FloatType_H +#endif // H5FloatType_H diff --git a/c++/src/H5IntType.h b/c++/src/H5IntType.h index 78415180a41..185c8f0da50 100644 --- a/c++/src/H5IntType.h +++ b/c++/src/H5IntType.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5IntType_H -#define __H5IntType_H +#ifndef H5IntType_H +#define H5IntType_H namespace H5 { @@ -66,4 +66,4 @@ class H5_DLLCPP IntType : public AtomType { }; // end of IntType } // namespace H5 -#endif // __H5IntType_H +#endif // H5IntType_H diff --git a/c++/src/H5LaccProp.h b/c++/src/H5LaccProp.h index e6cf888e386..4fa516ca60a 100644 --- a/c++/src/H5LaccProp.h +++ b/c++/src/H5LaccProp.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5LinkAccPropList_H -#define __H5LinkAccPropList_H +#ifndef H5LinkAccPropList_H +#define H5LinkAccPropList_H namespace H5 { @@ -70,4 +70,4 @@ class H5_DLLCPP LinkAccPropList : public PropList { }; // end of LinkAccPropList } // namespace H5 -#endif // __H5LinkAccPropList_H +#endif // H5LinkAccPropList_H diff --git a/c++/src/H5LcreatProp.h b/c++/src/H5LcreatProp.h index e5a9d7a2dd2..aea38e76b88 100644 --- a/c++/src/H5LcreatProp.h +++ b/c++/src/H5LcreatProp.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5LinkCreatPropList_H -#define __H5LinkCreatPropList_H +#ifndef H5LinkCreatPropList_H +#define H5LinkCreatPropList_H namespace H5 { @@ -77,4 +77,4 @@ class H5_DLLCPP LinkCreatPropList : public PropList { }; // end of LinkCreatPropList } // namespace H5 -#endif // __H5LinkCreatPropList_H +#endif // H5LinkCreatPropList_H diff --git a/c++/src/H5Library.h b/c++/src/H5Library.h index 9a73eeee724..3df8d56d9b3 100644 --- a/c++/src/H5Library.h +++ b/c++/src/H5Library.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5Library_H -#define __H5Library_H +#ifndef H5Library_H +#define H5Library_H namespace H5 { @@ -69,4 +69,4 @@ class H5_DLLCPP H5Library { }; // end of H5Library } // namespace H5 -#endif // __H5Library_H +#endif // H5Library_H diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp index 832efea13f7..2d14bfcd1bb 100644 --- a/c++/src/H5Location.cpp +++ b/c++/src/H5Location.cpp @@ -2153,6 +2153,7 @@ H5Location::childObjType(const char *objname) const break; case H5O_TYPE_UNKNOWN: case H5O_TYPE_NTYPES: + case H5O_TYPE_MAP: default: throwException("childObjType", "Unknown type of object"); } @@ -2231,6 +2232,7 @@ H5Location::childObjType(hsize_t index, H5_index_t index_type, H5_iter_order_t o break; case H5O_TYPE_UNKNOWN: case H5O_TYPE_NTYPES: + case H5O_TYPE_MAP: default: throwException("childObjType", "Unknown type of object"); } diff --git a/c++/src/H5Location.h b/c++/src/H5Location.h index 9f61f20da7f..740d0ce57ea 100644 --- a/c++/src/H5Location.h +++ b/c++/src/H5Location.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5Location_H -#define __H5Location_H +#ifndef H5Location_H +#define H5Location_H #include "H5Classes.h" // constains forward class declarations @@ -339,4 +339,4 @@ class H5_DLLCPP H5Location : public IdComponent { }; // end of H5Location } // namespace H5 -#endif // __H5Location_H +#endif // H5Location_H diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp index 669bffc8e54..725d1dabd0b 100644 --- a/c++/src/H5Object.cpp +++ b/c++/src/H5Object.cpp @@ -42,8 +42,11 @@ namespace H5 { #ifndef DOXYGEN_SHOULD_SKIP_THIS // userAttrOpWrpr interfaces between the user's function and the // C library function H5Aiterate2 -extern "C" herr_t -userAttrOpWrpr(hid_t loc_id, const char *attr_name, const H5A_info_t *ainfo, void *op_data) +extern "C" { + +static herr_t +userAttrOpWrpr(H5_ATTR_UNUSED hid_t loc_id, const char *attr_name, H5_ATTR_UNUSED const H5A_info_t *ainfo, + void *op_data) { H5std_string s_attr_name = H5std_string(attr_name); UserData4Aiterate *myData = reinterpret_cast(op_data); @@ -53,8 +56,9 @@ userAttrOpWrpr(hid_t loc_id, const char *attr_name, const H5A_info_t *ainfo, voi // userVisitOpWrpr interfaces between the user's function and the // C library function H5Ovisit3 -extern "C" herr_t -userVisitOpWrpr(hid_t obj_id, const char *attr_name, const H5O_info2_t *obj_info, void *op_data) +static herr_t +userVisitOpWrpr(H5_ATTR_UNUSED hid_t obj_id, const char *attr_name, const H5O_info2_t *obj_info, + void *op_data) { H5std_string s_attr_name = H5std_string(attr_name); UserData4Visit *myData = reinterpret_cast(op_data); @@ -62,6 +66,8 @@ userVisitOpWrpr(hid_t obj_id, const char *attr_name, const H5O_info2_t *obj_info return status; } +} // extern "C" + //-------------------------------------------------------------------------- // Function: H5Object default constructor (protected) // Programmer Binh-Minh Ribler - 2000 diff --git a/c++/src/H5Object.h b/c++/src/H5Object.h index 7ba57ed3439..868f63f1d61 100644 --- a/c++/src/H5Object.h +++ b/c++/src/H5Object.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5Object_H -#define __H5Object_H +#ifndef H5Object_H +#define H5Object_H namespace H5 { @@ -132,4 +132,4 @@ class H5_DLLCPP H5Object : public H5Location { }; // end of H5Object } // namespace H5 -#endif // __H5Object_H +#endif // H5Object_H diff --git a/c++/src/H5OcreatProp.h b/c++/src/H5OcreatProp.h index ec6e9c8b629..7f6d411064e 100644 --- a/c++/src/H5OcreatProp.h +++ b/c++/src/H5OcreatProp.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5ObjCreatPropList_H -#define __H5ObjCreatPropList_H +#ifndef H5ObjCreatPropList_H +#define H5ObjCreatPropList_H namespace H5 { @@ -75,4 +75,4 @@ class H5_DLLCPP ObjCreatPropList : public PropList { }; // end of ObjCreatPropList } // namespace H5 -#endif // __H5ObjCreatPropList_H +#endif // H5ObjCreatPropList_H diff --git a/c++/src/H5PredType.cpp b/c++/src/H5PredType.cpp index dd703532745..b58569f68d8 100644 --- a/c++/src/H5PredType.cpp +++ b/c++/src/H5PredType.cpp @@ -27,6 +27,7 @@ #include "H5DataType.h" #include "H5AtomType.h" #include "H5PredType.h" +#include "H5private.h" namespace H5 { @@ -82,7 +83,7 @@ PredType::operator=(const PredType &rhs) // These dummy functions do not inherit from DataType - they'll // throw an DataTypeIException if invoked. void -PredType::commit(H5Location &loc, const char *name) +PredType::commit(H5_ATTR_UNUSED H5Location &loc, H5_ATTR_UNUSED const char *name) { throw DataTypeIException("PredType::commit", "Error: Attempted to commit a predefined datatype. Invalid operation!"); diff --git a/c++/src/H5PredType.h b/c++/src/H5PredType.h index c3ba6a20fc5..b40d2b3782d 100644 --- a/c++/src/H5PredType.h +++ b/c++/src/H5PredType.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5PredType_H -#define __H5PredType_H +#ifndef H5PredType_H +#define H5PredType_H namespace H5 { @@ -442,4 +442,4 @@ class H5_DLLCPP PredType : public AtomType { }; // end of PredType } // namespace H5 -#endif // __H5PredType_H +#endif // H5PredType_H diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp index 3f9a28e8499..3780220b15c 100644 --- a/c++/src/H5PropList.cpp +++ b/c++/src/H5PropList.cpp @@ -155,6 +155,9 @@ PropList::PropList(const hid_t plist_id) : IdComponent() case H5I_ERROR_STACK: case H5I_NTYPES: case H5I_UNINIT: + case H5I_MAP: + case H5I_SPACE_SEL_ITER: + case H5I_EVENTSET: default: id = H5P_DEFAULT; break; diff --git a/c++/src/H5PropList.h b/c++/src/H5PropList.h index cdd9619f21b..12c8b4b058c 100644 --- a/c++/src/H5PropList.h +++ b/c++/src/H5PropList.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5PropList_H -#define __H5PropList_H +#ifndef H5PropList_H +#define H5PropList_H namespace H5 { @@ -144,4 +144,4 @@ class H5_DLLCPP PropList : public IdComponent { }; // end of PropList } // namespace H5 -#endif // __H5PropList_H +#endif // H5PropList_H diff --git a/c++/src/H5StrType.cpp b/c++/src/H5StrType.cpp index 7bbe3ab07fd..473cab307fa 100644 --- a/c++/src/H5StrType.cpp +++ b/c++/src/H5StrType.cpp @@ -32,6 +32,7 @@ #include "H5StrType.h" #include "H5DataSet.h" #include "H5PredType.h" +#include "H5private.h" namespace H5 { @@ -102,7 +103,7 @@ StrType::StrType(const PredType &pred_type, const size_t &size) : AtomType() // This constructor replaced the previous one. // Programmer Binh-Minh Ribler - Nov 28, 2005 //-------------------------------------------------------------------------- -StrType::StrType(const int dummy, const size_t &size) : AtomType() +StrType::StrType(H5_ATTR_UNUSED const int dummy, const size_t &size) : AtomType() { // use DataType::copy to make a copy of the string predefined type // then set its length diff --git a/c++/src/H5StrType.h b/c++/src/H5StrType.h index b24cbefdc84..d272c535bcf 100644 --- a/c++/src/H5StrType.h +++ b/c++/src/H5StrType.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5StrType_H -#define __H5StrType_H +#ifndef H5StrType_H +#define H5StrType_H namespace H5 { @@ -78,4 +78,4 @@ class H5_DLLCPP StrType : public AtomType { }; // end of StrType } // namespace H5 -#endif // __H5StrType_H +#endif // H5StrType_H diff --git a/c++/src/H5VarLenType.h b/c++/src/H5VarLenType.h index 674b49d3f78..f767e0ebd2f 100644 --- a/c++/src/H5VarLenType.h +++ b/c++/src/H5VarLenType.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5VarLenType_H -#define __H5VarLenType_H +#ifndef H5VarLenType_H +#define H5VarLenType_H namespace H5 { @@ -61,4 +61,4 @@ class H5_DLLCPP VarLenType : public DataType { }; // end of VarLenType } // namespace H5 -#endif // __H5VarLenType_H +#endif // H5VarLenType_H diff --git a/c++/test/h5cpputil.h b/c++/test/h5cpputil.h index 6a9187a48cf..4439ae3f661 100644 --- a/c++/test/h5cpputil.h +++ b/c++/test/h5cpputil.h @@ -19,8 +19,8 @@ ***************************************************************************/ -#ifndef _h5cpputil_h -#define _h5cpputil_h +#ifndef H5cpputil_H +#define H5cpputil_H #include "h5test.h" diff --git a/config/cmake/HDF5PluginCache.cmake b/config/cmake/HDF5PluginCache.cmake index 2b9e48c26f7..3b085ddf54b 100644 --- a/config/cmake/HDF5PluginCache.cmake +++ b/config/cmake/HDF5PluginCache.cmake @@ -20,7 +20,7 @@ set (HDF5_REPACK_EXECUTABLE $ CACHE STRING "hdf5 h5 set (H5PL_ALLOW_EXTERNAL_SUPPORT "${HDF5_ALLOW_EXTERNAL_SUPPORT}" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE) -set (H5PL_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/h5plugin.git" CACHE STRING "Use plugins from HDF repository" FORCE) +set (H5PL_GIT_URL "https://github.com/HDFGroup/hdf5_plugins.git" CACHE STRING "Use plugins from HDF repository" FORCE) set (H5PL_GIT_BRANCH "master" CACHE STRING "" FORCE) set (H5PL_TGZ_NAME "${PLUGIN_TGZ_NAME}" CACHE STRING "Use plugins from compressed file" FORCE) diff --git a/fortran/src/H5f90.h b/fortran/src/H5f90.h index e8655e4e28b..3cc617f9d40 100644 --- a/fortran/src/H5f90.h +++ b/fortran/src/H5f90.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5f90_H -#define _H5f90_H +#ifndef H5f90_H +#define H5f90_H #include "hdf5.h" #include "H5private.h" @@ -27,4 +27,4 @@ #define H5_MAX(a, b) (((a) > (b)) ? (a) : (b)) -#endif /* _H5f90_H */ +#endif /* H5f90_H */ diff --git a/fortran/src/H5f90i.h b/fortran/src/H5f90i.h index 37e563b4b87..dbb6a161082 100644 --- a/fortran/src/H5f90i.h +++ b/fortran/src/H5f90i.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5f90i_H -#define _H5f90i_H +#ifndef H5f90i_H +#define H5f90i_H /* * Include generated header. This header defines integer types, @@ -36,4 +36,4 @@ typedef char *_fcd; #endif -#endif /* _H5f90i_H */ +#endif /* H5f90i_H */ diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index bed9ba9aec7..fbbf7c26400 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5f90proto_H -#define _H5f90proto_H +#ifndef H5f90proto_H +#define H5f90proto_H #include "H5public.h" #include "H5f90.h" @@ -643,4 +643,4 @@ H5_FCDLL int_f h5literate_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namele int_f *order, hsize_t_f *idx, H5L_iterate2_t op, void *op_data, hid_t_f *lapl_id); -#endif /* _H5f90proto_H */ +#endif /* H5f90proto_H */ diff --git a/hl/c++/src/H5PacketTable.h b/hl/c++/src/H5PacketTable.h index 735901f9a2f..825caf79bd6 100644 --- a/hl/c++/src/H5PacketTable.h +++ b/hl/c++/src/H5PacketTable.h @@ -163,7 +163,7 @@ class H5_HLCPPDLL FL_PacketTable : virtual public PacketTable { /* Destructor * Cleans up the packet table */ - virtual ~FL_PacketTable(){}; + virtual ~FL_PacketTable() {} /* AppendPacket * Adds a single packet to the packet table. Takes a pointer diff --git a/hl/fortran/src/H5IMcc.h b/hl/fortran/src/H5IMcc.h index 0527a39d7fb..7473c001771 100644 --- a/hl/fortran/src/H5IMcc.h +++ b/hl/fortran/src/H5IMcc.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5IMCC_H -#define _H5IMCC_H +#ifndef H5IMCC_H +#define H5IMCC_H #include "H5LTprivate.h" #include "H5IMprivate.h" diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h index a912d0b50cc..8847c01948f 100644 --- a/hl/fortran/src/H5LTf90proto.h +++ b/hl/fortran/src/H5LTf90proto.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5LTf90proto_H -#define _H5LTf90proto_H +#ifndef H5LTf90proto_H +#define H5LTf90proto_H #include "H5public.h" #include "H5f90i.h" @@ -206,4 +206,4 @@ int_f h5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_ size_t_f *field_sizes, size_t_f *field_offsets, size_t_f *type_size, size_t_f *namelen2, size_t_f *lenmax, _fcd field_names, size_t_f *maxlen_out); -#endif /* _H5LTf90proto_H */ +#endif /* H5LTf90proto_H */ diff --git a/hl/src/H5DOpublic.h b/hl/src/H5DOpublic.h index 50d58f50023..88616a3738e 100644 --- a/hl/src/H5DOpublic.h +++ b/hl/src/H5DOpublic.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5DOpublic_H -#define _H5DOpublic_H +#ifndef H5DOpublic_H +#define H5DOpublic_H #ifdef __cplusplus extern "C" { diff --git a/hl/src/H5DSprivate.h b/hl/src/H5DSprivate.h index 42dd6bf92ae..0403a4cbe30 100644 --- a/hl/src/H5DSprivate.h +++ b/hl/src/H5DSprivate.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5DSprivate_H -#define _H5DSprivate_H +#ifndef H5DSprivate_H +#define H5DSprivate_H /* High-level library internal header file */ #include "H5HLprivate2.h" diff --git a/hl/src/H5DSpublic.h b/hl/src/H5DSpublic.h index ca7ad3b51c4..7306cbc85ea 100644 --- a/hl/src/H5DSpublic.h +++ b/hl/src/H5DSpublic.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5DSpublic_H -#define _H5DSpublic_H +#ifndef H5DSpublic_H +#define H5DSpublic_H #define DIMENSION_SCALE_CLASS "DIMENSION_SCALE" #define DIMENSION_LIST "DIMENSION_LIST" diff --git a/hl/src/H5HLprivate2.h b/hl/src/H5HLprivate2.h index 1202f00b631..c696b773260 100644 --- a/hl/src/H5HLprivate2.h +++ b/hl/src/H5HLprivate2.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5HLprivate2_H -#define _H5HLprivate2_H +#ifndef H5HLprivate2_H +#define H5HLprivate2_H /* Public HDF5 header */ #include "hdf5.h" @@ -23,4 +23,4 @@ /* HDF5 private functions */ #include "H5private.h" -#endif /* _H5HLprivate2_H */ +#endif /* H5HLprivate2_H */ diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c index 64cb5355282..310d665ed64 100644 --- a/hl/src/H5IM.c +++ b/hl/src/H5IM.c @@ -160,7 +160,8 @@ H5IMmake_image_24bit(hid_t loc_id, const char *dset_name, hsize_t width, hsize_t *------------------------------------------------------------------------- */ static herr_t -find_palette(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *op_data) +find_palette(H5_ATTR_UNUSED hid_t loc_id, const char *name, H5_ATTR_UNUSED const H5A_info_t *ainfo, + H5_ATTR_UNUSED void *op_data) { int ret = H5_ITER_CONT; @@ -168,11 +169,6 @@ find_palette(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *op_d if (name == NULL) return -1; - /* Shut compiler up */ - loc_id = loc_id; - ainfo = ainfo; - op_data = op_data; - /* Define a positive value for return value if the attribute was found. This will * cause the iterator to immediately return that positive value, * indicating short-circuit success diff --git a/hl/src/H5IMprivate.h b/hl/src/H5IMprivate.h index 8803a4c86a1..3570ea3352e 100644 --- a/hl/src/H5IMprivate.h +++ b/hl/src/H5IMprivate.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5IMprivate_H -#define _H5IMprivate_H +#ifndef H5IMprivate_H +#define H5IMprivate_H /* High-level library internal header file */ #include "H5HLprivate2.h" diff --git a/hl/src/H5IMpublic.h b/hl/src/H5IMpublic.h index fae49021213..2843942e13d 100644 --- a/hl/src/H5IMpublic.h +++ b/hl/src/H5IMpublic.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5IMpublic_H -#define _H5IMpublic_H +#ifndef H5IMpublic_H +#define H5IMpublic_H #ifdef __cplusplus extern "C" { diff --git a/hl/src/H5LDprivate.h b/hl/src/H5LDprivate.h index 2728f8beb38..862e5b7d98c 100644 --- a/hl/src/H5LDprivate.h +++ b/hl/src/H5LDprivate.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5LDprivate_H -#define _H5LDprivate_H +#ifndef H5LDprivate_H +#define H5LDprivate_H /* High-level library internal header file */ #include "H5HLprivate2.h" @@ -50,4 +50,4 @@ H5_HLDLL int H5LD_construct_vector(char *fields, H5LD_memb_t *listv[], hid_t pa } #endif -#endif /* end _H5LDprivate_H */ +#endif /* end H5LDprivate_H */ diff --git a/hl/src/H5LDpublic.h b/hl/src/H5LDpublic.h index a19f8d07260..011b208e4cb 100644 --- a/hl/src/H5LDpublic.h +++ b/hl/src/H5LDpublic.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5LDpublic_H -#define _H5LDpublic_H +#ifndef H5LDpublic_H +#define H5LDpublic_H #ifdef __cplusplus extern "C" { @@ -27,4 +27,4 @@ H5_HLDLL herr_t H5LDget_dset_elmts(hid_t did, const hsize_t *prev_dims, const hs } #endif -#endif /* _H5LDpublic_H */ +#endif /* H5LDpublic_H */ diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c index 267e38ee924..6478a96f4cf 100644 --- a/hl/src/H5LT.c +++ b/hl/src/H5LT.c @@ -1297,7 +1297,8 @@ H5LTget_dataset_info(hid_t loc_id, const char *dset_name, hsize_t *dims, H5T_cla */ static herr_t -find_dataset(hid_t loc_id, const char *name, const H5L_info2_t *linfo, void *op_data) +find_dataset(H5_ATTR_UNUSED hid_t loc_id, const char *name, H5_ATTR_UNUSED const H5L_info2_t *linfo, + void *op_data) { /* Define a default zero value for return. This will cause the iterator to continue if * the dataset is not found yet. @@ -1308,10 +1309,6 @@ find_dataset(hid_t loc_id, const char *name, const H5L_info2_t *linfo, void *op_ if (name == NULL) return ret; - /* Shut the compiler up */ - loc_id = loc_id; - linfo = linfo; - /* Define a positive value for return value if the dataset was found. This will * cause the iterator to immediately return that positive value, * indicating short-circuit success @@ -1841,7 +1838,8 @@ H5LTset_attribute_double(hid_t loc_id, const char *obj_name, const char *attr_na *------------------------------------------------------------------------- */ static herr_t -find_attr(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *op_data) +find_attr(H5_ATTR_UNUSED hid_t loc_id, const char *name, H5_ATTR_UNUSED const H5A_info_t *ainfo, + void *op_data) { int ret = H5_ITER_CONT; @@ -1849,10 +1847,6 @@ find_attr(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *op_data if (name == NULL) return H5_ITER_CONT; - /* Shut compiler up */ - loc_id = loc_id; - ainfo = ainfo; - /* Define a positive value for return value if the attribute was found. This will * cause the iterator to immediately return that positive value, * indicating short-circuit success diff --git a/hl/src/H5LTprivate.h b/hl/src/H5LTprivate.h index ddcbbbfcda4..5a97d9c22f6 100644 --- a/hl/src/H5LTprivate.h +++ b/hl/src/H5LTprivate.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5LTprivate_H -#define _H5LTprivate_H +#ifndef H5LTprivate_H +#define H5LTprivate_H /* High-level library internal header file */ #include "H5HLprivate2.h" diff --git a/hl/src/H5LTpublic.h b/hl/src/H5LTpublic.h index 417fce84d38..2af9b07a0ff 100644 --- a/hl/src/H5LTpublic.h +++ b/hl/src/H5LTpublic.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5LTpublic_H -#define _H5LTpublic_H +#ifndef H5LTpublic_H +#define H5LTpublic_H /* Flag definitions for H5LTopen_file_image() */ #define H5LT_FILE_IMAGE_OPEN_RW 0x0001 /* Open image for read-write */ diff --git a/hl/src/H5PTprivate.h b/hl/src/H5PTprivate.h index 7277dd285b9..9ca7676852a 100644 --- a/hl/src/H5PTprivate.h +++ b/hl/src/H5PTprivate.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5PTprivate_H -#define _H5PTprivate_H +#ifndef H5PTprivate_H +#define H5PTprivate_H /* High-level library internal header file */ #include "H5HLprivate2.h" diff --git a/hl/src/H5PTpublic.h b/hl/src/H5PTpublic.h index ec744f88270..d74baa513ed 100644 --- a/hl/src/H5PTpublic.h +++ b/hl/src/H5PTpublic.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5PTpublic_H -#define _H5PTpublic_H +#ifndef H5PTpublic_H +#define H5PTpublic_H #ifdef __cplusplus extern "C" { diff --git a/hl/src/H5TBprivate.h b/hl/src/H5TBprivate.h index abe43c43f87..95b58e6e8ee 100644 --- a/hl/src/H5TBprivate.h +++ b/hl/src/H5TBprivate.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5TBprivate_H -#define _H5TBprivate_H +#ifndef H5TBprivate_H +#define H5TBprivate_H /* High-level library internal header file */ #include "H5HLprivate2.h" diff --git a/hl/src/H5TBpublic.h b/hl/src/H5TBpublic.h index 1324fbd017e..1750490791f 100644 --- a/hl/src/H5TBpublic.h +++ b/hl/src/H5TBpublic.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5TBpublic_H -#define _H5TBpublic_H +#ifndef H5TBpublic_H +#define H5TBpublic_H #ifdef __cplusplus extern "C" { diff --git a/hl/test/h5hltest.h b/hl/test/h5hltest.h index 7d9c5d1cf2d..14f3e141f25 100644 --- a/hl/test/h5hltest.h +++ b/hl/test/h5hltest.h @@ -18,8 +18,8 @@ * Purpose: Test support stuff. */ -#ifndef _H5HLTEST_H -#define _H5HLTEST_H +#ifndef H5HLTEST_H +#define H5HLTEST_H /* Get the HDF5 test header */ #include "h5test.h" @@ -48,4 +48,4 @@ int test_packet_table_with_varlen(void); -#endif /* _H5HLTEST_H */ +#endif /* H5HLTEST_H */ diff --git a/hl/tools/gif2h5/hdfgifwr.c b/hl/tools/gif2h5/hdfgifwr.c index 333c80804a7..8068829fed7 100644 --- a/hl/tools/gif2h5/hdfgifwr.c +++ b/hl/tools/gif2h5/hdfgifwr.c @@ -152,12 +152,12 @@ hdfWriteGIF(FILE *fp, byte *pic, int ptype, int w, int h, byte *rmap, byte *gmap } /* Shut compiler up... */ - ptype = ptype; - rmap = rmap; - gmap = gmap; - bmap = bmap; - numcols = numcols; - colorstyle = colorstyle; + (void)ptype; + (void)rmap; + (void)gmap; + (void)bmap; + (void)numcols; + (void)colorstyle; for (i = 0; i < 256; i++) { pc2nc[i] = pc2ncmap[i]; diff --git a/java/src/jni/exceptionImp.c b/java/src/jni/exceptionImp.c index e62caeea7ba..12ef0a1a0ad 100644 --- a/java/src/jni/exceptionImp.c +++ b/java/src/jni/exceptionImp.c @@ -262,11 +262,24 @@ H5JNIErrorClass(JNIEnv *env, const char *message, const char *className) * exception. */ jboolean -h5outOfMemory(JNIEnv *env, const char *functName) +h5outOfMemory(JNIEnv *env, const char *message) { - return H5JNIErrorClass(env, functName, "java/lang/OutOfMemoryError"); + return H5JNIErrorClass(env, message, "java/lang/OutOfMemoryError"); } /* end h5outOfMemory() */ +/* + * Create and throw an 'AssertionError' + * + * Note: This routine never returns from the 'throw', + * and the Java native method immediately raises the + * exception. + */ +jboolean +h5assertion(JNIEnv *env, const char *message) +{ + return H5JNIErrorClass(env, message, "java/lang/AssertionError"); +} /* end h5assertion() */ + /* * A fatal error in a JNI call * Create and throw an 'InternalError' @@ -276,9 +289,9 @@ h5outOfMemory(JNIEnv *env, const char *functName) * exception. */ jboolean -h5JNIFatalError(JNIEnv *env, const char *functName) +h5JNIFatalError(JNIEnv *env, const char *message) { - return H5JNIErrorClass(env, functName, "java/lang/InternalError"); + return H5JNIErrorClass(env, message, "java/lang/InternalError"); } /* end h5JNIFatalError() */ /* @@ -290,9 +303,9 @@ h5JNIFatalError(JNIEnv *env, const char *functName) * exception. */ jboolean -h5nullArgument(JNIEnv *env, const char *functName) +h5nullArgument(JNIEnv *env, const char *message) { - return H5JNIErrorClass(env, functName, "java/lang/NullPointerException"); + return H5JNIErrorClass(env, message, "java/lang/NullPointerException"); } /* end h5nullArgument() */ /* @@ -304,9 +317,9 @@ h5nullArgument(JNIEnv *env, const char *functName) * exception. */ jboolean -h5badArgument(JNIEnv *env, const char *functName) +h5badArgument(JNIEnv *env, const char *message) { - return H5JNIErrorClass(env, functName, "java/lang/IllegalArgumentException"); + return H5JNIErrorClass(env, message, "java/lang/IllegalArgumentException"); } /* end h5badArgument() */ /* @@ -318,9 +331,9 @@ h5badArgument(JNIEnv *env, const char *functName) * exception. */ jboolean -h5unimplemented(JNIEnv *env, const char *functName) +h5unimplemented(JNIEnv *env, const char *message) { - return H5JNIErrorClass(env, functName, "java/lang/UnsupportedOperationException"); + return H5JNIErrorClass(env, message, "java/lang/UnsupportedOperationException"); } /* end h5unimplemented() */ /* h5raiseException(). This routine is called to generate diff --git a/java/src/jni/h5jni.h b/java/src/jni/h5jni.h index aab54796096..2ec30da500f 100644 --- a/java/src/jni/h5jni.h +++ b/java/src/jni/h5jni.h @@ -266,9 +266,10 @@ extern jboolean h5JNIFatalError(JNIEnv *env, const char *); extern jboolean h5nullArgument(JNIEnv *env, const char *); extern jboolean h5badArgument(JNIEnv *env, const char *); extern jboolean h5outOfMemory(JNIEnv *env, const char *); +extern jboolean h5assertion(JNIEnv *env, const char *); +extern jboolean h5unimplemented(JNIEnv *env, const char *); extern jboolean h5libraryError(JNIEnv *env); extern jboolean h5raiseException(JNIEnv *env, const char *, const char *); -extern jboolean h5unimplemented(JNIEnv *env, const char *functName); /* * The following macros are to facilitate immediate cleanup+return @@ -304,21 +305,27 @@ extern jboolean h5unimplemented(JNIEnv *env, const char *functName); goto done; \ } while (0) -#define H5_LIBRARY_ERROR(env) \ +#define H5_ASSERTION_ERROR(env, message) \ do { \ - h5libraryError(env); \ + h5assertion(env, message); \ goto done; \ } while (0) -#define H5_RAISE_EXCEPTION(env, message, exception) \ +#define H5_UNIMPLEMENTED(env, message) \ do { \ - h5raiseException(env, message, exception); \ + h5unimplemented(env, message); \ goto done; \ } while (0) -#define H5_UNIMPLEMENTED(env, message) \ +#define H5_LIBRARY_ERROR(env) \ do { \ - h5unimplemented(env, message); \ + h5libraryError(env); \ + goto done; \ + } while (0) + +#define H5_RAISE_EXCEPTION(env, message, exception) \ + do { \ + h5raiseException(env, message, exception); \ goto done; \ } while (0) diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index 3e1962e3e49..2e02e4d4b52 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -657,14 +657,14 @@ h5str_sprint_reference(JNIEnv *env, h5str_t *out_str, void *ref_p) int ret_value = FAIL; if (!h5str_append(out_str, " \"")) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); buf_size = H5Rget_file_name(ref_vp, NULL, 0); if (buf_size) { ref_name = (char *)HDmalloc(sizeof(char) * (size_t)buf_size + 1); if (H5Rget_file_name(ref_vp, ref_name, buf_size + 1) >= 0) { ref_name[buf_size] = '\0'; if (!h5str_append(out_str, ref_name)) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } HDfree(ref_name); ref_name = NULL; @@ -676,7 +676,7 @@ h5str_sprint_reference(JNIEnv *env, h5str_t *out_str, void *ref_p) if (H5Rget_obj_name(ref_vp, H5P_DEFAULT, ref_name, buf_size + 1) >= 0) { ref_name[buf_size] = '\0'; if (!h5str_append(out_str, ref_name)) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } HDfree(ref_name); ref_name = NULL; @@ -689,14 +689,14 @@ h5str_sprint_reference(JNIEnv *env, h5str_t *out_str, void *ref_p) if (H5Rget_attr_name(ref_vp, ref_name, buf_size + 1) >= 0) { ref_name[buf_size] = '\0'; if (!h5str_append(out_str, ref_name)) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } HDfree(ref_name); ref_name = NULL; } } if (!h5str_append(out_str, "\"")) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); ret_value = SUCCEED; done: @@ -1044,7 +1044,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i H5_LIBRARY_ERROR(ENVONLY); if (!h5str_append(out_str, H5_COMPOUND_BEGIN_INDICATOR)) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); for (i = 0; i < (unsigned)n; i++) { offset = H5Tget_member_offset(tid, i); @@ -1057,7 +1057,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i if ((i + 1) < (unsigned)n) if (!h5str_append(out_str, ", ")) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); if (H5Tclose(mtid) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -1065,7 +1065,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i } if (!h5str_append(out_str, H5_COMPOUND_END_INDICATOR)) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); break; } @@ -1075,7 +1075,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i if (H5Tenum_nameof(tid, cptr, enum_name, sizeof enum_name) >= 0) { if (!h5str_append(out_str, enum_name)) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } else { size_t i; @@ -1140,7 +1140,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i if (HDsprintf(this_str, "%u-", (unsigned)oi.type) < 0) H5_JNI_FATAL_ERROR(ENVONLY, "h5str_sprintf: HDsprintf failure"); if (!h5str_append(out_str, this_str)) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); HDfree(this_str); this_str = NULL; @@ -1190,7 +1190,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i } /* end switch */ } else - H5_JNI_FATAL_ERROR(ENVONLY, "h5str_sprintf: H5R_OBJECT2 failed"); + H5_ASSERTION_ERROR(ENVONLY, "h5str_sprintf: H5R_OBJECT2 failed"); break; case H5R_DATASET_REGION2: if (h5str_region_dataset(ENVONLY, out_str, ref_vp, expand_data) < 0) @@ -1231,7 +1231,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i int rank = 0; if (!h5str_append(out_str, H5_ARRAY_BEGIN_INDICATOR)) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); if ((mtid = H5Tget_super(tid)) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -1254,11 +1254,11 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i if ((i + 1) < total_elmts) if (!h5str_append(out_str, ", ")) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } if (!h5str_append(out_str, H5_ARRAY_END_INDICATOR)) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); if (H5Tclose(mtid) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -1279,7 +1279,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i H5_LIBRARY_ERROR(ENVONLY); if (!h5str_append(out_str, H5_VLEN_BEGIN_INDICATOR)) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); for (i = 0; i < (unsigned)vl_buf->len; i++) { if (!h5str_sprintf(ENVONLY, out_str, container, mtid, &(((char *)vl_buf->p)[i * baseSize]), @@ -1288,11 +1288,11 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i if ((i + 1) < (unsigned)vl_buf->len) if (!h5str_append(out_str, ", ")) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } if (!h5str_append(out_str, H5_VLEN_END_INDICATOR)) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); if (H5Tclose(mtid) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -1334,7 +1334,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i if (this_str) { if (!h5str_append(out_str, this_str)) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); HDfree(this_str); this_str = NULL; @@ -1440,7 +1440,7 @@ h5str_print_region_data_blocks(JNIEnv *env, hid_t region_id, h5str_t *str, int n if (numindex + 1 < numelem) if (!h5str_append(str, ", ")) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } /* end for (jndx = 0; jndx < numelem; jndx++, region_elmtno++, ctx.cur_elmt++) */ } /* end for (blkndx = 0; blkndx < nblocks; blkndx++) */ @@ -1509,16 +1509,16 @@ h5str_dump_region_blocks(JNIEnv *env, h5str_t *str, hid_t region_space, hid_t re } else { if (!h5str_append(str, " REGION_TYPE BLOCK")) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); if (!h5str_append(str, " {")) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); for (i = 0; i < nblocks; i++) { int j; if (!h5str_append(str, " ")) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); /* Start coordinates and opposite corner */ for (j = 0; j < ndims; j++) { @@ -1528,7 +1528,7 @@ h5str_dump_region_blocks(JNIEnv *env, h5str_t *str, hid_t region_space, hid_t re H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_region_blocks: HDsprintf failure"); if (!h5str_append(str, tmp_str)) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } for (j = 0; j < ndims; j++) { @@ -1539,17 +1539,17 @@ h5str_dump_region_blocks(JNIEnv *env, h5str_t *str, hid_t region_space, hid_t re H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_region_blocks: HDsprintf failure"); if (!h5str_append(str, tmp_str)) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } if (!h5str_append(str, ") ")) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); tmp_str[0] = '\0'; } if (!h5str_append(str, " }")) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } ret_value = SUCCEED; @@ -1620,7 +1620,7 @@ h5str_print_region_data_points(JNIEnv *env, hid_t region_space, hid_t region_id, if (jndx + 1 < (size_t)npoints) if (!h5str_append(str, ", ")) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } /* end for (jndx = 0; jndx < npoints; jndx++, elmtno++) */ ret_value = SUCCEED; @@ -1684,16 +1684,16 @@ h5str_dump_region_points(JNIEnv *env, h5str_t *str, hid_t region_space, hid_t re } else { if (!h5str_append(str, " REGION_TYPE POINT")) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); if (!h5str_append(str, " {")) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); for (i = 0; i < npoints; i++) { int j; if (!h5str_append(str, " ")) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); for (j = 0; j < ndims; j++) { tmp_str[0] = '\0'; @@ -1702,15 +1702,15 @@ h5str_dump_region_points(JNIEnv *env, h5str_t *str, hid_t region_space, hid_t re H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_region_points: HDsprintf failure"); if (!h5str_append(str, tmp_str)) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } /* end for (j = 0; j < ndims; j++) */ if (!h5str_append(str, ") ")) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } /* end for (i = 0; i < npoints; i++) */ if (!h5str_append(str, " }")) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } ret_value = SUCCEED; @@ -2719,7 +2719,7 @@ h5str_dump_region_attribute(JNIEnv *env, h5str_t *str, hid_t region_id) if ((i < p_nelmts - 1) && (bytes_in > 0)) { if (!h5str_append(str, ", ")) - H5_LIBRARY_ERROR(ENVONLY); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } } @@ -3620,7 +3620,7 @@ Java_hdf_hdf5lib_H5_H5export_1dataset(JNIEnv *env, jclass clss, jstring file_exp H5_JNI_FATAL_ERROR(ENVONLY, "HDfopen failed"); if ((ret_val = h5str_dump_simple_dset(ENVONLY, stream, dataset_id, binary_order)) < 0) - H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_simple_dset failed"); + H5_ASSERTION_ERROR(ENVONLY, "h5str_dump_simple_dset failed"); if (stream) { HDfclose(stream); diff --git a/java/test/TestAll.java b/java/test/TestAll.java index a59e9905bfc..3950072b53a 100644 --- a/java/test/TestAll.java +++ b/java/test/TestAll.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 * @@ -25,7 +24,7 @@ TestH5Tparams.class, TestH5Tbasic.class, TestH5T.class, TestH5Dparams.class, TestH5D.class, TestH5Dplist.class, TestH5Lparams.class, TestH5Lbasic.class, TestH5Lcreate.class, - TestH5R.class, + TestH5R.class, TestH5Rref.class, TestH5P.class, TestH5PData.class, TestH5Pfapl.class, TestH5Pvirtual.class, TestH5Plist.class, TestH5Pfapls3.class, TestH5Pfaplhdfs.class, TestH5A.class, diff --git a/java/test/TestH5Rref.java b/java/test/TestH5Rref.java index e306d7a5e5c..aeec64f5faa 100644 --- a/java/test/TestH5Rref.java +++ b/java/test/TestH5Rref.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/src/H5ACmodule.h b/src/H5ACmodule.h index 87bababbde4..d1f969757f5 100644 --- a/src/H5ACmodule.h +++ b/src/H5ACmodule.h @@ -18,8 +18,8 @@ * H5AC package. Including this header means that the source file * is part of the H5AC package. */ -#ifndef _H5ACmodule_H -#define _H5ACmodule_H +#ifndef H5ACmodule_H +#define H5ACmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_CACHE #define H5_MY_PKG_INIT YES -#endif /* _H5ACmodule_H */ +#endif /* H5ACmodule_H */ diff --git a/src/H5ACpkg.h b/src/H5ACpkg.h index ce4306f7600..7da46a05448 100644 --- a/src/H5ACpkg.h +++ b/src/H5ACpkg.h @@ -30,8 +30,8 @@ #error "Do not include this file outside the H5AC package!" #endif -#ifndef _H5ACpkg_H -#define _H5ACpkg_H +#ifndef H5ACpkg_H +#define H5ACpkg_H /* Get package's private header */ #include "H5ACprivate.h" /* Metadata cache */ @@ -423,4 +423,4 @@ H5_DLL herr_t H5AC__set_sync_point_done_callback(H5C_t *cache_ptr, H5_DLL herr_t H5AC__set_write_done_callback(H5C_t *cache_ptr, void (*write_done)(void)); #endif /* H5_HAVE_PARALLEL */ -#endif /* _H5ACpkg_H */ +#endif /* H5ACpkg_H */ diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h index 29ecafdd983..283989da4ef 100644 --- a/src/H5ACprivate.h +++ b/src/H5ACprivate.h @@ -23,8 +23,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5ACprivate_H -#define _H5ACprivate_H +#ifndef H5ACprivate_H +#define H5ACprivate_H #include "H5ACpublic.h" /*public prototypes */ @@ -458,4 +458,4 @@ H5_DLL hbool_t H5AC_get_serialization_in_progress(H5F_t *f); H5_DLL hbool_t H5AC_cache_is_clean(const H5F_t *f, H5AC_ring_t inner_ring); #endif /* NDEBUG */ /* end debugging functions */ -#endif /* !_H5ACprivate_H */ +#endif /* H5ACprivate_H */ diff --git a/src/H5ACpublic.h b/src/H5ACpublic.h index 51244b408c8..e6cebffe6ed 100644 --- a/src/H5ACpublic.h +++ b/src/H5ACpublic.h @@ -21,8 +21,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5ACpublic_H -#define _H5ACpublic_H +#ifndef H5ACpublic_H +#define H5ACpublic_H /* Public headers needed by this file */ #include "H5public.h" diff --git a/src/H5Amodule.h b/src/H5Amodule.h index 0b8c1e27bc3..45172bf5026 100644 --- a/src/H5Amodule.h +++ b/src/H5Amodule.h @@ -18,8 +18,8 @@ * H5A package. Including this header means that the source file * is part of the H5A package. */ -#ifndef _H5Amodule_H -#define _H5Amodule_H +#ifndef H5Amodule_H +#define H5Amodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -46,4 +46,4 @@ * */ -#endif /* _H5Amodule_H */ +#endif /* H5Amodule_H */ diff --git a/src/H5Apkg.h b/src/H5Apkg.h index 315d5167118..48adeef24d2 100644 --- a/src/H5Apkg.h +++ b/src/H5Apkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5A package!" #endif -#ifndef _H5Apkg_H -#define _H5Apkg_H +#ifndef H5Apkg_H +#define H5Apkg_H /* * Define this to enable debugging. @@ -263,4 +263,4 @@ H5_DLL htri_t H5A__is_shared_test(hid_t aid); H5_DLL herr_t H5A__get_shared_rc_test(hid_t attr_id, hsize_t *ref_count); #endif /* H5A_TESTING */ -#endif /* _H5Apkg_H */ +#endif /* H5Apkg_H */ diff --git a/src/H5Aprivate.h b/src/H5Aprivate.h index a62713892fd..3ed0239d5bc 100644 --- a/src/H5Aprivate.h +++ b/src/H5Aprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5D module */ -#ifndef _H5Aprivate_H -#define _H5Aprivate_H +#ifndef H5Aprivate_H +#define H5Aprivate_H /* Include package's public header */ #include "H5Apublic.h" @@ -78,4 +78,4 @@ H5_DLL herr_t H5O_attr_iterate_real(hid_t loc_id, const H5O_loc_t *loc, H5_index H5_iter_order_t order, hsize_t skip, hsize_t *last_attr, const H5A_attr_iter_op_t *attr_op, void *op_data); -#endif /* _H5Aprivate_H */ +#endif /* H5Aprivate_H */ diff --git a/src/H5Apublic.h b/src/H5Apublic.h index fbf42cd840e..9fdfdd49f3a 100644 --- a/src/H5Apublic.h +++ b/src/H5Apublic.h @@ -14,8 +14,8 @@ /* * This file contains public declarations for the H5A module. */ -#ifndef _H5Apublic_H -#define _H5Apublic_H +#ifndef H5Apublic_H +#define H5Apublic_H /* Public headers needed by this file */ #include "H5Ipublic.h" /* IDs */ @@ -445,4 +445,4 @@ H5_DLL herr_t H5Aiterate1(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op, } #endif -#endif /* _H5Apublic_H */ +#endif /* H5Apublic_H */ diff --git a/src/H5B2module.h b/src/H5B2module.h index 05fc8e1b3d2..aa0e163b857 100644 --- a/src/H5B2module.h +++ b/src/H5B2module.h @@ -18,8 +18,8 @@ * H5B2 package. Including this header means that the source file * is part of the H5B2 package. */ -#ifndef _H5B2module_H -#define _H5B2module_H +#ifndef H5B2module_H +#define H5B2module_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_BTREE #define H5_MY_PKG_INIT NO -#endif /* _H5B2module_H */ +#endif /* H5B2module_H */ diff --git a/src/H5B2pkg.h b/src/H5B2pkg.h index 9efac2f03d7..8d620cc890d 100644 --- a/src/H5B2pkg.h +++ b/src/H5B2pkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5B2 package!" #endif -#ifndef _H5B2pkg_H -#define _H5B2pkg_H +#ifndef H5B2pkg_H +#define H5B2pkg_H /* Get package's private header */ #include "H5B2private.h" @@ -453,4 +453,4 @@ H5_DLL int H5B2__get_node_depth_test(H5B2_t *bt2, void *udata); H5_DLL herr_t H5B2__get_node_info_test(H5B2_t *bt2, void *udata, H5B2_node_info_test_t *ninfo); #endif /* H5B2_TESTING */ -#endif /* _H5B2pkg_H */ +#endif /* H5B2pkg_H */ diff --git a/src/H5B2private.h b/src/H5B2private.h index ced3992a8f2..21ea8236fa2 100644 --- a/src/H5B2private.h +++ b/src/H5B2private.h @@ -22,8 +22,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5B2private_H -#define _H5B2private_H +#ifndef H5B2private_H +#define H5B2private_H /* Private headers needed by this file */ #include "H5ACprivate.h" /* Metadata cache */ @@ -149,4 +149,4 @@ H5_DLL herr_t H5B2_patch_file(H5B2_t *fa, H5F_t *f); /* Statistics routines */ H5_DLL herr_t H5B2_stat_info(H5B2_t *bt2, H5B2_stat_t *info); -#endif /* _H5B2private_H */ +#endif /* H5B2private_H */ diff --git a/src/H5Bmodule.h b/src/H5Bmodule.h index 9a1bc13ba7c..cfd3d534c36 100644 --- a/src/H5Bmodule.h +++ b/src/H5Bmodule.h @@ -18,8 +18,8 @@ * H5B package. Including this header means that the source file * is part of the H5B package. */ -#ifndef _H5Bmodule_H -#define _H5Bmodule_H +#ifndef H5Bmodule_H +#define H5Bmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_BTREE #define H5_MY_PKG_INIT NO -#endif /* _H5Bmodule_H */ +#endif /* H5Bmodule_H */ diff --git a/src/H5Bpkg.h b/src/H5Bpkg.h index a226f6bec76..0a796283da3 100644 --- a/src/H5Bpkg.h +++ b/src/H5Bpkg.h @@ -12,25 +12,25 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Quincey Koziol - * Thursday, May 15, 2003 + * Programmer: Quincey Koziol + * Thursday, May 15, 2003 * - * Purpose: This file contains declarations which are visible only within - * the H5B package. Source files outside the H5B package should - * include H5Bprivate.h instead. + * Purpose: This file contains declarations which are visible only within + * the H5B package. Source files outside the H5B package should + * include H5Bprivate.h instead. */ #if !(defined H5B_FRIEND || defined H5B_MODULE) #error "Do not include this file outside the H5B package!" #endif -#ifndef _H5Bpkg_H -#define _H5Bpkg_H +#ifndef H5Bpkg_H +#define H5Bpkg_H /* Get package's private header */ #include "H5Bprivate.h" /* Other private headers needed by this file */ -#include "H5ACprivate.h" /* Metadata cache */ +#include "H5ACprivate.h" /* Metadata cache */ #include "H5FLprivate.h" /* Free Lists */ /**************************/ @@ -49,20 +49,20 @@ typedef struct H5B_t { H5AC_info_t cache_info; /* Information for H5AC cache functions */ /* _must_ be first field in structure */ - H5UC_t * rc_shared; /*ref-counted shared info */ - unsigned level; /*node level */ - unsigned nchildren; /*number of child pointers */ - haddr_t left; /*address of left sibling */ - haddr_t right; /*address of right sibling */ + H5UC_t * rc_shared; /*ref-counted shared info */ + unsigned level; /*node level */ + unsigned nchildren; /*number of child pointers */ + haddr_t left; /*address of left sibling */ + haddr_t right; /*address of right sibling */ uint8_t *native; /*array of keys in native format */ - haddr_t *child; /*2k child pointers */ + haddr_t *child; /*2k child pointers */ } H5B_t; /* Callback info for loading a B-tree node into the cache */ typedef struct H5B_cache_ud_t { H5F_t * f; /* File that B-tree node is within */ - const struct H5B_class_t *type; /* Type of tree */ - H5UC_t * rc_shared; /* Ref-counted shared info */ + const struct H5B_class_t *type; /* Type of tree */ + H5UC_t * rc_shared; /* Ref-counted shared info */ } H5B_cache_ud_t; /*****************************/ @@ -86,4 +86,4 @@ H5_DLL herr_t H5B__node_dest(H5B_t *bt); herr_t H5B__assert(H5F_t *f, haddr_t addr, const H5B_class_t *type, void *udata); #endif -#endif /*_H5Bpkg_H*/ +#endif /*H5Bpkg_H*/ diff --git a/src/H5Bprivate.h b/src/H5Bprivate.h index 1fb25ef7dc2..265b6c67f5b 100644 --- a/src/H5Bprivate.h +++ b/src/H5Bprivate.h @@ -22,8 +22,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5Bprivate_H -#define _H5Bprivate_H +#ifndef H5Bprivate_H +#define H5Bprivate_H /* Private headers needed by this file */ #include "H5private.h" /* Generic Functions */ @@ -157,4 +157,4 @@ H5_DLL herr_t H5B_shared_free(void *_shared); H5_DLL herr_t H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, const H5B_class_t *type, void *udata); H5_DLL htri_t H5B_valid(H5F_t *f, const H5B_class_t *type, haddr_t addr); -#endif /* _H5Bprivate_H */ +#endif /* H5Bprivate_H */ diff --git a/src/H5CSprivate.h b/src/H5CSprivate.h index 5fe2a569abb..a238ec7ad1f 100644 --- a/src/H5CSprivate.h +++ b/src/H5CSprivate.h @@ -14,8 +14,8 @@ /* * Header file for function stacks, etc. */ -#ifndef _H5CSprivate_H -#define _H5CSprivate_H +#ifndef H5CSprivate_H +#define H5CSprivate_H #ifdef NOT_YET #include "H5CSpublic.h" @@ -32,4 +32,4 @@ H5_DLL herr_t H5CS_print_stack(const struct H5CS_t *stack, FILE *stream) H5_DLL struct H5CS_t *H5CS_copy_stack(void); H5_DLL herr_t H5CS_close_stack(struct H5CS_t *stack); -#endif /* _H5CSprivate_H */ +#endif /* H5CSprivate_H */ diff --git a/src/H5CXmodule.h b/src/H5CXmodule.h index 7d51b46f8a4..9fbaab42bd5 100644 --- a/src/H5CXmodule.h +++ b/src/H5CXmodule.h @@ -18,8 +18,8 @@ * H5CX package. Including this header means that the source file * is part of the H5CX package. */ -#ifndef _H5CXmodule_H -#define _H5CXmodule_H +#ifndef H5CXmodule_H +#define H5CXmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_CONTEXT #define H5_MY_PKG_INIT YES -#endif /* _H5CXmodule_H */ +#endif /* H5CXmodule_H */ diff --git a/src/H5CXprivate.h b/src/H5CXprivate.h index 53d49a922e0..f9289cb0e6f 100644 --- a/src/H5CXprivate.h +++ b/src/H5CXprivate.h @@ -13,8 +13,8 @@ /* * Header file for API contexts, etc. */ -#ifndef _H5CXprivate_H -#define _H5CXprivate_H +#ifndef H5CXprivate_H +#define H5CXprivate_H /* Include package's public header */ #ifdef NOT_YET @@ -61,10 +61,10 @@ typedef struct H5CX_state_t { /***************************************/ /* Library private routines */ -#ifndef _H5private_H +#ifndef H5private_H H5_DLL herr_t H5CX_push(void); H5_DLL herr_t H5CX_pop(void); -#endif /* _H5private_H */ +#endif /* H5private_H */ H5_DLL void H5CX_push_special(void); H5_DLL hbool_t H5CX_is_def_dxpl(void); @@ -177,4 +177,4 @@ H5_DLL herr_t H5CX_test_set_mpio_coll_rank0_bcast(hbool_t rank0_bcast); #endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ #endif /* H5_HAVE_PARALLEL */ -#endif /* _H5CXprivate_H */ +#endif /* H5CXprivate_H */ diff --git a/src/H5Cimage.c b/src/H5Cimage.c index b49f192c574..b366a943466 100644 --- a/src/H5Cimage.c +++ b/src/H5Cimage.c @@ -1158,7 +1158,8 @@ H5C_load_cache_image_on_next_protect(H5F_t *f, haddr_t addr, hsize_t len, hbool_ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); /* Set information needed to load cache image */ - cache_ptr->image_addr = addr, cache_ptr->image_len = len; + cache_ptr->image_addr = addr; + cache_ptr->image_len = len; cache_ptr->load_image = TRUE; cache_ptr->delete_image = rw; diff --git a/src/H5Clog.h b/src/H5Clog.h index 1703b53f946..bd5c413bbd8 100644 --- a/src/H5Clog.h +++ b/src/H5Clog.h @@ -15,8 +15,8 @@ * Purpose: Cache logging header file */ -#ifndef _H5Clog_H -#define _H5Clog_H +#ifndef H5Clog_H +#define H5Clog_H /* Get package's private header */ #include "H5Cprivate.h" /* Cache */ @@ -136,4 +136,4 @@ H5_DLL herr_t H5C_log_write_remove_entry_msg(H5C_t *cache, const H5C_cache_entry H5_DLL herr_t H5C_log_json_set_up(H5C_log_info_t *log_info, const char log_location[], int mpi_rank); H5_DLL herr_t H5C_log_trace_set_up(H5C_log_info_t *log_info, const char log_location[], int mpi_rank); -#endif /* _H5Clog_H */ +#endif /* H5Clog_H */ diff --git a/src/H5Cmodule.h b/src/H5Cmodule.h index b1951ff6bf0..26216ec1316 100644 --- a/src/H5Cmodule.h +++ b/src/H5Cmodule.h @@ -18,8 +18,8 @@ * H5C package. Including this header means that the source file * is part of the H5C package. */ -#ifndef _H5Cmodule_H -#define _H5Cmodule_H +#ifndef H5Cmodule_H +#define H5Cmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_CACHE #define H5_MY_PKG_INIT NO -#endif /* _H5Cmodule_H */ +#endif /* H5Cmodule_H */ diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h index b3e80918706..99ed4f8dad2 100644 --- a/src/H5Cpkg.h +++ b/src/H5Cpkg.h @@ -33,8 +33,8 @@ #error "Do not include this file outside the H5C package!" #endif -#ifndef _H5Cpkg_H -#define _H5Cpkg_H +#ifndef H5Cpkg_H +#define H5Cpkg_H /* Get package's private header */ #include "H5Cprivate.h" @@ -5090,5 +5090,5 @@ H5_DLL herr_t H5C__untag_entry(H5C_t *cache, H5C_cache_entry_t *entry); H5_DLL herr_t H5C__verify_cork_tag_test(hid_t fid, H5O_token_t tag_token, hbool_t status); #endif /* H5C_TESTING */ -#endif /* _H5Cpkg_H */ +#endif /* H5Cpkg_H */ /* clang-format on */ diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index 24f278f0bcb..fb5c3ea3c62 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -23,8 +23,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5Cprivate_H -#define _H5Cprivate_H +#ifndef H5Cprivate_H +#define H5Cprivate_H #include "H5Cpublic.h" /* public prototypes */ @@ -2321,4 +2321,4 @@ H5_DLL herr_t H5C_verify_entry_type(H5C_t *cache_ptr, haddr_t addr, const H5C_c H5_DLL herr_t H5C_validate_index_list(H5C_t *cache_ptr); #endif /* NDEBUG */ -#endif /* !_H5Cprivate_H */ +#endif /* H5Cprivate_H */ diff --git a/src/H5Cpublic.h b/src/H5Cpublic.h index 976cca2e38d..0e6fb846460 100644 --- a/src/H5Cpublic.h +++ b/src/H5Cpublic.h @@ -21,8 +21,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5Cpublic_H -#define _H5Cpublic_H +#ifndef H5Cpublic_H +#define H5Cpublic_H /* Public headers needed by this file */ #include "H5public.h" diff --git a/src/H5Dmodule.h b/src/H5Dmodule.h index 44044d880cc..1f4d7c11757 100644 --- a/src/H5Dmodule.h +++ b/src/H5Dmodule.h @@ -18,8 +18,8 @@ * H5D package. Including this header means that the source file * is part of the H5D package. */ -#ifndef _H5Dmodule_H -#define _H5Dmodule_H +#ifndef H5Dmodule_H +#define H5Dmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_DATASET #define H5_MY_PKG_INIT YES -#endif /* _H5Dmodule_H */ +#endif /* H5Dmodule_H */ diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index 254011e5b41..61b1a872aa2 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5D package!" #endif -#ifndef _H5Dpkg_H -#define _H5Dpkg_H +#ifndef H5Dpkg_H +#define H5Dpkg_H /* Get package's private header */ #include "H5Dprivate.h" @@ -739,4 +739,4 @@ H5_DLL herr_t H5D__layout_type_test(hid_t did, H5D_layout_t *layout_type); H5_DLL herr_t H5D__current_cache_size_test(hid_t did, size_t *nbytes_used, int *nused); #endif /* H5D_TESTING */ -#endif /*_H5Dpkg_H*/ +#endif /*H5Dpkg_H*/ diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h index d55ba03a81e..f9ef7727b98 100644 --- a/src/H5Dprivate.h +++ b/src/H5Dprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5D module */ -#ifndef _H5Dprivate_H -#define _H5Dprivate_H +#ifndef H5Dprivate_H +#define H5Dprivate_H /* Include package's public header */ #include "H5Dpublic.h" @@ -186,4 +186,4 @@ H5_DLL herr_t H5D_virtual_free_parsed_name(H5O_storage_virtual_name_seg_t *name_ H5_DLL herr_t H5D_btree_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, unsigned ndims, const uint32_t *dim); -#endif /* _H5Dprivate_H */ +#endif /* H5Dprivate_H */ diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h index a0a70abac5b..c1ca698b15b 100644 --- a/src/H5Dpublic.h +++ b/src/H5Dpublic.h @@ -14,8 +14,8 @@ /* * This file contains public declarations for the H5D module. */ -#ifndef _H5Dpublic_H -#define _H5Dpublic_H +#ifndef H5Dpublic_H +#define H5Dpublic_H /* System headers needed by this file */ @@ -204,4 +204,4 @@ H5_DLL herr_t H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t plist_id, voi #ifdef __cplusplus } #endif -#endif /* _H5Dpublic_H */ +#endif /* H5Dpublic_H */ diff --git a/src/H5EAmodule.h b/src/H5EAmodule.h index 90670286bf2..1833e406013 100644 --- a/src/H5EAmodule.h +++ b/src/H5EAmodule.h @@ -18,8 +18,8 @@ * H5EA package. Including this header means that the source file * is part of the H5EA package. */ -#ifndef _H5EAmodule_H -#define _H5EAmodule_H +#ifndef H5EAmodule_H +#define H5EAmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_EARRAY #define H5_MY_PKG_INIT NO -#endif /* _H5EAmodule_H */ +#endif /* H5EAmodule_H */ diff --git a/src/H5EApkg.h b/src/H5EApkg.h index 4a3966a7ab5..bfa85885dc5 100644 --- a/src/H5EApkg.h +++ b/src/H5EApkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5EA package!" #endif -#ifndef _H5EApkg_H -#define _H5EApkg_H +#ifndef H5EApkg_H +#define H5EApkg_H /* Get package's private header */ #include "H5EAprivate.h" @@ -461,4 +461,4 @@ H5_DLL herr_t H5EA__get_cparam_test(const H5EA_t *ea, H5EA_create_t *cparam); H5_DLL int H5EA__cmp_cparam_test(const H5EA_create_t *cparam1, const H5EA_create_t *cparam2); #endif /* H5EA_TESTING */ -#endif /* _H5EApkg_H */ +#endif /* H5EApkg_H */ diff --git a/src/H5EAprivate.h b/src/H5EAprivate.h index 3b1d7b8ea31..19dabd9ecfd 100644 --- a/src/H5EAprivate.h +++ b/src/H5EAprivate.h @@ -23,8 +23,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5EAprivate_H -#define _H5EAprivate_H +#ifndef H5EAprivate_H +#define H5EAprivate_H /* Include package's public header */ #ifdef NOT_YET @@ -155,4 +155,4 @@ H5_DLL herr_t H5EA_get_stats(const H5EA_t *ea, H5EA_stat_t *stats); #ifdef H5EA_DEBUGGING #endif /* H5EA_DEBUGGING */ -#endif /* _H5EAprivate_H */ +#endif /* H5EAprivate_H */ diff --git a/src/H5ESpublic.h b/src/H5ESpublic.h index ce7306acc14..28b41fa6d5f 100644 --- a/src/H5ESpublic.h +++ b/src/H5ESpublic.h @@ -14,8 +14,8 @@ * This file contains public declarations for the H5ES (event set) module. */ -#ifndef _H5ESpublic_H -#define _H5ESpublic_H +#ifndef H5ESpublic_H +#define H5ESpublic_H /* Public headers needed by this file */ #include "H5public.h" /* Generic Functions */ @@ -52,4 +52,4 @@ extern "C" { } #endif -#endif /* _H5ESpublic_H */ +#endif /* H5ESpublic_H */ diff --git a/src/H5Emodule.h b/src/H5Emodule.h index fe5fdcc5ada..1670c03af68 100644 --- a/src/H5Emodule.h +++ b/src/H5Emodule.h @@ -18,8 +18,8 @@ * H5E package. Including this header means that the source file * is part of the H5E package. */ -#ifndef _H5Emodule_H -#define _H5Emodule_H +#ifndef H5Emodule_H +#define H5Emodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_ERROR #define H5_MY_PKG_INIT YES -#endif /* _H5Emodule_H */ +#endif /* H5Emodule_H */ diff --git a/src/H5Epkg.h b/src/H5Epkg.h index 19cdda0bd3e..30ff084eaeb 100644 --- a/src/H5Epkg.h +++ b/src/H5Epkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5E package!" #endif -#ifndef _H5Epkg_H -#define _H5Epkg_H +#ifndef H5Epkg_H +#define H5Epkg_H /* Get package's private header */ #include "H5Eprivate.h" @@ -140,4 +140,4 @@ H5_DLL herr_t H5E__get_auto(const H5E_t *estack, H5E_auto_op_t *op, void **clie H5_DLL herr_t H5E__set_auto(H5E_t *estack, const H5E_auto_op_t *op, void *client_data); H5_DLL herr_t H5E__pop(H5E_t *err_stack, size_t count); -#endif /* _H5Epkg_H */ +#endif /* H5Epkg_H */ diff --git a/src/H5Eprivate.h b/src/H5Eprivate.h index 3e7e498dadf..58010a34fb4 100644 --- a/src/H5Eprivate.h +++ b/src/H5Eprivate.h @@ -14,8 +14,8 @@ /* * Header file for error values, etc. */ -#ifndef _H5Eprivate_H -#define _H5Eprivate_H +#ifndef H5Eprivate_H +#define H5Eprivate_H #include "H5Epublic.h" @@ -209,4 +209,4 @@ H5_DLL herr_t H5E_printf_stack(H5E_t *estack, const char *file, const char *func H5_DLL herr_t H5E_clear_stack(H5E_t *estack); H5_DLL herr_t H5E_dump_api_stack(hbool_t is_api); -#endif /* _H5Eprivate_H */ +#endif /* H5Eprivate_H */ diff --git a/src/H5Epublic.h b/src/H5Epublic.h index 403bee7d1fa..cb7d7006ddb 100644 --- a/src/H5Epublic.h +++ b/src/H5Epublic.h @@ -14,8 +14,8 @@ /* * This file contains public declarations for the H5E module. */ -#ifndef _H5Epublic_H -#define _H5Epublic_H +#ifndef H5Epublic_H +#define H5Epublic_H #include /*FILE arg of H5Eprint() */ @@ -218,4 +218,4 @@ H5_DLL char * H5Eget_minor(H5E_minor_t min); } #endif -#endif /* end _H5Epublic_H */ +#endif /* end H5Epublic_H */ diff --git a/src/H5FAmodule.h b/src/H5FAmodule.h index fce8265258f..ef814aeb19c 100644 --- a/src/H5FAmodule.h +++ b/src/H5FAmodule.h @@ -18,8 +18,8 @@ * H5FA package. Including this header means that the source file * is part of the H5FA package. */ -#ifndef _H5FAmodule_H -#define _H5FAmodule_H +#ifndef H5FAmodule_H +#define H5FAmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_FARRAY #define H5_MY_PKG_INIT NO -#endif /* _H5FAmodule_H */ +#endif /* H5FAmodule_H */ diff --git a/src/H5FApkg.h b/src/H5FApkg.h index e66be59e292..c4bf93485fb 100644 --- a/src/H5FApkg.h +++ b/src/H5FApkg.h @@ -22,8 +22,8 @@ #error "Do not include this file outside the H5FA package!" #endif -#ifndef _H5FApkg_H -#define _H5FApkg_H +#ifndef H5FApkg_H +#define H5FApkg_H /* Get package's private header */ #include "H5FAprivate.h" @@ -299,4 +299,4 @@ H5_DLL herr_t H5FA__get_cparam_test(const H5FA_t *ea, H5FA_create_t *cparam); H5_DLL int H5FA__cmp_cparam_test(const H5FA_create_t *cparam1, const H5FA_create_t *cparam2); #endif /* H5FA_TESTING */ -#endif /* _H5FApkg_H */ +#endif /* H5FApkg_H */ diff --git a/src/H5FAprivate.h b/src/H5FAprivate.h index f94527390b7..26057bf4e15 100644 --- a/src/H5FAprivate.h +++ b/src/H5FAprivate.h @@ -21,8 +21,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5FAprivate_H -#define _H5FAprivate_H +#ifndef H5FAprivate_H +#define H5FAprivate_H /* Include package's public header */ #ifdef NOT_YET @@ -137,4 +137,4 @@ H5_DLL herr_t H5FA_get_stats(const H5FA_t *ea, H5FA_stat_t *stats); #ifdef H5FA_DEBUGGING #endif /* H5FA_DEBUGGING */ -#endif /* _H5FAprivate_H */ +#endif /* H5FAprivate_H */ diff --git a/src/H5FDdrvr_module.h b/src/H5FDdrvr_module.h index cf7d7654104..1d20fce6609 100644 --- a/src/H5FDdrvr_module.h +++ b/src/H5FDdrvr_module.h @@ -18,8 +18,8 @@ * H5FD driver package. Including this header means that the source file * is part of the H5FD driver package. */ -#ifndef _H5FDdrvr_module_H -#define _H5FDdrvr_module_H +#ifndef H5FDdrvr_module_H +#define H5FDdrvr_module_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_INIT YES #define H5_PKG_SINGLE_SOURCE -#endif /* _H5FDdrvr_module_H */ +#endif /* H5FDdrvr_module_H */ diff --git a/src/H5FDmodule.h b/src/H5FDmodule.h index f603f8221c9..0b92b27da01 100644 --- a/src/H5FDmodule.h +++ b/src/H5FDmodule.h @@ -18,8 +18,8 @@ * H5FD package. Including this header means that the source file * is part of the H5FD package. */ -#ifndef _H5FDmodule_H -#define _H5FDmodule_H +#ifndef H5FDmodule_H +#define H5FDmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_VFL #define H5_MY_PKG_INIT YES -#endif /* _H5FDmodule_H */ +#endif /* H5FDmodule_H */ diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index cc9f51dee48..c96b5956605 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -1195,7 +1195,7 @@ static herr_t H5FD_multi_query(const H5FD_t *_f, unsigned long *flags /* out */) { /* Shut compiler up */ - _f = _f; + (void)_f; /* Set the VFL feature flags that this driver supports */ if (flags) { diff --git a/src/H5FDpkg.h b/src/H5FDpkg.h index d9f2946bf0c..acbaf88777b 100644 --- a/src/H5FDpkg.h +++ b/src/H5FDpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5FD package!" #endif -#ifndef _H5FDpkg_H -#define _H5FDpkg_H +#ifndef H5FDpkg_H +#define H5FDpkg_H /* Get package's private header */ #include "H5FDprivate.h" /* File drivers */ @@ -55,4 +55,4 @@ H5_DLL herr_t H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsiz H5_DLL hbool_t H5FD__supports_swmr_test(const char *vfd_name); #endif /* H5FD_TESTING */ -#endif /* _H5FDpkg_H */ +#endif /* H5FDpkg_H */ diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h index 81875213b9f..10d8069fa10 100644 --- a/src/H5FDprivate.h +++ b/src/H5FDprivate.h @@ -15,8 +15,8 @@ * Programmer: Robb Matzke * Monday, July 26, 1999 */ -#ifndef _H5FDprivate_H -#define _H5FDprivate_H +#ifndef H5FDprivate_H +#define H5FDprivate_H /* Include package's public header */ #include "H5FDpublic.h" @@ -159,4 +159,4 @@ H5_DLL int H5FD_mpi_get_size(const H5FD_t *file); H5_DLL MPI_Comm H5FD_mpi_get_comm(const H5FD_t *_file); #endif /* H5_HAVE_PARALLEL */ -#endif /* !_H5FDprivate_H */ +#endif /* H5FDprivate_H */ diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h index caefd8084dc..edcea527dee 100644 --- a/src/H5FDpublic.h +++ b/src/H5FDpublic.h @@ -15,8 +15,8 @@ * Programmer: Robb Matzke * Monday, July 26, 1999 */ -#ifndef _H5FDpublic_H -#define _H5FDpublic_H +#ifndef H5FDpublic_H +#define H5FDpublic_H #include "H5public.h" #include "H5Fpublic.h" /*for H5F_close_degree_t */ diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index b9d018ab993..efc18022cb3 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -346,7 +346,7 @@ H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr assert(sizeof(file_offset_t) >= sizeof(size_t)); /* Quiet compiler */ - fapl_id = fapl_id; + (void)fapl_id; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); @@ -587,7 +587,7 @@ static herr_t H5FD_stdio_query(const H5FD_t *_f, unsigned long /*OUT*/ *flags) { /* Quiet the compiler */ - _f = _f; + (void)_f; /* Set the VFL feature flags that this driver supports. * @@ -632,8 +632,8 @@ H5FD_stdio_alloc(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxp haddr_t addr; /* Quiet compiler */ - type = type; - dxpl_id = dxpl_id; + (void)type; + (void)dxpl_id; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); @@ -671,7 +671,7 @@ H5FD_stdio_get_eoa(const H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type) H5Eclear2(H5E_DEFAULT); /* Quiet compiler */ - type = type; + (void)type; return file->eoa; } /* end H5FD_stdio_get_eoa() */ @@ -701,7 +701,7 @@ H5FD_stdio_set_eoa(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, haddr_t addr) H5Eclear2(H5E_DEFAULT); /* Quiet the compiler */ - type = type; + (void)type; file->eoa = addr; @@ -732,13 +732,13 @@ H5FD_stdio_get_eof(const H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type) const H5FD_stdio_t *file = (const H5FD_stdio_t *)_file; /* Quiet the compiler */ - type = type; + (void)type; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); /* Quiet the compiler */ - type = type; + (void)type; return (file->eof); } /* end H5FD_stdio_get_eof() */ @@ -762,7 +762,7 @@ H5FD_stdio_get_handle(H5FD_t *_file, hid_t /*UNUSED*/ fapl, void **file_handle) static const char *func = "H5FD_stdio_get_handle"; /* Function Name for error reporting */ /* Quiet the compiler */ - fapl = fapl; + (void)fapl; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); @@ -800,8 +800,8 @@ H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxpl static const char *func = "H5FD_stdio_read"; /* Function Name for error reporting */ /* Quiet the compiler */ - type = type; - dxpl_id = dxpl_id; + (void)type; + (void)dxpl_id; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); @@ -902,8 +902,8 @@ H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxp static const char *func = "H5FD_stdio_write"; /* Function Name for error reporting */ /* Quiet the compiler */ - dxpl_id = dxpl_id; - type = type; + (void)dxpl_id; + (void)type; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); @@ -990,7 +990,7 @@ H5FD_stdio_flush(H5FD_t *_file, hid_t /*UNUSED*/ dxpl_id, hbool_t closing) static const char *func = "H5FD_stdio_flush"; /* Function Name for error reporting */ /* Quiet the compiler */ - dxpl_id = dxpl_id; + (void)dxpl_id; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); @@ -1034,8 +1034,8 @@ H5FD_stdio_truncate(H5FD_t *_file, hid_t /*UNUSED*/ dxpl_id, hbool_t /*UNUSED*/ static const char *func = "H5FD_stdio_truncate"; /* Function Name for error reporting */ /* Quiet the compiler */ - dxpl_id = dxpl_id; - closing = closing; + (void)dxpl_id; + (void)closing; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); diff --git a/src/H5FLmodule.h b/src/H5FLmodule.h index dc7f4cc1623..95c0b49aade 100644 --- a/src/H5FLmodule.h +++ b/src/H5FLmodule.h @@ -18,8 +18,8 @@ * H5FL package. Including this header means that the source file * is part of the H5FL package. */ -#ifndef _H5FLmodule_H -#define _H5FLmodule_H +#ifndef H5FLmodule_H +#define H5FLmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_RESOURCE #define H5_MY_PKG_INIT NO -#endif /* _H5FLmodule_H */ +#endif /* H5FLmodule_H */ diff --git a/src/H5FLprivate.h b/src/H5FLprivate.h index 55613dd7a42..42581acb7cc 100644 --- a/src/H5FLprivate.h +++ b/src/H5FLprivate.h @@ -21,8 +21,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5FLprivate_H -#define _H5FLprivate_H +#ifndef H5FLprivate_H +#define H5FLprivate_H /* Public headers needed by this file */ #ifdef LATER diff --git a/src/H5FOprivate.h b/src/H5FOprivate.h index b4b18aaf73d..7b512668169 100644 --- a/src/H5FOprivate.h +++ b/src/H5FOprivate.h @@ -14,8 +14,8 @@ /* * This file contains library private information about the H5FO module */ -#ifndef _H5FOprivate_H -#define _H5FOprivate_H +#ifndef H5FOprivate_H +#define H5FOprivate_H #ifdef LATER #include "H5FOpublic.h" @@ -47,4 +47,4 @@ H5_DLL herr_t H5FO_top_decr(const H5F_t *f, haddr_t addr); H5_DLL hsize_t H5FO_top_count(const H5F_t *f, haddr_t addr); H5_DLL herr_t H5FO_top_dest(H5F_t *f); -#endif /* _H5FOprivate_H */ +#endif /* H5FOprivate_H */ diff --git a/src/H5FSmodule.h b/src/H5FSmodule.h index 360eb7d31b1..a40c1034d16 100644 --- a/src/H5FSmodule.h +++ b/src/H5FSmodule.h @@ -18,8 +18,8 @@ * H5FS package. Including this header means that the source file * is part of the H5FS package. */ -#ifndef _H5FSmodule_H -#define _H5FSmodule_H +#ifndef H5FSmodule_H +#define H5FSmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_FSPACE #define H5_MY_PKG_INIT NO -#endif /* _H5FSmodule_H */ +#endif /* H5FSmodule_H */ diff --git a/src/H5FSpkg.h b/src/H5FSpkg.h index 46ebdaf2d4b..ba2cf03cdb1 100644 --- a/src/H5FSpkg.h +++ b/src/H5FSpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5FS package!" #endif -#ifndef _H5FSpkg_H -#define _H5FSpkg_H +#ifndef H5FSpkg_H +#define H5FSpkg_H /* Uncomment this macro to enable debugging output for free space manager */ /* #define H5FS_DEBUG */ @@ -240,4 +240,4 @@ H5_DLL herr_t H5FS__get_cparam_test(const H5FS_t *fh, H5FS_create_t *cparam); H5_DLL int H5FS__cmp_cparam_test(const H5FS_create_t *cparam1, const H5FS_create_t *cparam2); #endif /* H5FS_TESTING */ -#endif /* _H5FSpkg_H */ +#endif /* H5FSpkg_H */ diff --git a/src/H5FSprivate.h b/src/H5FSprivate.h index 05a466acd7d..fdc5c912bc9 100644 --- a/src/H5FSprivate.h +++ b/src/H5FSprivate.h @@ -22,8 +22,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5FSprivate_H -#define _H5FSprivate_H +#ifndef H5FSprivate_H +#define H5FSprivate_H /* Private headers needed by this file */ #include "H5Fprivate.h" /* File access */ @@ -230,4 +230,4 @@ H5_DLL herr_t H5FS_sects_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, H5_DLL herr_t H5FS_sect_debug(const H5FS_t *fspace, const H5FS_section_info_t *sect, FILE *stream, int indent, int fwidth); -#endif /* _H5FSprivate_H */ +#endif /* H5FSprivate_H */ diff --git a/src/H5Fmodule.h b/src/H5Fmodule.h index a28bdb37a33..33c302a635a 100644 --- a/src/H5Fmodule.h +++ b/src/H5Fmodule.h @@ -18,8 +18,8 @@ * H5F package. Including this header means that the source file * is part of the H5F package. */ -#ifndef _H5Fmodule_H -#define _H5Fmodule_H +#ifndef H5Fmodule_H +#define H5Fmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -42,4 +42,4 @@ * \ingroup H5F */ -#endif /* _H5Fmodule_H */ +#endif /* H5Fmodule_H */ diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h index b047e635ad1..371260dbb4a 100644 --- a/src/H5Fpkg.h +++ b/src/H5Fpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5F package!" #endif -#ifndef _H5Fpkg_H -#define _H5Fpkg_H +#ifndef H5Fpkg_H +#define H5Fpkg_H /* Get package's private header */ #include "H5Fprivate.h" @@ -481,4 +481,4 @@ H5_DLL htri_t H5F__same_file_test(hid_t file_id1, hid_t file_id2); H5_DLL herr_t H5F__reparse_file_lock_variable_test(void); #endif /* H5F_TESTING */ -#endif /* _H5Fpkg_H */ +#endif /* H5Fpkg_H */ diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index f80e0828e3a..0c75cf04ab7 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -15,8 +15,8 @@ * This file contains macros & information for file access */ -#ifndef _H5Fprivate_H -#define _H5Fprivate_H +#ifndef H5Fprivate_H +#define H5Fprivate_H /* Early typedefs to avoid circular dependencies */ typedef struct H5F_t H5F_t; @@ -982,4 +982,4 @@ H5_DLL herr_t H5F_cwfs_remove_heap(H5F_shared_t *shared, struct H5HG_heap_t *hea /* Debugging functions */ H5_DLL herr_t H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth); -#endif /* _H5Fprivate_H */ +#endif /* H5Fprivate_H */ diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h index af9b80102cd..c410beb7d3b 100644 --- a/src/H5Fpublic.h +++ b/src/H5Fpublic.h @@ -14,8 +14,8 @@ /* * This file contains public declarations for the H5F module. */ -#ifndef _H5Fpublic_H -#define _H5Fpublic_H +#ifndef H5Fpublic_H +#define H5Fpublic_H /* Public header files needed by this file */ #include "H5public.h" @@ -24,19 +24,19 @@ /* When this header is included from a private header, don't make calls to H5check() */ #undef H5CHECK -#ifndef _H5private_H +#ifndef H5private_H #define H5CHECK H5check(), -#else /* _H5private_H */ +#else /* H5private_H */ #define H5CHECK -#endif /* _H5private_H */ +#endif /* H5private_H */ /* When this header is included from a private HDF5 header, don't make calls to H5open() */ #undef H5OPEN -#ifndef _H5private_H +#ifndef H5private_H #define H5OPEN H5open(), -#else /* _H5private_H */ +#else /* H5private_H */ #define H5OPEN -#endif /* _H5private_H */ +#endif /* H5private_H */ /* * These are the bits that can be passed to the `flags' argument of @@ -2264,4 +2264,4 @@ H5_DLL htri_t H5Fis_hdf5(const char *file_name); #ifdef __cplusplus } #endif -#endif /* _H5Fpublic_H */ +#endif /* H5Fpublic_H */ diff --git a/src/H5Gmodule.h b/src/H5Gmodule.h index a344379f96d..5a8791732ae 100644 --- a/src/H5Gmodule.h +++ b/src/H5Gmodule.h @@ -18,8 +18,8 @@ * H5G package. Including this header means that the source file * is part of the H5G package. */ -#ifndef _H5Gmodule_H -#define _H5Gmodule_H +#ifndef H5Gmodule_H +#define H5Gmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_SYM #define H5_MY_PKG_INIT YES -#endif /* _H5Gmodule_H */ +#endif /* H5Gmodule_H */ diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h index 9a4ca6ee27e..25a68de3456 100644 --- a/src/H5Gpkg.h +++ b/src/H5Gpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5G package!" #endif -#ifndef _H5Gpkg_H -#define _H5Gpkg_H +#ifndef H5Gpkg_H +#define H5Gpkg_H /* Get package's private header */ #include "H5Gprivate.h" @@ -481,4 +481,4 @@ H5_DLL herr_t H5G__verify_cached_stab_test(H5O_loc_t *grp_oloc, H5G_entry_t *ent H5_DLL herr_t H5G__verify_cached_stabs_test(hid_t gid); #endif /* H5G_TESTING */ -#endif /* _H5Gpkg_H */ +#endif /* H5Gpkg_H */ diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h index 23fb6d7587d..b9f83c48ed8 100644 --- a/src/H5Gprivate.h +++ b/src/H5Gprivate.h @@ -22,8 +22,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5Gprivate_H -#define _H5Gprivate_H +#ifndef H5Gprivate_H +#define H5Gprivate_H /* Include package's public header */ #include "H5Gpublic.h" @@ -291,4 +291,4 @@ H5_DLL herr_t H5G_root_loc(H5F_t *f, H5G_loc_t *loc); H5_DLL herr_t H5G_root_free(H5G_t *grp); H5_DLL H5G_t *H5G_rootof(H5F_t *f); -#endif /* _H5Gprivate_H */ +#endif /* H5Gprivate_H */ diff --git a/src/H5Gpublic.h b/src/H5Gpublic.h index f94a791c794..99134f830a2 100644 --- a/src/H5Gpublic.h +++ b/src/H5Gpublic.h @@ -21,8 +21,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5Gpublic_H -#define _H5Gpublic_H +#ifndef H5Gpublic_H +#define H5Gpublic_H /* System headers needed by this file */ #include @@ -161,4 +161,4 @@ H5_DLL H5G_obj_t H5Gget_objtype_by_idx(hid_t loc_id, hsize_t idx); #ifdef __cplusplus } #endif -#endif /* _H5Gpublic_H */ +#endif /* H5Gpublic_H */ diff --git a/src/H5HFhuge.c b/src/H5HFhuge.c index 4f3e4a9a5aa..b1043a6c1a3 100644 --- a/src/H5HFhuge.c +++ b/src/H5HFhuge.c @@ -113,32 +113,32 @@ H5HF__huge_bt2_create(H5HF_hdr_t *hdr) if (hdr->huge_ids_direct) { if (hdr->filter_len > 0) { bt2_cparam.rrec_size = - (size_t)((unsigned)hdr->sizeof_addr /* Address of object */ - + (unsigned)hdr->sizeof_size /* Length of object */ - + (unsigned)4 /* Filter mask for filtered object */ - + (unsigned)hdr->sizeof_size); /* Size of de-filtered object in memory */ + (uint32_t)((unsigned)hdr->sizeof_addr /* Address of object */ + + (unsigned)hdr->sizeof_size /* Length of object */ + + (unsigned)4 /* Filter mask for filtered object */ + + (unsigned)hdr->sizeof_size); /* Size of de-filtered object in memory */ bt2_cparam.cls = H5HF_HUGE_BT2_FILT_DIR; } /* end if */ else { - bt2_cparam.rrec_size = (size_t)((unsigned)hdr->sizeof_addr /* Address of object */ - + (unsigned)hdr->sizeof_size); /* Length of object */ + bt2_cparam.rrec_size = (uint32_t)((unsigned)hdr->sizeof_addr /* Address of object */ + + (unsigned)hdr->sizeof_size); /* Length of object */ bt2_cparam.cls = H5HF_HUGE_BT2_DIR; } /* end else */ } /* end if */ else { if (hdr->filter_len > 0) { bt2_cparam.rrec_size = - (size_t)((unsigned)hdr->sizeof_addr /* Address of filtered object */ - + (unsigned)hdr->sizeof_size /* Length of filtered object */ - + (unsigned)4 /* Filter mask for filtered object */ - + (unsigned)hdr->sizeof_size /* Size of de-filtered object in memory */ - + (unsigned)hdr->sizeof_size); /* Unique ID for object */ + (uint32_t)((unsigned)hdr->sizeof_addr /* Address of filtered object */ + + (unsigned)hdr->sizeof_size /* Length of filtered object */ + + (unsigned)4 /* Filter mask for filtered object */ + + (unsigned)hdr->sizeof_size /* Size of de-filtered object in memory */ + + (unsigned)hdr->sizeof_size); /* Unique ID for object */ bt2_cparam.cls = H5HF_HUGE_BT2_FILT_INDIR; } /* end if */ else { - bt2_cparam.rrec_size = (size_t)((unsigned)hdr->sizeof_addr /* Address of object */ - + (unsigned)hdr->sizeof_size /* Length of object */ - + (unsigned)hdr->sizeof_size); /* Unique ID for object */ + bt2_cparam.rrec_size = (uint32_t)((unsigned)hdr->sizeof_addr /* Address of object */ + + (unsigned)hdr->sizeof_size /* Length of object */ + + (unsigned)hdr->sizeof_size); /* Unique ID for object */ bt2_cparam.cls = H5HF_HUGE_BT2_INDIR; } /* end else */ } /* end else */ diff --git a/src/H5HFmodule.h b/src/H5HFmodule.h index 2b2c1c2a5cb..7fab61185f3 100644 --- a/src/H5HFmodule.h +++ b/src/H5HFmodule.h @@ -18,8 +18,8 @@ * H5HF package. Including this header means that the source file * is part of the H5HF package. */ -#ifndef _H5HFmodule_H -#define _H5HFmodule_H +#ifndef H5HFmodule_H +#define H5HFmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_HEAP #define H5_MY_PKG_INIT NO -#endif /* _H5HFmodule_H */ +#endif /* H5HFmodule_H */ diff --git a/src/H5HFpkg.h b/src/H5HFpkg.h index eb3d9321e8f..893a65d4f15 100644 --- a/src/H5HFpkg.h +++ b/src/H5HFpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5HF package!" #endif -#ifndef _H5HFpkg_H -#define _H5HFpkg_H +#ifndef H5HFpkg_H +#define H5HFpkg_H /* Get package's private header */ #include "H5HFprivate.h" @@ -778,4 +778,4 @@ H5_DLL herr_t H5HF_get_tiny_info_test(const H5HF_t *fh, size_t *max_len, hbool H5_DLL herr_t H5HF_get_huge_info_test(const H5HF_t *fh, hsize_t *next_id, hbool_t *ids_direct); #endif /* H5HF_TESTING */ -#endif /* _H5HFpkg_H */ +#endif /* H5HFpkg_H */ diff --git a/src/H5HFprivate.h b/src/H5HFprivate.h index 78f0f45ac40..3263b4efa70 100644 --- a/src/H5HFprivate.h +++ b/src/H5HFprivate.h @@ -22,8 +22,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5HFprivate_H -#define _H5HFprivate_H +#ifndef H5HFprivate_H +#define H5HFprivate_H /* Private headers needed by this file */ #include "H5Fprivate.h" /* File access */ @@ -138,4 +138,4 @@ H5_DLL void H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_intern H5_DLL herr_t H5HF_iblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, haddr_t hdr_addr, unsigned nrows); -#endif /* _H5HFprivate_H */ +#endif /* H5HFprivate_H */ diff --git a/src/H5HGmodule.h b/src/H5HGmodule.h index 5184236ffb6..a75dea5a411 100644 --- a/src/H5HGmodule.h +++ b/src/H5HGmodule.h @@ -18,8 +18,8 @@ * H5HG package. Including this header means that the source file * is part of the H5HG package. */ -#ifndef _H5HGmodule_H -#define _H5HGmodule_H +#ifndef H5HGmodule_H +#define H5HGmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_HEAP #define H5_MY_PKG_INIT NO -#endif /* _H5HGmodule_H */ +#endif /* H5HGmodule_H */ diff --git a/src/H5HGpkg.h b/src/H5HGpkg.h index 0ceb0d93a5b..5c0fbe8686b 100644 --- a/src/H5HGpkg.h +++ b/src/H5HGpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5HG package!" #endif -#ifndef _H5HGpkg_H -#define _H5HGpkg_H +#ifndef H5HGpkg_H +#define H5HGpkg_H /* Get package's private header */ #include "H5HGprivate.h" @@ -136,4 +136,4 @@ struct H5HG_heap_t { H5_DLL herr_t H5HG__free(H5HG_heap_t *heap); H5_DLL H5HG_heap_t *H5HG__protect(H5F_t *f, haddr_t addr, unsigned flags); -#endif /* _H5HGpkg_H */ +#endif /* H5HGpkg_H */ diff --git a/src/H5HGprivate.h b/src/H5HGprivate.h index fb63a094bea..d8e6b4665eb 100644 --- a/src/H5HGprivate.h +++ b/src/H5HGprivate.h @@ -15,8 +15,8 @@ * Programmer: Robb Matzke * Friday, March 27, 1998 */ -#ifndef _H5HGprivate_H -#define _H5HGprivate_H +#ifndef H5HGprivate_H +#define H5HGprivate_H /* Private headers needed by this file. */ #include "H5Fprivate.h" /* File access */ @@ -70,4 +70,4 @@ H5_DLL size_t H5HG_get_free_size(const H5HG_heap_t *h); /* Debugging functions */ H5_DLL herr_t H5HG_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth); -#endif /* _H5HGprivate_H */ +#endif /* H5HGprivate_H */ diff --git a/src/H5HLmodule.h b/src/H5HLmodule.h index afc609a063c..3004809e3bb 100644 --- a/src/H5HLmodule.h +++ b/src/H5HLmodule.h @@ -18,8 +18,8 @@ * H5HL package. Including this header means that the source file * is part of the H5HL package. */ -#ifndef _H5HLmodule_H -#define _H5HLmodule_H +#ifndef H5HLmodule_H +#define H5HLmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_HEAP #define H5_MY_PKG_INIT NO -#endif /* _H5HLmodule_H */ +#endif /* H5HLmodule_H */ diff --git a/src/H5HLpkg.h b/src/H5HLpkg.h index 42e8649144e..dbac1b9f3fd 100644 --- a/src/H5HLpkg.h +++ b/src/H5HLpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5HL package!" #endif -#ifndef _H5HLpkg_H -#define _H5HLpkg_H +#ifndef H5HLpkg_H +#define H5HLpkg_H /* Get package's private header */ #include "H5HLprivate.h" @@ -145,4 +145,4 @@ H5_DLL H5HL_dblk_t *H5HL__dblk_new(H5HL_t *heap); H5_DLL herr_t H5HL__dblk_dest(H5HL_dblk_t *dblk); H5_DLL herr_t H5HL__dblk_realloc(H5F_t *f, H5HL_t *heap, size_t new_heap_size); -#endif /* _H5HLpkg_H */ +#endif /* H5HLpkg_H */ diff --git a/src/H5HLprivate.h b/src/H5HLprivate.h index 74f3c49e309..739e7619272 100644 --- a/src/H5HLprivate.h +++ b/src/H5HLprivate.h @@ -21,8 +21,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5HLprivate_H -#define _H5HLprivate_H +#ifndef H5HLprivate_H +#define H5HLprivate_H /* Private headers needed by this file. */ #include "H5private.h" /* Generic Functions */ diff --git a/src/H5HPprivate.h b/src/H5HPprivate.h index 3b68400cbdf..50020bc0d6d 100644 --- a/src/H5HPprivate.h +++ b/src/H5HPprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5HP module */ -#ifndef _H5HPprivate_H -#define _H5HPprivate_H +#ifndef H5HPprivate_H +#define H5HPprivate_H /**************************************/ /* Public headers needed by this file */ @@ -65,4 +65,4 @@ H5_DLL herr_t H5HP_incr(H5HP_t *heap, unsigned amt, void *obj); H5_DLL herr_t H5HP_decr(H5HP_t *heap, unsigned amt, void *obj); H5_DLL herr_t H5HP_close(H5HP_t *heap); -#endif /* _H5HPprivate_H */ +#endif /* H5HPprivate_H */ diff --git a/src/H5Imodule.h b/src/H5Imodule.h index dc534ef6847..a2174d735d0 100644 --- a/src/H5Imodule.h +++ b/src/H5Imodule.h @@ -18,8 +18,8 @@ * H5I package. Including this header means that the source file * is part of the H5I package. */ -#ifndef _H5Imodule_H -#define _H5Imodule_H +#ifndef H5Imodule_H +#define H5Imodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -34,4 +34,4 @@ * \todo Describe concisely what the functions in this module are about. */ -#endif /* _H5Imodule_H */ +#endif /* H5Imodule_H */ diff --git a/src/H5Ipkg.h b/src/H5Ipkg.h index 355b0d93684..a50c7ad3b63 100644 --- a/src/H5Ipkg.h +++ b/src/H5Ipkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5I package!" #endif -#ifndef _H5Ipkg_H -#define _H5Ipkg_H +#ifndef H5Ipkg_H +#define H5Ipkg_H /* Get package's private header */ #include "H5Iprivate.h" @@ -109,4 +109,4 @@ H5_DLL H5I_id_info_t *H5I__find_id(hid_t id); H5_DLL ssize_t H5I__get_name_test(hid_t id, char *name /*out*/, size_t size, hbool_t *cached); #endif /* H5I_TESTING */ -#endif /*_H5Ipkg_H*/ +#endif /*H5Ipkg_H*/ diff --git a/src/H5Iprivate.h b/src/H5Iprivate.h index 97239e629d4..dd7485d95e4 100644 --- a/src/H5Iprivate.h +++ b/src/H5Iprivate.h @@ -17,8 +17,8 @@ *---------------------------------------------------------------------------*/ /* avoid re-inclusion */ -#ifndef _H5Iprivate_H -#define _H5Iprivate_H +#ifndef H5Iprivate_H +#define H5Iprivate_H /* Include package's public header */ #include "H5Ipublic.h" @@ -99,4 +99,4 @@ H5_DLL herr_t H5I_register_using_existing_id(H5I_type_t type, void *object, hboo /* Debugging functions */ H5_DLL herr_t H5I_dump_ids_for_type(H5I_type_t type); -#endif /* _H5Iprivate_H */ +#endif /* H5Iprivate_H */ diff --git a/src/H5Ipublic.h b/src/H5Ipublic.h index a13b4a30d3e..e687e7a2869 100644 --- a/src/H5Ipublic.h +++ b/src/H5Ipublic.h @@ -15,8 +15,8 @@ * This file contains function prototypes for each exported function in * the H5I module. */ -#ifndef _H5Ipublic_H -#define _H5Ipublic_H +#ifndef H5Ipublic_H +#define H5Ipublic_H /* Public headers needed by this file */ #include "H5public.h" @@ -662,4 +662,4 @@ H5_DLL htri_t H5Iis_valid(hid_t id); #ifdef __cplusplus } #endif -#endif /* _H5Ipublic_H */ +#endif /* H5Ipublic_H */ diff --git a/src/H5Lmodule.h b/src/H5Lmodule.h index d11b2c3ee17..54b94a4c43a 100644 --- a/src/H5Lmodule.h +++ b/src/H5Lmodule.h @@ -18,8 +18,8 @@ * H5L package. Including this header means that the source file * is part of the H5L package. */ -#ifndef _H5Lmodule_H -#define _H5Lmodule_H +#ifndef H5Lmodule_H +#define H5Lmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -37,4 +37,4 @@ * \ingroup H5L */ -#endif /* _H5Lmodule_H */ +#endif /* H5Lmodule_H */ diff --git a/src/H5Lpkg.h b/src/H5Lpkg.h index fd3d1fa4cd0..e37eb107d68 100644 --- a/src/H5Lpkg.h +++ b/src/H5Lpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5L package!" #endif -#ifndef _H5Lpkg_H -#define _H5Lpkg_H +#ifndef H5Lpkg_H +#define H5Lpkg_H /* Get package's private header */ #include "H5Lprivate.h" @@ -69,4 +69,4 @@ H5_DLL herr_t H5L__delete_by_idx(const H5G_loc_t *loc, const char *name, H5_ind H5_DLL herr_t H5L__link_copy_file(H5F_t *dst_file, const H5O_link_t *_src_lnk, const H5O_loc_t *src_oloc, H5O_link_t *dst_lnk, H5O_copy_t *cpy_info); -#endif /* _H5Lpkg_H */ +#endif /* H5Lpkg_H */ diff --git a/src/H5Lprivate.h b/src/H5Lprivate.h index 668ea716f61..e339d46a1d3 100644 --- a/src/H5Lprivate.h +++ b/src/H5Lprivate.h @@ -15,8 +15,8 @@ * This file contains private information about the H5L module * for dealing with links in an HDF5 file. */ -#ifndef _H5Lprivate_H -#define _H5Lprivate_H +#ifndef H5Lprivate_H +#define H5Lprivate_H /* Include package's public header */ #include "H5Lpublic.h" @@ -125,4 +125,4 @@ H5_DLL herr_t H5L_register(const H5L_class_t *cls); H5_DLL herr_t H5L_unregister(H5L_type_t id); H5_DLL const H5L_class_t *H5L_find_class(H5L_type_t id); -#endif /* _H5Lprivate_H */ +#endif /* H5Lprivate_H */ diff --git a/src/H5Lpublic.h b/src/H5Lpublic.h index 5d2b4c8ed81..52c653fb4d9 100644 --- a/src/H5Lpublic.h +++ b/src/H5Lpublic.h @@ -21,8 +21,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5Lpublic_H -#define _H5Lpublic_H +#ifndef H5Lpublic_H +#define H5Lpublic_H /* Public headers needed by this file */ #include "H5public.h" /* Generic Functions */ @@ -2114,4 +2114,4 @@ H5_DLL herr_t H5Lvisit_by_name1(hid_t loc_id, const char *group_name, H5_index_t #ifdef __cplusplus } #endif -#endif /* _H5Lpublic_H */ +#endif /* H5Lpublic_H */ diff --git a/src/H5MFmodule.h b/src/H5MFmodule.h index 9c4004275c9..9726cec6559 100644 --- a/src/H5MFmodule.h +++ b/src/H5MFmodule.h @@ -18,8 +18,8 @@ * H5MF package. Including this header means that the source file * is part of the H5MF package. */ -#ifndef _H5MFmodule_H -#define _H5MFmodule_H +#ifndef H5MFmodule_H +#define H5MFmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_RESOURCE #define H5_MY_PKG_INIT NO -#endif /* _H5MFmodule_H */ +#endif /* H5MFmodule_H */ diff --git a/src/H5MFpkg.h b/src/H5MFpkg.h index 79e26a77f59..4e7717ddffb 100644 --- a/src/H5MFpkg.h +++ b/src/H5MFpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5MF package!" #endif -#ifndef _H5MFpkg_H -#define _H5MFpkg_H +#ifndef H5MFpkg_H +#define H5MFpkg_H /* Get package's private header */ #include "H5MFprivate.h" @@ -207,4 +207,4 @@ H5_DLL herr_t H5MF__sects_dump(H5F_t *f, FILE *stream); #ifdef H5MF_TESTING #endif /* H5MF_TESTING */ -#endif /* _H5MFpkg_H */ +#endif /* H5MFpkg_H */ diff --git a/src/H5MFprivate.h b/src/H5MFprivate.h index e679e824faf..292e85c5f88 100644 --- a/src/H5MFprivate.h +++ b/src/H5MFprivate.h @@ -21,8 +21,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5MFprivate_H -#define _H5MFprivate_H +#ifndef H5MFprivate_H +#define H5MFprivate_H /* Private headers needed by this file */ #include "H5Fprivate.h" /* File access */ @@ -81,4 +81,4 @@ H5_DLL herr_t H5MF_tidy_self_referential_fsm_hack(H5F_t *f); H5_DLL herr_t H5MF_sects_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth); #endif /* H5MF_DEBUGGING */ -#endif /* end _H5MFprivate_H */ +#endif /* end H5MFprivate_H */ diff --git a/src/H5MMprivate.h b/src/H5MMprivate.h index c10128505e3..bb846f408a8 100644 --- a/src/H5MMprivate.h +++ b/src/H5MMprivate.h @@ -21,8 +21,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5MMprivate_H -#define _H5MMprivate_H +#ifndef H5MMprivate_H +#define H5MMprivate_H #include "H5MMpublic.h" @@ -53,4 +53,4 @@ H5_DLL void H5MM_sanity_check_all(void); H5_DLL void H5MM_final_sanity_check(void); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ -#endif /* _H5MMprivate_H */ +#endif /* H5MMprivate_H */ diff --git a/src/H5MMpublic.h b/src/H5MMpublic.h index 9ddd377cfcf..ebfb3772111 100644 --- a/src/H5MMpublic.h +++ b/src/H5MMpublic.h @@ -22,8 +22,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5MMpublic_H -#define _H5MMpublic_H +#ifndef H5MMpublic_H +#define H5MMpublic_H /* Public headers needed by this file */ #include "H5public.h" @@ -39,4 +39,4 @@ extern "C" { #ifdef __cplusplus } #endif -#endif /* _H5MMpublic_H */ +#endif /* H5MMpublic_H */ diff --git a/src/H5MPmodule.h b/src/H5MPmodule.h index 7f9d7b42197..8e34598a20d 100644 --- a/src/H5MPmodule.h +++ b/src/H5MPmodule.h @@ -18,8 +18,8 @@ * H5MP package. Including this header means that the source file * is part of the H5MP package. */ -#ifndef _H5MPmodule_H -#define _H5MPmodule_H +#ifndef H5MPmodule_H +#define H5MPmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_RESOURCE #define H5_MY_PKG_INIT NO -#endif /* _H5MPmodule_H */ +#endif /* H5MPmodule_H */ diff --git a/src/H5MPpkg.h b/src/H5MPpkg.h index 8ab5c7900d2..64c5293ff03 100644 --- a/src/H5MPpkg.h +++ b/src/H5MPpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5MP package!" #endif -#ifndef _H5MPpkg_H -#define _H5MPpkg_H +#ifndef H5MPpkg_H +#define H5MPpkg_H /* Get package's private header */ #include "H5MPprivate.h" /* Memory Pools */ @@ -96,4 +96,4 @@ H5_DLL herr_t H5MP_get_page_free_size(const H5MP_page_t *mp, size_t *page); H5_DLL herr_t H5MP_get_page_next_page(const H5MP_page_t *page, H5MP_page_t **next_page); #endif /* H5MP_TESTING */ -#endif /* _H5MPpkg_H */ +#endif /* H5MPpkg_H */ diff --git a/src/H5MPprivate.h b/src/H5MPprivate.h index 87d1f1b4c06..2b066502018 100644 --- a/src/H5MPprivate.h +++ b/src/H5MPprivate.h @@ -22,8 +22,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5MPprivate_H -#define _H5MPprivate_H +#ifndef H5MPprivate_H +#define H5MPprivate_H /* Include package's public header (not yet) */ /* #include "H5MPpublic.h" */ @@ -54,4 +54,4 @@ H5_DLL void * H5MP_malloc(H5MP_pool_t *mp, size_t request); H5_DLL void * H5MP_free(H5MP_pool_t *mp, void *spc); H5_DLL herr_t H5MP_close(H5MP_pool_t *mp); -#endif /* _H5MPprivate_H */ +#endif /* H5MPprivate_H */ diff --git a/src/H5Mmodule.h b/src/H5Mmodule.h index e8ce23fae8e..8b4f11fee30 100644 --- a/src/H5Mmodule.h +++ b/src/H5Mmodule.h @@ -15,8 +15,8 @@ * H5M package. Including this header means that the source file * is part of the H5M package. */ -#ifndef _H5Mmodule_H -#define _H5Mmodule_H +#ifndef H5Mmodule_H +#define H5Mmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -26,4 +26,4 @@ #define H5_MY_PKG_ERR H5E_MAP #define H5_MY_PKG_INIT YES -#endif /* _H5Dmodule_H */ +#endif /* H5Dmodule_H */ diff --git a/src/H5Mpkg.h b/src/H5Mpkg.h index f47cf14470b..be6749b1853 100644 --- a/src/H5Mpkg.h +++ b/src/H5Mpkg.h @@ -20,8 +20,8 @@ #error "Do not include this file outside the H5M package!" #endif -#ifndef _H5Mpkg_H -#define _H5Mpkg_H +#ifndef H5Mpkg_H +#define H5Mpkg_H /* Get package's private header */ #include "H5Mprivate.h" @@ -44,4 +44,4 @@ /* Package Private Prototypes */ /******************************/ -#endif /*_H5Dpkg_H*/ +#endif /*H5Dpkg_H*/ diff --git a/src/H5Mprivate.h b/src/H5Mprivate.h index bfec01a33f7..1a2524e2425 100644 --- a/src/H5Mprivate.h +++ b/src/H5Mprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5M module */ -#ifndef _H5Mprivate_H -#define _H5Mprivate_H +#ifndef H5Mprivate_H +#define H5Mprivate_H /* Include package's public header */ #include "H5Mpublic.h" @@ -75,4 +75,4 @@ H5_DLL herr_t H5M_init(void); /* Library Private Prototypes */ /******************************/ -#endif /* _H5Mprivate_H */ +#endif /* H5Mprivate_H */ diff --git a/src/H5Mpublic.h b/src/H5Mpublic.h index 30ec452b746..004ff05c9ac 100644 --- a/src/H5Mpublic.h +++ b/src/H5Mpublic.h @@ -17,8 +17,8 @@ * NOTE: This is an experimental API. Everything in the H5M package * is subject to revision in a future release. */ -#ifndef _H5Mpublic_H -#define _H5Mpublic_H +#ifndef H5Mpublic_H +#define H5Mpublic_H /* System headers needed by this file */ @@ -115,4 +115,4 @@ H5_DLL herr_t H5Mdelete(hid_t map_id, hid_t key_mem_type_id, const void *key, hi } #endif -#endif /* _H5Mpublic_H */ +#endif /* H5Mpublic_H */ diff --git a/src/H5Omodule.h b/src/H5Omodule.h index 8edec066109..9ba6c61c90e 100644 --- a/src/H5Omodule.h +++ b/src/H5Omodule.h @@ -18,8 +18,8 @@ * H5O package. Including this header means that the source file * is part of the H5O package. */ -#ifndef _H5Omodule_H -#define _H5Omodule_H +#ifndef H5Omodule_H +#define H5Omodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_OHDR #define H5_MY_PKG_INIT YES -#endif /* _H5Omodule_H */ +#endif /* H5Omodule_H */ diff --git a/src/H5Opkg.h b/src/H5Opkg.h index 862e5d78865..6e203bb48fd 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -15,8 +15,8 @@ #error "Do not include this file outside the H5O package!" #endif -#ifndef _H5Opkg_H -#define _H5Opkg_H +#ifndef H5Opkg_H +#define H5Opkg_H /* Get package's private header */ #include "H5Oprivate.h" /* Object headers */ @@ -644,4 +644,4 @@ H5_DLL herr_t H5O__assert(const H5O_t *oh); #endif /* H5O_DEBUG */ H5_DLL herr_t H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int fwidth); -#endif /* _H5Opkg_H */ +#endif /* H5Opkg_H */ diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index b6bd3fe033e..6d901b38e2b 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -21,8 +21,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5Oprivate_H -#define _H5Oprivate_H +#ifndef H5Oprivate_H +#define H5Oprivate_H /* Early typedefs to avoid circular dependencies */ typedef struct H5O_t H5O_t; @@ -1032,4 +1032,4 @@ H5_DLL herr_t H5O_pline_set_version(H5F_t *f, H5O_pline_t *pline); /* Shared message operators */ H5_DLL herr_t H5O_set_shared(H5O_shared_t *dst, const H5O_shared_t *src); -#endif /* _H5Oprivate_H */ +#endif /* H5Oprivate_H */ diff --git a/src/H5Opublic.h b/src/H5Opublic.h index d5c9e5c2f27..9ecfac333a6 100644 --- a/src/H5Opublic.h +++ b/src/H5Opublic.h @@ -22,8 +22,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5Opublic_H -#define _H5Opublic_H +#ifndef H5Opublic_H +#define H5Opublic_H /* Public headers needed by this file */ #include "H5public.h" /* Generic Functions */ @@ -303,4 +303,4 @@ H5_DLL herr_t H5Ovisit_by_name2(hid_t loc_id, const char *obj_name, H5_index_t i #ifdef __cplusplus } #endif -#endif /* _H5Opublic_H */ +#endif /* H5Opublic_H */ diff --git a/src/H5PBmodule.h b/src/H5PBmodule.h index 9c07a0ca0d0..21294c876b0 100644 --- a/src/H5PBmodule.h +++ b/src/H5PBmodule.h @@ -18,8 +18,8 @@ * H5PB package. Including this header means that the source file * is part of the H5PB package. */ -#ifndef _H5PBmodule_H -#define _H5PBmodule_H +#ifndef H5PBmodule_H +#define H5PBmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_RESOURCE #define H5_MY_PKG_INIT NO -#endif /* _H5PBmodule_H */ +#endif /* H5PBmodule_H */ diff --git a/src/H5PBpkg.h b/src/H5PBpkg.h index b54bcdc28c7..2656588f32a 100644 --- a/src/H5PBpkg.h +++ b/src/H5PBpkg.h @@ -15,8 +15,8 @@ #error "Do not include this file outside the H5PB package!" #endif -#ifndef _H5PBpkg_H -#define _H5PBpkg_H +#ifndef H5PBpkg_H +#define H5PBpkg_H /* Get package's private header */ #include "H5PBprivate.h" @@ -50,4 +50,4 @@ typedef struct H5PB_entry_t { /* Package Private Prototypes */ /******************************/ -#endif /* _H5PBpkg_H */ +#endif /* H5PBpkg_H */ diff --git a/src/H5PBprivate.h b/src/H5PBprivate.h index d1e9c1c689e..e0197bfed27 100644 --- a/src/H5PBprivate.h +++ b/src/H5PBprivate.h @@ -20,8 +20,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5PBprivate_H -#define _H5PBprivate_H +#ifndef H5PBprivate_H +#define H5PBprivate_H /* Include package's public header */ #ifdef NOT_YET @@ -98,4 +98,4 @@ H5_DLL herr_t H5PB_get_stats(const H5PB_t *page_buf, unsigned accesses[2], unsig unsigned misses[2], unsigned evictions[2], unsigned bypasses[2]); H5_DLL herr_t H5PB_print_stats(const H5PB_t *page_buf); -#endif /* !_H5PBprivate_H */ +#endif /* H5PBprivate_H */ diff --git a/src/H5PLextern.h b/src/H5PLextern.h index dbf10586240..7f3df5e2f92 100644 --- a/src/H5PLextern.h +++ b/src/H5PLextern.h @@ -14,8 +14,8 @@ * Purpose: Header file for writing external HDF5 plugins. */ -#ifndef _H5PLextern_H -#define _H5PLextern_H +#ifndef H5PLextern_H +#define H5PLextern_H /* Include HDF5 header */ #include "hdf5.h" @@ -40,4 +40,4 @@ H5PLUGIN_DLL const void *H5PLget_plugin_info(void); } #endif -#endif /* _H5PLextern_H */ +#endif /* H5PLextern_H */ diff --git a/src/H5PLmodule.h b/src/H5PLmodule.h index a00c0c3e7de..ab9f1d5ff89 100644 --- a/src/H5PLmodule.h +++ b/src/H5PLmodule.h @@ -16,8 +16,8 @@ * is part of the H5PL package. */ -#ifndef _H5PLmodule_H -#define _H5PLmodule_H +#ifndef H5PLmodule_H +#define H5PLmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -32,4 +32,4 @@ * \todo Describe what programmatically controlling dynamically loaded plugins (H5PL) is all about */ -#endif /* _H5PLmodule_H */ +#endif /* H5PLmodule_H */ diff --git a/src/H5PLpkg.h b/src/H5PLpkg.h index 6c30a419924..6e0d1dcd728 100644 --- a/src/H5PLpkg.h +++ b/src/H5PLpkg.h @@ -21,8 +21,8 @@ #error "Do not include this file outside the H5PL package!" #endif -#ifndef _H5PLpkg_H -#define _H5PLpkg_H +#ifndef H5PLpkg_H +#define H5PLpkg_H /* Include private header file */ #include "H5PLprivate.h" /* Filter functions */ @@ -156,4 +156,4 @@ H5_DLL const char *H5PL__get_path(unsigned int index); H5_DLL herr_t H5PL__find_plugin_in_path_table(const H5PL_search_params_t *search_params, hbool_t *found /*out*/, const void **plugin_info /*out*/); -#endif /* _H5PLpkg_H */ +#endif /* H5PLpkg_H */ diff --git a/src/H5PLprivate.h b/src/H5PLprivate.h index c47f23274eb..36b8ba2156f 100644 --- a/src/H5PLprivate.h +++ b/src/H5PLprivate.h @@ -14,8 +14,8 @@ * This file contains private information about the H5PL module */ -#ifndef _H5PLprivate_H -#define _H5PLprivate_H +#ifndef H5PLprivate_H +#define H5PLprivate_H /* Include package's public header */ #include "H5PLpublic.h" @@ -55,4 +55,4 @@ typedef union H5PL_key_t { /* Internal API routines */ H5_DLL const void *H5PL_load(H5PL_type_t plugin_type, const H5PL_key_t *key); -#endif /* _H5PLprivate_H */ +#endif /* H5PLprivate_H */ diff --git a/src/H5PLpublic.h b/src/H5PLpublic.h index e4ea1d990dc..c3555bc0a2a 100644 --- a/src/H5PLpublic.h +++ b/src/H5PLpublic.h @@ -14,8 +14,8 @@ * This file contains public declarations for the H5PL module. */ -#ifndef _H5PLpublic_H -#define _H5PLpublic_H +#ifndef H5PLpublic_H +#define H5PLpublic_H /* Public headers needed by this file */ #include "H5public.h" /* Generic Functions */ @@ -226,4 +226,4 @@ H5_DLL herr_t H5PLsize(unsigned int *num_paths /*out*/); } #endif -#endif /* _H5PLpublic_H */ +#endif /* H5PLpublic_H */ diff --git a/src/H5Pmodule.h b/src/H5Pmodule.h index 62033d1ec9e..130cb90d09b 100644 --- a/src/H5Pmodule.h +++ b/src/H5Pmodule.h @@ -18,8 +18,8 @@ * H5P package. Including this header means that the source file * is part of the H5P package. */ -#ifndef _H5Pmodule_H -#define _H5Pmodule_H +#ifndef H5Pmodule_H +#define H5Pmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -72,4 +72,4 @@ * \ingroup H5P */ -#endif /* _H5Pmodule_H */ +#endif /* H5Pmodule_H */ diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h index ef984791502..699d5f3e5d7 100644 --- a/src/H5Ppkg.h +++ b/src/H5Ppkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5P package!" #endif -#ifndef _H5Ppkg_H -#define _H5Ppkg_H +#ifndef H5Ppkg_H +#define H5Ppkg_H /* Get package's private header */ #include "H5Pprivate.h" @@ -198,4 +198,4 @@ H5_DLL char *H5P__get_class_path_test(hid_t pclass_id); H5_DLL hid_t H5P__open_class_path_test(const char *path); #endif /* H5P_TESTING */ -#endif /* _H5Ppkg_H */ +#endif /* H5Ppkg_H */ diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h index 5d4288795f9..862c74f3180 100644 --- a/src/H5Pprivate.h +++ b/src/H5Pprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5P module */ -#ifndef _H5Pprivate_H -#define _H5Pprivate_H +#ifndef H5Pprivate_H +#define H5Pprivate_H /* Early typedefs to avoid circular dependencies */ typedef struct H5P_genplist_t H5P_genplist_t; @@ -209,4 +209,4 @@ H5_DLL herr_t H5P_get_fill_value(H5P_genplist_t *plist, const struct H5T_t *type H5_DLL int H5P_ignore_cmp(const void H5_ATTR_UNUSED *val1, const void H5_ATTR_UNUSED *val2, size_t H5_ATTR_UNUSED size); -#endif /* _H5Pprivate_H */ +#endif /* H5Pprivate_H */ diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index 9f3fc5df676..9638691aecf 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -15,8 +15,8 @@ * This file contains function prototypes for each exported function in the * H5P module. */ -#ifndef _H5Ppublic_H -#define _H5Ppublic_H +#ifndef H5Ppublic_H +#define H5Ppublic_H /* System headers needed by this file */ @@ -39,11 +39,11 @@ /* When this header is included from a private HDF5 header, don't make calls to H5open() */ #undef H5OPEN -#ifndef _H5private_H +#ifndef H5private_H #define H5OPEN H5open(), -#else /* _H5private_H */ +#else /* H5private_H */ #define H5OPEN -#endif /* _H5private_H */ +#endif /* H5private_H */ /* * The library's property list classes @@ -1371,4 +1371,4 @@ H5_DLL herr_t H5Pget_file_space(hid_t plist_id, H5F_file_space_type_t *str #ifdef __cplusplus } #endif -#endif /* _H5Ppublic_H */ +#endif /* H5Ppublic_H */ diff --git a/src/H5RSprivate.h b/src/H5RSprivate.h index c1f044a15d0..32e1dc66c23 100644 --- a/src/H5RSprivate.h +++ b/src/H5RSprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5RS module */ -#ifndef _H5RSprivate_H -#define _H5RSprivate_H +#ifndef H5RSprivate_H +#define H5RSprivate_H /**************************************/ /* Public headers needed by this file */ @@ -55,4 +55,4 @@ H5_DLL ssize_t H5RS_len(const H5RS_str_t *rs); H5_DLL char * H5RS_get_str(const H5RS_str_t *rs); H5_DLL unsigned H5RS_get_count(const H5RS_str_t *rs); -#endif /* _H5RSprivate_H */ +#endif /* H5RSprivate_H */ diff --git a/src/H5Rmodule.h b/src/H5Rmodule.h index 0f09b308b6f..9a3bf33e17c 100644 --- a/src/H5Rmodule.h +++ b/src/H5Rmodule.h @@ -14,8 +14,8 @@ * H5R package. Including this header means that the source file * is part of the H5R package. */ -#ifndef _H5Rmodule_H -#define _H5Rmodule_H +#ifndef H5Rmodule_H +#define H5Rmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -25,4 +25,4 @@ #define H5_MY_PKG_ERR H5E_REFERENCE #define H5_MY_PKG_INIT YES -#endif /* _H5Rmodule_H */ +#endif /* H5Rmodule_H */ diff --git a/src/H5Rpkg.h b/src/H5Rpkg.h index f924c52ecec..ee5fb710d37 100644 --- a/src/H5Rpkg.h +++ b/src/H5Rpkg.h @@ -19,8 +19,8 @@ #error "Do not include this file outside the H5R package!" #endif -#ifndef _H5Rpkg_H -#define _H5Rpkg_H +#ifndef H5Rpkg_H +#define H5Rpkg_H /* Get package's private header */ #include "H5Rprivate.h" @@ -128,4 +128,4 @@ H5_DLL herr_t H5R__decode_token_obj_compat(const unsigned char *buf, size_t *nby H5_DLL herr_t H5R__decode_token_region_compat(H5F_t *f, const unsigned char *buf, size_t *nbytes, H5O_token_t *obj_token, size_t token_size, H5S_t **space_ptr); -#endif /* _H5Rpkg_H */ +#endif /* H5Rpkg_H */ diff --git a/src/H5Rprivate.h b/src/H5Rprivate.h index 032e2b63a07..6d6fcd5f994 100644 --- a/src/H5Rprivate.h +++ b/src/H5Rprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5R module */ -#ifndef _H5Rprivate_H -#define _H5Rprivate_H +#ifndef H5Rprivate_H +#define H5Rprivate_H #include "H5Rpublic.h" @@ -39,4 +39,4 @@ /* Library Private Prototypes */ /******************************/ -#endif /* _H5Rprivate_H */ +#endif /* H5Rprivate_H */ diff --git a/src/H5Rpublic.h b/src/H5Rpublic.h index 293a67ac1a1..4a821193735 100644 --- a/src/H5Rpublic.h +++ b/src/H5Rpublic.h @@ -14,8 +14,8 @@ /* * This file contains public declarations for the H5R module. */ -#ifndef _H5Rpublic_H -#define _H5Rpublic_H +#ifndef H5Rpublic_H +#define H5Rpublic_H /* Public headers needed by this file */ #include "H5public.h" @@ -153,4 +153,4 @@ H5_DLL ssize_t H5Rget_name(hid_t loc_id, H5R_type_t ref_type, const void *ref, c } #endif -#endif /* _H5Rpublic_H */ +#endif /* H5Rpublic_H */ diff --git a/src/H5SLmodule.h b/src/H5SLmodule.h index 3ce2fcd8b82..2614f92eb11 100644 --- a/src/H5SLmodule.h +++ b/src/H5SLmodule.h @@ -18,8 +18,8 @@ * H5SL package. Including this header means that the source file * is part of the H5SL package. */ -#ifndef _H5SLmodule_H -#define _H5SLmodule_H +#ifndef H5SLmodule_H +#define H5SLmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_SLIST #define H5_MY_PKG_INIT YES -#endif /* _H5SLmodule_H */ +#endif /* H5SLmodule_H */ diff --git a/src/H5SLprivate.h b/src/H5SLprivate.h index ba235077e52..c9e11471cd2 100644 --- a/src/H5SLprivate.h +++ b/src/H5SLprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5SL module */ -#ifndef _H5SLprivate_H -#define _H5SLprivate_H +#ifndef H5SLprivate_H +#define H5SLprivate_H /**************************************/ /* Public headers needed by this file */ @@ -91,4 +91,4 @@ H5_DLL herr_t H5SL_close(H5SL_t *slist); H5_DLL herr_t H5SL_destroy(H5SL_t *slist, H5SL_operator_t op, void *op_data); H5_DLL int H5SL_term_interface(void); -#endif /* _H5SLprivate_H */ +#endif /* H5SLprivate_H */ diff --git a/src/H5SMmodule.h b/src/H5SMmodule.h index 57945ce18ec..6d2abf17831 100644 --- a/src/H5SMmodule.h +++ b/src/H5SMmodule.h @@ -18,8 +18,8 @@ * H5SM package. Including this header means that the source file * is part of the H5SM package. */ -#ifndef _H5SMmodule_H -#define _H5SMmodule_H +#ifndef H5SMmodule_H +#define H5SMmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_SOHM #define H5_MY_PKG_INIT NO -#endif /* _H5SMmodule_H */ +#endif /* H5SMmodule_H */ diff --git a/src/H5SMpkg.h b/src/H5SMpkg.h index 82f63195245..ae9a5f630a1 100644 --- a/src/H5SMpkg.h +++ b/src/H5SMpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5SM package!" #endif -#ifndef _H5SMpkg_H -#define _H5SMpkg_H +#ifndef H5SMpkg_H +#define H5SMpkg_H /* Get package's private header */ #include "H5SMprivate.h" /* Shared Object Header Messages */ @@ -271,4 +271,4 @@ H5_DLL herr_t H5SM__list_free(H5SM_list_t *list); H5_DLL herr_t H5SM__get_mesg_count_test(H5F_t *f, unsigned type_id, size_t *mesg_count); #endif /* H5SM_TESTING */ -#endif /* _H5SMpkg_H */ +#endif /* H5SMpkg_H */ diff --git a/src/H5SMprivate.h b/src/H5SMprivate.h index fb47e465078..efe9355516a 100644 --- a/src/H5SMprivate.h +++ b/src/H5SMprivate.h @@ -18,8 +18,8 @@ * Purpose: This file contains private declarations for the H5SM * shared object header messages module. */ -#ifndef _H5SMprivate_H -#define _H5SMprivate_H +#ifndef H5SMprivate_H +#define H5SMprivate_H #include "H5Oprivate.h" /* Object headers */ #include "H5Pprivate.h" /* Property lists */ @@ -66,4 +66,4 @@ H5_DLL herr_t H5SM_table_debug(H5F_t *f, haddr_t table_addr, FILE *stream, int i H5_DLL herr_t H5SM_list_debug(H5F_t *f, haddr_t list_addr, FILE *stream, int indent, int fwidth, haddr_t table_addr); -#endif /*_H5SMprivate_H*/ +#endif /*H5SMprivate_H*/ diff --git a/src/H5STprivate.h b/src/H5STprivate.h index c9d643ef82d..2d009fa7bc0 100644 --- a/src/H5STprivate.h +++ b/src/H5STprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5ST module */ -#ifndef _H5STprivate_H -#define _H5STprivate_H +#ifndef H5STprivate_H +#define H5STprivate_H #ifdef LATER #include "H5STpublic.h" @@ -60,4 +60,4 @@ H5_DLL herr_t H5ST_delete(H5ST_tree_t *root, H5ST_ptr_t p); H5_DLL herr_t H5ST_dump(H5ST_tree_t *tree); #endif /* H5ST_DEBUG */ -#endif /* _H5STprivate_H */ +#endif /* H5STprivate_H */ diff --git a/src/H5Smodule.h b/src/H5Smodule.h index d36a323b50b..bb33eb855a7 100644 --- a/src/H5Smodule.h +++ b/src/H5Smodule.h @@ -18,8 +18,8 @@ * H5S package. Including this header means that the source file * is part of the H5S package. */ -#ifndef _H5Smodule_H -#define _H5Smodule_H +#ifndef H5Smodule_H +#define H5Smodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -56,4 +56,4 @@ * */ -#endif /* _H5Smodule_H */ +#endif /* H5Smodule_H */ diff --git a/src/H5Spkg.h b/src/H5Spkg.h index ac76b7aa312..adb284871d1 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5S package!" #endif -#ifndef _H5Spkg_H -#define _H5Spkg_H +#ifndef H5Spkg_H +#define H5Spkg_H /* Get package's private header */ #include "H5Sprivate.h" @@ -417,4 +417,4 @@ H5_DLL herr_t H5S__get_diminfo_status_test(hid_t space_id, H5S_diminfo_valid_t * H5_DLL htri_t H5S__internal_consistency_test(hid_t space_id); #endif /* H5S_TESTING */ -#endif /*_H5Spkg_H*/ +#endif /*H5Spkg_H*/ diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 9b888bd58aa..76ed23792c0 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5S module */ -#ifndef _H5Sprivate_H -#define _H5Sprivate_H +#ifndef H5Sprivate_H +#define H5Sprivate_H /* Include package's public header */ #include "H5Spublic.h" @@ -306,4 +306,4 @@ H5_DLL herr_t H5S_mpio_space_type(const H5S_t *space, size_t elmt_size, hbool_t do_permute, hsize_t **permute_map, hbool_t *is_permuted); #endif /* H5_HAVE_PARALLEL */ -#endif /* _H5Sprivate_H */ +#endif /* H5Sprivate_H */ diff --git a/src/H5Spublic.h b/src/H5Spublic.h index 451c720b26f..9888f56807c 100644 --- a/src/H5Spublic.h +++ b/src/H5Spublic.h @@ -14,8 +14,8 @@ /* * This file contains public declarations for the H5S module. */ -#ifndef _H5Spublic_H -#define _H5Spublic_H +#ifndef H5Spublic_H +#define H5Spublic_H /* Public headers needed by this file */ #include "H5public.h" @@ -454,4 +454,4 @@ H5_DLL herr_t H5Sencode1(hid_t obj_id, void *buf, size_t *nalloc); #ifdef __cplusplus } #endif -#endif /* _H5Spublic_H */ +#endif /* H5Spublic_H */ diff --git a/src/H5Tmodule.h b/src/H5Tmodule.h index 7e178187bd9..4f9edde5925 100644 --- a/src/H5Tmodule.h +++ b/src/H5Tmodule.h @@ -18,8 +18,8 @@ * H5T package. Including this header means that the source file * is part of the H5T package. */ -#ifndef _H5Tmodule_H -#define _H5Tmodule_H +#ifndef H5Tmodule_H +#define H5Tmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -105,4 +105,4 @@ * */ -#endif /* _H5Tmodule_H */ +#endif /* H5Tmodule_H */ diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index 5a52945c46c..0fe4f502175 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5T package!" #endif -#ifndef _H5Tpkg_H -#define _H5Tpkg_H +#ifndef H5Tpkg_H +#define H5Tpkg_H /* * Define this to enable debugging. @@ -890,4 +890,4 @@ H5_DLL herr_t H5T__sort_name(const H5T_t *dt, int *map); /* Debugging functions */ H5_DLL herr_t H5T__print_stats(H5T_path_t *path, int *nprint /*in,out*/); -#endif /* _H5Tpkg_H */ +#endif /* H5Tpkg_H */ diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h index f2bd91635f5..9ee0d0462a1 100644 --- a/src/H5Tprivate.h +++ b/src/H5Tprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5T module */ -#ifndef _H5Tprivate_H -#define _H5Tprivate_H +#ifndef H5Tprivate_H +#define H5Tprivate_H /* Early typedefs to avoid circular dependencies */ typedef struct H5T_t H5T_t; @@ -173,4 +173,4 @@ H5_DLL int H5T_get_offset(const H5T_t *dt); /* Fixed-point functions */ H5_DLL H5T_sign_t H5T_get_sign(H5T_t const *dt); -#endif /* _H5Tprivate_H */ +#endif /* H5Tprivate_H */ diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h index 73f9bfa60d2..a6a1ef2c105 100644 --- a/src/H5Tpublic.h +++ b/src/H5Tpublic.h @@ -14,8 +14,8 @@ /* * This file contains public declarations for the H5T module. */ -#ifndef _H5Tpublic_H -#define _H5Tpublic_H +#ifndef H5Tpublic_H +#define H5Tpublic_H /* Public headers needed by this file */ #include "H5public.h" @@ -268,11 +268,11 @@ typedef H5T_conv_ret_t (*H5T_conv_except_func_t)(H5T_conv_except_t except_type, /* When this header is included from a private header, don't make calls to H5open() */ #undef H5OPEN -#ifndef _H5private_H +#ifndef H5private_H #define H5OPEN H5open(), -#else /* _H5private_H */ +#else /* H5private_H */ #define H5OPEN -#endif /* _H5private_H */ +#endif /* H5private_H */ /* * The IEEE floating point types in various byte orders. @@ -3022,4 +3022,4 @@ H5_DLL int H5Tget_array_dims1(hid_t type_id, hsize_t dims[], int perm[]); #ifdef __cplusplus } #endif -#endif /* _H5Tpublic_H */ +#endif /* H5Tpublic_H */ diff --git a/src/H5UCprivate.h b/src/H5UCprivate.h index 489df99578a..9f4f15a1e46 100644 --- a/src/H5UCprivate.h +++ b/src/H5UCprivate.h @@ -17,8 +17,8 @@ * conflicting requirement for the use of H5RC. */ -#ifndef _H5UCprivate_H -#define _H5UCprivate_H +#ifndef H5UCprivate_H +#define H5UCprivate_H /**************************************/ /* Public headers needed by this file */ @@ -59,4 +59,4 @@ typedef struct H5UC_t { H5_DLL H5UC_t *H5UC_create(void *s, H5UC_free_func_t free_func); H5_DLL herr_t H5UC_decr(H5UC_t *rc); -#endif /* _H5UCprivate_H */ +#endif /* H5UCprivate_H */ diff --git a/src/H5VLconnector.h b/src/H5VLconnector.h index ba9052b25d2..817793954ef 100644 --- a/src/H5VLconnector.h +++ b/src/H5VLconnector.h @@ -14,8 +14,8 @@ * This file contains public declarations for authoring VOL connectors. */ -#ifndef _H5VLconnector_H -#define _H5VLconnector_H +#ifndef H5VLconnector_H +#define H5VLconnector_H /* Public headers needed by this file */ #include "H5public.h" /* Generic Functions */ @@ -544,4 +544,4 @@ H5_DLL hid_t H5VLpeek_connector_id_by_value(H5VL_class_value_t value); } #endif -#endif /* _H5VLconnector_H */ +#endif /* H5VLconnector_H */ diff --git a/src/H5VLconnector_passthru.h b/src/H5VLconnector_passthru.h index 25dec8f3126..1b6715b0ba7 100644 --- a/src/H5VLconnector_passthru.h +++ b/src/H5VLconnector_passthru.h @@ -23,8 +23,8 @@ * the H5VLconnector.h header easier to understand. */ -#ifndef _H5VLconnector_passthru_H -#define _H5VLconnector_passthru_H +#ifndef H5VLconnector_passthru_H +#define H5VLconnector_passthru_H /* Public headers needed by this file */ #include "H5public.h" /* Generic Functions */ @@ -233,4 +233,4 @@ H5_DLL herr_t H5VLoptional(void *obj, hid_t connector_id, int op_type, hid_t dxp } #endif -#endif /* _H5VLconnector_passthru_H */ +#endif /* H5VLconnector_passthru_H */ diff --git a/src/H5VLmodule.h b/src/H5VLmodule.h index f0cdc5d807c..78c59862235 100644 --- a/src/H5VLmodule.h +++ b/src/H5VLmodule.h @@ -16,8 +16,8 @@ * is part of the H5VL package. */ -#ifndef _H5VLmodule_H -#define _H5VLmodule_H +#ifndef H5VLmodule_H +#define H5VLmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -42,4 +42,4 @@ * \ingroup H5VL */ -#endif /* _H5VLmodule_H */ +#endif /* H5VLmodule_H */ diff --git a/src/H5VLnative.h b/src/H5VLnative.h index 96d6a5a1122..cb7f0e03e40 100644 --- a/src/H5VLnative.h +++ b/src/H5VLnative.h @@ -14,8 +14,8 @@ * Purpose: The public header file for the native VOL connector. */ -#ifndef _H5VLnative_H -#define _H5VLnative_H +#ifndef H5VLnative_H +#define H5VLnative_H /* Public headers needed by this file */ #include "H5VLpublic.h" /* Virtual Object Layer */ @@ -139,4 +139,4 @@ H5_DLL hid_t H5VL_native_register(void); } #endif -#endif /* _H5VLnative_H */ +#endif /* H5VLnative_H */ diff --git a/src/H5VLnative_private.h b/src/H5VLnative_private.h index c52ff3e348b..126441d00e5 100644 --- a/src/H5VLnative_private.h +++ b/src/H5VLnative_private.h @@ -14,8 +14,8 @@ * Purpose: The private header file for the native VOL connector. */ -#ifndef _H5VLnative_private_H -#define _H5VLnative_private_H +#ifndef H5VLnative_private_H +#define H5VLnative_private_H /* Private headers needed by this file */ #include "H5Fprivate.h" /* Files */ @@ -178,4 +178,4 @@ H5_DLL herr_t H5VL_native_get_file_struct(void *obj, H5I_type_t type, H5F_t **fi } #endif -#endif /* _H5VLnative_private_H */ +#endif /* H5VLnative_private_H */ diff --git a/src/H5VLpassthru.c b/src/H5VLpassthru.c index 93923508138..434fd437e5d 100644 --- a/src/H5VLpassthru.c +++ b/src/H5VLpassthru.c @@ -487,7 +487,7 @@ H5VL_pass_through_init(hid_t vipl_id) #endif /* Shut compiler up about unused parameter */ - vipl_id = vipl_id; + (void)vipl_id; return 0; } /* end H5VL_pass_through_init() */ diff --git a/src/H5VLpassthru.h b/src/H5VLpassthru.h index a48b49ebb01..79caca7fb5d 100644 --- a/src/H5VLpassthru.h +++ b/src/H5VLpassthru.h @@ -14,8 +14,8 @@ * Purpose: The public header file for the pass-through VOL connector. */ -#ifndef _H5VLpassthru_H -#define _H5VLpassthru_H +#ifndef H5VLpassthru_H +#define H5VLpassthru_H /* Public headers needed by this file */ #include "H5VLpublic.h" /* Virtual Object Layer */ @@ -44,4 +44,4 @@ H5_DLL hid_t H5VL_pass_through_register(void); } #endif -#endif /* _H5VLpassthru_H */ +#endif /* H5VLpassthru_H */ diff --git a/src/H5VLpkg.h b/src/H5VLpkg.h index d436be7d6f6..7b8a8779d6f 100644 --- a/src/H5VLpkg.h +++ b/src/H5VLpkg.h @@ -20,8 +20,8 @@ #error "Do not include this file outside the H5VL package!" #endif -#ifndef _H5VLpkg_H -#define _H5VLpkg_H +#ifndef H5VLpkg_H +#define H5VLpkg_H /* Get package's private header */ #include "H5VLprivate.h" /* Generic Functions */ @@ -57,4 +57,4 @@ H5_DLL hid_t H5VL__peek_connector_id_by_value(H5VL_class_value_t value); H5_DLL herr_t H5VL__connector_str_to_info(const char *str, hid_t connector_id, void **info); H5_DLL ssize_t H5VL__get_connector_name(hid_t id, char *name /*out*/, size_t size); -#endif /* _H5VLpkg_H */ +#endif /* H5VLpkg_H */ diff --git a/src/H5VLprivate.h b/src/H5VLprivate.h index 1855c98690d..d87ebb17154 100644 --- a/src/H5VLprivate.h +++ b/src/H5VLprivate.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5VLprivate_H -#define _H5VLprivate_H +#ifndef H5VLprivate_H +#define H5VLprivate_H /* Include package's public header */ #include "H5VLpublic.h" /* Generic Functions */ @@ -271,4 +271,4 @@ H5_DLL herr_t H5VL_token_from_str(const H5VL_object_t *vol_obj, H5I_type_t obj_t /* Generic functions */ H5_DLL herr_t H5VL_optional(const H5VL_object_t *vol_obj, int op_type, hid_t dxpl_id, void **req, ...); -#endif /* _H5VLprivate_H */ +#endif /* H5VLprivate_H */ diff --git a/src/H5VLpublic.h b/src/H5VLpublic.h index 325a3d934a7..167b18a70f2 100644 --- a/src/H5VLpublic.h +++ b/src/H5VLpublic.h @@ -14,8 +14,8 @@ * This file contains public declarations for the H5VL (VOL) module. */ -#ifndef _H5VLpublic_H -#define _H5VLpublic_H +#ifndef H5VLpublic_H +#define H5VLpublic_H /* Public headers needed by this file */ #include "H5public.h" /* Generic Functions */ @@ -346,4 +346,4 @@ H5_DLL herr_t H5VLquery_optional(hid_t obj_id, H5VL_subclass_t subcls, int opt_t #include "H5VLconnector_passthru.h" /* Pass-through VOL connector author routines */ #include "H5VLnative.h" /* Native VOL connector macros, for VOL connector authors */ -#endif /* _H5VLpublic_H */ +#endif /* H5VLpublic_H */ diff --git a/src/H5WBprivate.h b/src/H5WBprivate.h index 416e125ad9e..109236560a7 100644 --- a/src/H5WBprivate.h +++ b/src/H5WBprivate.h @@ -22,8 +22,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5WBprivate_H -#define _H5WBprivate_H +#ifndef H5WBprivate_H +#define H5WBprivate_H /* Include package's public header */ /* #include "H5WBpublic.h" */ @@ -55,4 +55,4 @@ H5_DLL void * H5WB_actual(H5WB_t *wb, size_t need); H5_DLL void * H5WB_actual_clear(H5WB_t *wb, size_t need); H5_DLL herr_t H5WB_unwrap(H5WB_t *wb); -#endif /* _H5WBprivate_H */ +#endif /* H5WBprivate_H */ diff --git a/src/H5Zmodule.h b/src/H5Zmodule.h index bf0792d02b3..25007b306f4 100644 --- a/src/H5Zmodule.h +++ b/src/H5Zmodule.h @@ -18,8 +18,8 @@ * H5Z package. Including this header means that the source file * is part of the H5Z package. */ -#ifndef _H5Zmodule_H -#define _H5Zmodule_H +#ifndef H5Zmodule_H +#define H5Zmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -96,4 +96,4 @@ * */ -#endif /* _H5Zmodule_H */ +#endif /* H5Zmodule_H */ diff --git a/src/H5Zpkg.h b/src/H5Zpkg.h index 41c7ba1f222..726478a0880 100644 --- a/src/H5Zpkg.h +++ b/src/H5Zpkg.h @@ -15,8 +15,8 @@ #error "Do not include this file outside the H5Z package!" #endif -#ifndef _H5Zpkg_H -#define _H5Zpkg_H +#ifndef H5Zpkg_H +#define H5Zpkg_H /* Include private header file */ #include "H5Zprivate.h" /* Filter functions */ @@ -54,4 +54,4 @@ H5_DLLVAR H5Z_class2_t H5Z_SZIP[1]; /* Package internal routines */ H5_DLL herr_t H5Z__unregister(H5Z_filter_t filter_id); -#endif /* _H5Zpkg_H */ +#endif /* H5Zpkg_H */ diff --git a/src/H5Zprivate.h b/src/H5Zprivate.h index 357ba309758..51690b424c7 100644 --- a/src/H5Zprivate.h +++ b/src/H5Zprivate.h @@ -15,8 +15,8 @@ * Thursday, April 16, 1998 */ -#ifndef _H5Zprivate_H -#define _H5Zprivate_H +#ifndef H5Zprivate_H +#define H5Zprivate_H /* Early typedefs to avoid circular dependencies */ typedef struct H5Z_filter_info_t H5Z_filter_info_t; diff --git a/src/H5Zpublic.h b/src/H5Zpublic.h index 4d3b2fe9306..4c9b006a984 100644 --- a/src/H5Zpublic.h +++ b/src/H5Zpublic.h @@ -15,8 +15,8 @@ * Thursday, April 16, 1998 */ -#ifndef _H5Zpublic_H -#define _H5Zpublic_H +#ifndef H5Zpublic_H +#define H5Zpublic_H /* Public headers needed by this file */ #include "H5public.h" diff --git a/src/H5module.h b/src/H5module.h index 478120b9e40..64081bf5509 100644 --- a/src/H5module.h +++ b/src/H5module.h @@ -15,8 +15,8 @@ * H5 package. Including this header means that the source file * is part of the H5 package. */ -#ifndef _H5module_H -#define _H5module_H +#ifndef H5module_H +#define H5module_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -31,4 +31,4 @@ * \todo Describe concisely what the functions in this module are about. */ -#endif /* _H5module_H */ +#endif /* H5module_H */ diff --git a/src/H5private.h b/src/H5private.h index 08a19f6beb2..7863ae2071a 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -21,8 +21,8 @@ * */ -#ifndef _H5private_H -#define _H5private_H +#ifndef H5private_H +#define H5private_H #include "H5public.h" /* Include Public Definitions */ @@ -306,19 +306,6 @@ * gcc warnings (it has to use the public API and can't include this * file). Be sure to update that file if the #ifdefs change here. */ -#ifdef __cplusplus -#define H5_ATTR_FORMAT(X, Y, Z) /*void*/ -#define H5_ATTR_UNUSED /*void*/ -#define H5_ATTR_DEPRECATED_USED /*void*/ -#define H5_ATTR_NDEBUG_UNUSED /*void*/ -#define H5_ATTR_DEBUG_API_USED /*void*/ -#define H5_ATTR_PARALLEL_UNUSED /*void*/ -#define H5_ATTR_PARALLEL_USED /*void*/ -#define H5_ATTR_NORETURN /*void*/ -#define H5_ATTR_CONST /*void*/ -#define H5_ATTR_PURE /*void*/ -#define H5_ATTR_FALLTHROUGH /*void*/ -#else /* __cplusplus */ #if defined(H5_HAVE_ATTRIBUTE) && !defined(__SUNPRO_C) #define H5_ATTR_FORMAT(X, Y, Z) __attribute__((format(X, Y, Z))) #define H5_ATTR_UNUSED __attribute__((unused)) @@ -365,7 +352,6 @@ #define H5_ATTR_PURE /*void*/ #define H5_ATTR_FALLTHROUGH /*void*/ #endif -#endif /* __cplusplus */ /* * Networking headers used by the mirror VFD and related tests and utilities. @@ -2845,4 +2831,4 @@ H5_DLL herr_t H5_mpio_create_large_type(hsize_t num_elements, MPI_Aint stride_b H5_DLL herr_t H5_buffer_dump(FILE *stream, int indent, const uint8_t *buf, const uint8_t *marker, size_t buf_offset, size_t buf_size); -#endif /* _H5private_H */ +#endif /* H5private_H */ diff --git a/src/H5public.h b/src/H5public.h index 893f9edb7a4..be0f9e7f81c 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -14,16 +14,16 @@ /* * This file contains public declarations for the HDF5 module. */ -#ifndef _H5public_H -#define _H5public_H +#ifndef H5public_H +#define H5public_H /* Include files for public use... */ /* * Since H5pubconf.h is a generated header file, it is messy to try - * to put a #ifndef _H5pubconf_H ... #endif guard in it. + * to put a #ifndef H5pubconf_H ... #endif guard in it. * HDF5 has set an internal rule that it is being included here. * Source files should NOT include H5pubconf.h directly but include - * it via H5public.h. The #ifndef _H5public_H guard above would + * it via H5public.h. The #ifndef H5public_H guard above would * prevent repeated include. */ #include "H5pubconf.h" /* From configure */ @@ -798,4 +798,4 @@ H5_DLL void *H5resize_memory(void *mem, size_t size); #ifdef __cplusplus } #endif -#endif /* _H5public_H */ +#endif /* H5public_H */ diff --git a/src/hdf5.h b/src/hdf5.h index 975a02ed751..c13e472fe7f 100644 --- a/src/hdf5.h +++ b/src/hdf5.h @@ -16,8 +16,8 @@ * a particular header file and include that here, don't fill this file with * lots of gunk... */ -#ifndef _HDF5_H -#define _HDF5_H +#ifndef HDF5_H +#define HDF5_H #include "H5public.h" #include "H5Apublic.h" /* Attributes */ diff --git a/test/H5srcdir.h b/test/H5srcdir.h index b2fd341f9d7..8cc91d14bc2 100644 --- a/test/H5srcdir.h +++ b/test/H5srcdir.h @@ -17,8 +17,8 @@ * * Purpose: srcdir querying support. */ -#ifndef _H5SRCDIR_H -#define _H5SRCDIR_H +#ifndef H5SRCDIR_H +#define H5SRCDIR_H #ifdef __cplusplus extern "C" { @@ -33,4 +33,4 @@ H5TEST_DLL const char *H5_get_srcdir_filename(const char *filename); } #endif -#endif /* _H5SRCDIR_H */ +#endif /* H5SRCDIR_H */ diff --git a/test/h5test.h b/test/h5test.h index 50cb27715f5..0d7dade3326 100644 --- a/test/h5test.h +++ b/test/h5test.h @@ -17,8 +17,8 @@ * * Purpose: Test support stuff. */ -#ifndef _H5TEST_H -#define _H5TEST_H +#ifndef H5TEST_H +#define H5TEST_H /* * Include required headers. This file tests internal library functions, diff --git a/test/stab.c b/test/stab.c index d99391b2c4d..c40b518f102 100644 --- a/test/stab.c +++ b/test/stab.c @@ -1273,7 +1273,7 @@ old_api(hid_t fapl) PASSED(); #else /* H5_NO_DEPRECATED_SYMBOLS */ /* Shut compiler up */ - fapl = fapl; + (void)fapl; SKIPPED(); HDputs(" Deprecated API symbols not enabled"); diff --git a/test/tattr.c b/test/tattr.c index aeea2683bbe..2b7a03bab54 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -4206,8 +4206,8 @@ test_attr_deprec(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); #else /* H5_NO_DEPRECATED_SYMBOLS */ /* Shut compiler up */ - fcpl = fcpl; - fapl = fapl; + (void)fcpl; + (void)fapl; /* Output message about test being skipped */ MESSAGE(5, ("Skipping Test On Deprecated Attribute Routines\n")); From b90fd9df3ddd6d5f334ee863e066f4744795bdbe Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 2 Mar 2021 10:47:18 -0600 Subject: [PATCH 22/25] Remove case statement for H5I_EVENTSET --- c++/src/H5PropList.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp index 3780220b15c..c5d3bea0ba9 100644 --- a/c++/src/H5PropList.cpp +++ b/c++/src/H5PropList.cpp @@ -157,7 +157,6 @@ PropList::PropList(const hid_t plist_id) : IdComponent() case H5I_UNINIT: case H5I_MAP: case H5I_SPACE_SEL_ITER: - case H5I_EVENTSET: default: id = H5P_DEFAULT; break; From afb1136ab58e12f16456f0e73ca29e7e53aed586 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 2 Mar 2021 14:15:02 -0600 Subject: [PATCH 23/25] Correct call with versioning --- tools/test/h5dump/h5dumpgentest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index fed3a565bcc..e4aa805cf87 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -6356,7 +6356,7 @@ gent_ldouble_scalar(void) if ((sid = H5Screate(H5S_SCALAR)) < 0) goto error; - if ((tid = H5Tarray_create(H5T_NATIVE_LDOUBLE, 1, dims)) < 0) + if ((tid = H5Tarray_create2(H5T_NATIVE_LDOUBLE, 1, dims)) < 0) goto error; if (H5Tget_size(tid) == 0) From 6e44b70dd005cab173b142e275d50dadf964d4d8 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 2 Mar 2021 15:47:37 -0600 Subject: [PATCH 24/25] Remove tabs --- src/H5Gpkg.h | 26 +++++++++++++------------- src/H5Gprivate.h | 8 ++++---- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h index 25a68de3456..b0adf30f510 100644 --- a/src/H5Gpkg.h +++ b/src/H5Gpkg.h @@ -30,12 +30,12 @@ #include "H5Gprivate.h" /* Other private headers needed by this file */ -#include "H5B2private.h" /* v2 B-trees */ +#include "H5B2private.h" /* v2 B-trees */ #include "H5FLprivate.h" /* Free Lists */ -#include "H5HFprivate.h" /* Fractal heaps */ -#include "H5HLprivate.h" /* Local Heaps */ -#include "H5Oprivate.h" /* Object headers */ -#include "H5SLprivate.h" /* Skip lists */ +#include "H5HFprivate.h" /* Fractal heaps */ +#include "H5HLprivate.h" /* Local Heaps */ +#include "H5Oprivate.h" /* Object headers */ +#include "H5SLprivate.h" /* Skip lists */ /**************************/ /* Package Private Macros */ @@ -66,10 +66,10 @@ * symbol table entry. */ typedef enum H5G_cache_type_t { - H5G_CACHED_ERROR = -1, /*force enum to be signed */ + H5G_CACHED_ERROR = -1, /*force enum to be signed */ H5G_NOTHING_CACHED = 0, /*nothing is cached, must be 0 */ H5G_CACHED_STAB = 1, /*symbol table, `stab' */ - H5G_CACHED_SLINK = 2, /*symbolic link */ + H5G_CACHED_SLINK = 2, /*symbolic link */ H5G_NCACHED /*THIS MUST BE LAST */ } H5G_cache_type_t; @@ -88,7 +88,7 @@ typedef union H5G_cache_t { } stab; struct { - size_t lval_offset; /*link value offset */ + size_t lval_offset; /*link value offset */ } slink; } H5G_cache_t; @@ -157,7 +157,7 @@ typedef struct { typedef struct H5G_bt_common_t { /* downward */ const char *name; /*points to temporary memory */ - H5HL_t * heap; /*symbol table heap */ + H5HL_t * heap; /*symbol table heap */ } H5G_bt_common_t; /* @@ -204,10 +204,10 @@ typedef struct H5G_bt_lkp_t { */ typedef struct H5G_bt_it_it_t { /* downward */ - H5HL_t * heap; /*symbol table heap */ - hsize_t skip; /*initial entries to skip */ - H5G_lib_iterate_t op; /*iteration operator */ - void * op_data; /*user-defined operator data */ + H5HL_t * heap; /*symbol table heap */ + hsize_t skip; /*initial entries to skip */ + H5G_lib_iterate_t op; /*iteration operator */ + void * op_data; /*user-defined operator data */ /* upward */ hsize_t *final_ent; /*final entry looked at */ diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h index b9f83c48ed8..409d79003de 100644 --- a/src/H5Gprivate.h +++ b/src/H5Gprivate.h @@ -29,9 +29,9 @@ #include "H5Gpublic.h" /* Private headers needed by this file */ -#include "H5private.h" /* Generic Functions */ -#include "H5Bprivate.h" /* B-trees */ -#include "H5Fprivate.h" /* File access */ +#include "H5private.h" /* Generic Functions */ +#include "H5Bprivate.h" /* B-trees */ +#include "H5Fprivate.h" /* File access */ #include "H5RSprivate.h" /* Reference-counted strings */ /* @@ -42,7 +42,7 @@ ((sizeof_size) + /*offset of name into heap */ \ (sizeof_addr) + /*address of object header */ \ 4 + /*entry type */ \ - 4 + /*reserved */ \ + 4 + /*reserved */ \ H5G_SIZEOF_SCRATCH) /*scratch pad space */ #define H5G_SIZEOF_ENTRY_FILE(F) H5G_SIZEOF_ENTRY(H5F_SIZEOF_ADDR(F), H5F_SIZEOF_SIZE(F)) From 4db7f18303985cd39827078a650b35648b2a56f5 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 2 Mar 2021 16:39:56 -0600 Subject: [PATCH 25/25] Double underscore change --- hl/src/hdf5_hl.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hl/src/hdf5_hl.h b/hl/src/hdf5_hl.h index 580c09a839d..9960b97607d 100644 --- a/hl/src/hdf5_hl.h +++ b/hl/src/hdf5_hl.h @@ -17,8 +17,9 @@ * fill this file with lots of gunk... */ -#ifndef _HDF5_HL_H -#define _HDF5_HL_H +#ifndef HDF5_HL_H +#define HDF5_HL_H + #include "hdf5.h" /* hdf5 main library */ #include "H5DOpublic.h" /* dataset optimization */ #include "H5DSpublic.h" /* dimension scales */ @@ -28,4 +29,4 @@ #include "H5PTpublic.h" /* packet table */ #include "H5LDpublic.h" /* lite dataset */ -#endif /*H5_INCLUDE_HL*/ +#endif /*HDF5_HL_H*/