From bfeb1b0dd5b7b2e4a706ff9b9515bba15e673f31 Mon Sep 17 00:00:00 2001
From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com>
Date: Mon, 12 Jun 2023 22:04:49 -0500
Subject: Fix doxygen and actions - merge from develop (#3109)
* Update the workflows to changes in develop
* Disable java for error only action
* Fix Fortran doxygen
* add fortran alias
* Merge changes from develop to fix actions
---
.github/workflows/cmake-ctest.yml | 12 ++-
.github/workflows/main.yml | 72 ++++++++++++++----
.github/workflows/release.yml | 13 +++-
doxygen/Doxyfile.in | 2 +-
doxygen/aliases | 2 +
doxygen/dox/LearnBasics3.dox | 2 +-
fortran/src/H5Aff.F90 | 142 ++++++++++++++++++-----------------
fortran/src/H5Dff.F90 | 70 ++++++++---------
fortran/src/H5ESff.F90 | 28 +++++--
fortran/src/H5Fff.F90 | 30 ++++----
fortran/src/H5Gff.F90 | 39 +++++-----
fortran/src/H5Lff.F90 | 47 ++++++------
fortran/src/H5Off.F90 | 129 +++++++++++++++++---------------
fortran/src/H5Pff.F90 | 100 ++++++++++++++++---------
fortran/src/H5Tff.F90 | 14 ++--
fortran/src/H5VLff.F90 | 42 +++++------
java/src/hdf/hdf5lib/H5.java | 4 +-
java/src/hdf/hdf5lib/HDFArray.java | 2 +
java/src/jni/h5Constants.c | 8 ++
java/src/jni/h5aImp.c | 25 ++++---
java/src/jni/h5dImp.c | 21 +++---
java/src/jni/h5lImp.c | 8 +-
java/src/jni/h5pDAPLImp.c | 2 +
java/src/jni/h5pFAPLImp.c | 2 +
java/src/jni/h5util.c | 149 +++++++++++++------------------------
src/H5FDpublic.h | 6 ++
26 files changed, 530 insertions(+), 441 deletions(-)
diff --git a/.github/workflows/cmake-ctest.yml b/.github/workflows/cmake-ctest.yml
index 083b595..a113dfa 100644
--- a/.github/workflows/cmake-ctest.yml
+++ b/.github/workflows/cmake-ctest.yml
@@ -96,7 +96,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install CMake Dependencies (Linux)
- run: sudo apt-get install ninja-build
+ run: sudo apt-get install ninja-build doxygen graphviz
- name: Set file base name (Linux)
id: set-file-base
@@ -151,6 +151,14 @@ jobs:
path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2204.tar.gz
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
+ # Save doxygen files created by ctest script
+ - name: Save published doxygen (Linux)
+ uses: actions/upload-artifact@v3
+ with:
+ name: docs-doxygen
+ path: ${{ runner.workspace }}/hdf5/build/ci-StdShar-GNUC/hdf5lib_docs/html
+ if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
+
build_and_test_mac:
# MacOS w/ Clang + CMake
#
@@ -158,7 +166,7 @@ jobs:
runs-on: macos-11
steps:
- name: Install Dependencies (MacOS)
- run: brew install ninja
+ run: brew install ninja doxygen
- name: Set file base name (MacOS)
id: set-file-base
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index da65941..5dee711 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -81,6 +81,7 @@ jobs:
cpp: ON
fortran: OFF
java: ON
+ docs: OFF
libaecfc: ON
localaec: OFF
zlibfc: ON
@@ -88,6 +89,7 @@ jobs:
parallel: OFF
mirror_vfd: OFF
direct_vfd: OFF
+ ros3_vfd: OFF
generator: "-G \"Visual Studio 17 2022\" -A x64"
run_tests: true
@@ -100,6 +102,7 @@ jobs:
cpp: ON
fortran: ON
java: ON
+ docs: ON
libaecfc: ON
localaec: OFF
zlibfc: ON
@@ -107,6 +110,7 @@ jobs:
parallel: OFF
mirror_vfd: ON
direct_vfd: ON
+ ros3_vfd: OFF
toolchain: "config/toolchain/gcc.cmake"
generator: "-G Ninja"
run_tests: true
@@ -120,9 +124,11 @@ jobs:
cpp: enable
fortran: enable
java: enable
+ docs: disable
parallel: disable
mirror_vfd: enable
direct_vfd: enable
+ ros3_vfd: enable
deprec_sym: enable
default_api: v114
szip: yes
@@ -141,9 +147,11 @@ jobs:
cpp: disable
fortran: enable
java: disable
+ docs: disable
parallel: enable
mirror_vfd: disable
direct_vfd: disable
+ ros3_vfd: disable
deprec_sym: enable
default_api: v114
szip: yes
@@ -157,10 +165,11 @@ jobs:
# We could also build with the Autotools via brew installing them,
# but that seems unnecessary
- name: "MacOS Clang CMake"
- os: macos-11
+ os: macos-13
cpp: ON
fortran: OFF
java: ON
+ docs: OFF
libaecfc: ON
localaec: OFF
zlibfc: ON
@@ -168,6 +177,7 @@ jobs:
parallel: OFF
mirror_vfd: ON
direct_vfd: OFF
+ ros3_vfd: OFF
toolchain: "config/toolchain/clang.cmake"
generator: "-G Ninja"
run_tests: true
@@ -186,9 +196,11 @@ jobs:
cpp: enable
fortran: enable
java: enable
+ docs: disable
parallel: disable
mirror_vfd: enable
direct_vfd: enable
+ ros3_vfd: enable
deprec_sym: enable
default_api: v16
szip: yes
@@ -209,9 +221,11 @@ jobs:
cpp: enable
fortran: enable
java: enable
+ docs: disable
parallel: disable
mirror_vfd: enable
direct_vfd: enable
+ ros3_vfd: enable
deprec_sym: enable
default_api: v18
szip: yes
@@ -232,9 +246,11 @@ jobs:
cpp: enable
fortran: enable
java: enable
+ docs: disable
parallel: disable
mirror_vfd: enable
direct_vfd: enable
+ ros3_vfd: enable
deprec_sym: enable
default_api: v110
szip: yes
@@ -255,9 +271,11 @@ jobs:
cpp: enable
fortran: enable
java: enable
+ docs: disable
parallel: disable
mirror_vfd: enable
direct_vfd: enable
+ ros3_vfd: enable
deprec_sym: enable
default_api: v112
szip: yes
@@ -278,9 +296,11 @@ jobs:
cpp: enable
fortran: enable
java: enable
+ docs: disable
parallel: disable
mirror_vfd: enable
direct_vfd: enable
+ ros3_vfd: enable
deprec_sym: disable
default_api: default
szip: yes
@@ -302,9 +322,11 @@ jobs:
cpp: enable
fortran: disable
java: disable
+ docs: disable
parallel: disable
mirror_vfd: disable
direct_vfd: enable
+ ros3_vfd: disable
deprec_sym: enable
default_api: v114
szip: yes
@@ -326,9 +348,11 @@ jobs:
cpp: enable
fortran: disable
java: disable
+ docs: disable
parallel: disable
mirror_vfd: disable
direct_vfd: enable
+ ros3_vfd: disable
deprec_sym: enable
default_api: v114
szip: yes
@@ -350,9 +374,11 @@ jobs:
cpp: disable
fortran: disable
java: disable
+ docs: disable
parallel: enable
mirror_vfd: disable
direct_vfd: enable
+ ros3_vfd: disable
deprec_sym: enable
default_api: v114
toolchain: ""
@@ -373,9 +399,11 @@ jobs:
cpp: disable
fortran: disable
java: disable
+ docs: disable
parallel: enable
mirror_vfd: disable
direct_vfd: enable
+ ros3_vfd: disable
deprec_sym: enable
default_api: v114
toolchain: ""
@@ -411,17 +439,18 @@ jobs:
run: echo '${{ toJSON(matrix) }}'
- name: Install CMake Dependencies (Linux)
- run: sudo apt-get install ninja-build
+ run: sudo apt-get install ninja-build doxygen graphviz
if: matrix.os == 'ubuntu-latest'
- name: Install Autotools Dependencies (Linux, serial)
run: |
sudo apt update
sudo apt install automake autoconf libtool libtool-bin
- sudo apt install gcc-11 g++-11 gfortran-11
- echo "CC=gcc-11" >> $GITHUB_ENV
- echo "CXX=g++-11" >> $GITHUB_ENV
- echo "FC=gfortran-11" >> $GITHUB_ENV
+ sudo apt install gcc-12 g++-12 gfortran-12
+ sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
+ echo "CC=gcc-12" >> $GITHUB_ENV
+ echo "CXX=g++-12" >> $GITHUB_ENV
+ echo "FC=gfortran-12" >> $GITHUB_ENV
sudo apt install libaec0 libaec-dev
if: (matrix.generator == 'autogen') && (matrix.parallel != 'enable')
@@ -440,8 +469,8 @@ jobs:
if: matrix.os == 'windows-latest'
- name: Install Dependencies (macOS)
- run: brew install ninja
- if: matrix.os == 'macos-11'
+ run: brew install ninja doxygen
+ if: matrix.os == 'macos-13'
- name: Set environment for MSVC (Windows)
run: |
@@ -463,7 +492,7 @@ jobs:
sh ./autogen.sh
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
- ${{ matrix.flags }} $GITHUB_WORKSPACE/configure --enable-build-mode=${{ matrix.build_mode.autotools }} --${{ matrix.deprec_sym }}-deprecated-symbols --with-default-api-version=${{ matrix.default_api }} --enable-shared --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --${{ matrix.java }}-java --${{ matrix.mirror_vfd }}-mirror-vfd --${{ matrix.direct_vfd }}-direct-vfd --with-szlib=${{ matrix.szip }}
+ ${{ matrix.flags }} $GITHUB_WORKSPACE/configure --enable-build-mode=${{ matrix.build_mode.autotools }} --${{ matrix.deprec_sym }}-deprecated-symbols --with-default-api-version=${{ matrix.default_api }} --enable-shared --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --${{ matrix.java }}-java --${{ matrix.mirror_vfd }}-mirror-vfd --${{ matrix.direct_vfd }}-direct-vfd --${{ matrix.ros3_vfd }}-ros3-vfd --with-szlib=${{ matrix.szip }}
shell: bash
if: (matrix.generator == 'autogen') && ! (matrix.thread_safety.enabled)
@@ -472,7 +501,7 @@ jobs:
sh ./autogen.sh
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
- ${{ matrix.flags }} $GITHUB_WORKSPACE/configure --enable-build-mode=${{ matrix.build_mode.autotools }} --enable-shared --enable-threadsafe --disable-hl --${{ matrix.parallel }}-parallel --${{ matrix.mirror_vfd }}-mirror-vfd --${{ matrix.direct_vfd }}-direct-vfd --with-szlib=${{ matrix.szip }}
+ ${{ matrix.flags }} $GITHUB_WORKSPACE/configure --enable-build-mode=${{ matrix.build_mode.autotools }} --enable-shared --enable-threadsafe --disable-hl --${{ matrix.parallel }}-parallel --${{ matrix.mirror_vfd }}-mirror-vfd --${{ matrix.direct_vfd }}-direct-vfd --${{ matrix.ros3_vfd }}-ros3-vfd --with-szlib=${{ matrix.szip }}
shell: bash
if: (matrix.generator == 'autogen') && (matrix.thread_safety.enabled)
@@ -484,7 +513,7 @@ jobs:
run: |
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
- cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_mode.cmake }} -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=${{ matrix.java }} -DBUILD_SZIP_WITH_FETCHCONTENT=${{ matrix.libaecfc }} -DLIBAEC_USE_LOCALCONTENT=${{ matrix.localaec }} -DBUILD_ZLIB_WITH_FETCHCONTENT=${{ matrix.zlibfc }} -DZLIB_USE_LOCALCONTENT=${{ matrix.localzlib }} -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} $GITHUB_WORKSPACE
+ cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_mode.cmake }} -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=${{ matrix.java }} -DHDF5_BUILD_DOC=${{ matrix.docs }} -DBUILD_SZIP_WITH_FETCHCONTENT=${{ matrix.libaecfc }} -DLIBAEC_USE_LOCALCONTENT=${{ matrix.localaec }} -DBUILD_ZLIB_WITH_FETCHCONTENT=${{ matrix.zlibfc }} -DZLIB_USE_LOCALCONTENT=${{ matrix.localzlib }} -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} -DHDF5_ENABLE_ROS3_VFD:BOOL=${{ matrix.ros3_vfd }} $GITHUB_WORKSPACE
shell: bash
if: (matrix.generator != 'autogen') && ! (matrix.thread_safety.enabled)
@@ -493,7 +522,7 @@ jobs:
run: |
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
- cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_mode.cmake }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_THREADSAFE:BOOL=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=OFF -DHDF5_BUILD_FORTRAN:BOOL=OFF -DHDF5_BUILD_JAVA:BOOL=OFF -DHDF5_BUILD_HL_LIB:BOOL=OFF -DBUILD_SZIP_WITH_FETCHCONTENT=${{ matrix.libaecfc }} -DLIBAEC_USE_LOCALCONTENT=${{ matrix.localaec }} -DBUILD_ZLIB_WITH_FETCHCONTENT=${{ matrix.zlibfc }} -DZLIB_USE_LOCALCONTENT=${{ matrix.localzlib }} -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} $GITHUB_WORKSPACE
+ cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_mode.cmake }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_THREADSAFE:BOOL=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=OFF -DHDF5_BUILD_FORTRAN:BOOL=OFF -DHDF5_BUILD_JAVA:BOOL=OFF -DHDF5_BUILD_HL_LIB:BOOL=OFF -DHDF5_BUILD_DOC=OFF -DBUILD_SZIP_WITH_FETCHCONTENT=${{ matrix.libaecfc }} -DLIBAEC_USE_LOCALCONTENT=${{ matrix.localaec }} -DBUILD_ZLIB_WITH_FETCHCONTENT=${{ matrix.zlibfc }} -DZLIB_USE_LOCALCONTENT=${{ matrix.localzlib }} -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} -DHDF5_ENABLE_ROS3_VFD:BOOL=${{ matrix.ros3_vfd }} $GITHUB_WORKSPACE
shell: bash
if: (matrix.generator != 'autogen') && (matrix.thread_safety.enabled)
@@ -523,10 +552,23 @@ jobs:
if: (matrix.generator == 'autogen') && (matrix.run_tests) && ! (matrix.thread_safety.enabled)
- name: CMake Run Tests
- run: ctest --build . --parallel 2 -C ${{ matrix.build_mode.cmake }} -V
+ run: ctest . --parallel 2 -C ${{ matrix.build_mode.cmake }} -V
working-directory: ${{ runner.workspace }}/build
- # Skip Debug MSVC while we investigate H5L Java test timeouts
- if: (matrix.generator != 'autogen') && (matrix.run_tests) && ! ((matrix.name == 'Windows MSVC CMake') && (matrix.build_mode.cmake == 'Debug'))
+ if: (matrix.generator != 'autogen') && (matrix.run_tests) && ! (matrix.thread_safety.enabled)
+
+ # THREAD-SAFE
+
+ - name: Autotools Run Thread-Safe Tests
+ run: |
+ cd test
+ ./ttsafe
+ working-directory: ${{ runner.workspace }}/build
+ if: (matrix.generator == 'autogen') && (matrix.run_tests) && (matrix.thread_safety.enabled)
+
+ - name: CMake Run Thread-Safe Tests
+ run: ctest . --parallel 2 -C ${{ matrix.build_mode.cmake }} -V -R ttsafe
+ working-directory: ${{ runner.workspace }}/build
+ if: (matrix.generator != 'autogen') && (matrix.run_tests) && (matrix.thread_safety.enabled)
#
# INSTALL (note that this runs even when we don't run the tests)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 16285d6..ac22bdd 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -48,13 +48,19 @@ jobs:
getfiles:
runs-on: ubuntu-latest
steps:
- - name: Set file base name
- id: set-file-base
+ - name: Get file base name
+ id: get-file-base
run: |
FILE_NAME_BASE=$(echo "${{ inputs.file_base }}")
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT
# Get files created by tarball script
+ - name: Get doxygen (Linux)
+ uses: actions/download-artifact@v3
+ with:
+ name: docs-doxygen
+ path: ${{ github.workspace }}/${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen
+
- name: Get tgz-tarball (Linux)
uses: actions/download-artifact@v3
with:
@@ -95,7 +101,7 @@ jobs:
permissions:
contents: write
steps:
- - name: Set file base name
+ - name: Get file base name
id: get-file-base
run: |
FILE_NAME_BASE=$(echo "${{ inputs.file_base }}")
@@ -107,6 +113,7 @@ jobs:
tag_name: "snapshot"
prerelease: true
files: |
+ ${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen
${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-osx12.tar.gz
diff --git a/doxygen/Doxyfile.in b/doxygen/Doxyfile.in
index 66e4826..cddf17c 100644
--- a/doxygen/Doxyfile.in
+++ b/doxygen/Doxyfile.in
@@ -625,7 +625,7 @@ WARN_NO_PARAMDOC = NO
# a warning is encountered.
# The default value is: NO.
-WARN_AS_ERROR = NO
+WARN_AS_ERROR = FAIL_ON_WARNINGS
# The WARN_FORMAT tag determines the format of the warning messages that doxygen
# can produce. The string should contain the $file, $line, and $text tags, which
diff --git a/doxygen/aliases b/doxygen/aliases
index bfafd7e..367881c 100644
--- a/doxygen/aliases
+++ b/doxygen/aliases
@@ -384,4 +384,6 @@ ALIASES += fortran_file="Pointer to filename the async subroutine is being calle
ALIASES += fortran_func="Pointer to function name the async subroutine is being called in, func must be null character terminated"
ALIASES += fortran_line="Line number the async subroutine is being called at"
ALIASES += fortran_plist_id="Property list identifier"
+ALIASES += fortran_es_id="Event set identifier"
+ALIASES += fortran_vol_name="Connector name"
diff --git a/doxygen/dox/LearnBasics3.dox b/doxygen/dox/LearnBasics3.dox
index 06afacd..7487458 100644
--- a/doxygen/dox/LearnBasics3.dox
+++ b/doxygen/dox/LearnBasics3.dox
@@ -945,7 +945,7 @@ For a more complete script (and to help resolve issues) see the script provided
\subsection subsecLBCompilingCMakeExamples HDF5 Examples
The installed HDF5 can be verified by compiling the HDF5 Examples project, included with the CMake built HDF5 binaries
-in the share folder or you can go to the HDF5 Examples github repository.
+in the share folder or you can go to the HDF5 Examples github repository.
Go into the share directory and follow the instructions in USING_CMake_examples.txt to build the examples.
diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90
index 2f1e6d0..b30044d 100644
--- a/fortran/src/H5Aff.F90
+++ b/fortran/src/H5Aff.F90
@@ -96,12 +96,12 @@ MODULE H5A
! Interface for the function used to pass the C pointer of the buffer
! to the C H5Awrite routine
INTERFACE
- INTEGER FUNCTION h5awrite_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5awrite_f_c')
+ INTEGER FUNCTION h5awrite_f_c(attr_id, memtype_id, buf) BIND(C, NAME='h5awrite_f_c')
IMPORT :: c_ptr
IMPORT :: HID_T
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: attr_id
- INTEGER(HID_T), INTENT(IN) :: mem_type_id
+ INTEGER(HID_T), INTENT(IN) :: memtype_id
TYPE(C_PTR), VALUE :: buf
END FUNCTION h5awrite_f_c
END INTERFACE
@@ -109,12 +109,12 @@ MODULE H5A
! Interface for the function used to pass the C pointer of the buffer
! to the C H5Aread routine
INTERFACE
- INTEGER FUNCTION h5aread_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5aread_f_c')
+ INTEGER FUNCTION h5aread_f_c(attr_id, memtype_id, buf) BIND(C, NAME='h5aread_f_c')
IMPORT :: c_ptr
IMPORT :: HID_T
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: attr_id
- INTEGER(HID_T), INTENT(IN) :: mem_type_id
+ INTEGER(HID_T), INTENT(IN) :: memtype_id
TYPE(C_PTR), VALUE :: buf
END FUNCTION h5aread_f_c
END INTERFACE
@@ -207,7 +207,7 @@ CONTAINS
!! \param type_id Attribute datatype identifier
!! \param space_id Attribute dataspace identifier
!! \param attr_id Attribute identifier
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param acpl_id Attribute creation property list identifier
!! \param aapl_id Attribute access property list identifier
@@ -229,8 +229,8 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T) , INTENT(IN), OPTIONAL :: acpl_id
INTEGER(HID_T) , INTENT(IN), OPTIONAL :: aapl_id
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
INTEGER(HID_T) :: acpl_id_default
@@ -238,7 +238,6 @@ CONTAINS
TYPE(C_PTR) :: file_default = C_NULL_PTR
TYPE(C_PTR) :: func_default = C_NULL_PTR
INTEGER(KIND=C_INT) :: line_default = 0
-
CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name
INTERFACE
@@ -583,7 +582,7 @@ CONTAINS
!! \brief Closes the specified attribute.
!!
!! \param attr_id Attribute identifier
-!! \param hdferr \fortran_error
+!! \param hdferr \fortran_error
!!
!! See C API: @ref H5Aclose()
!!
@@ -609,7 +608,7 @@ CONTAINS
!! \brief Asynchronously closes the specified attribute.
!!
!! \param attr_id Attribute identifier
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param file \fortran_file
!! \param func \fortran_func
@@ -622,8 +621,8 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) :: attr_id
INTEGER(HID_T), INTENT(IN) :: es_id
INTEGER, INTENT(OUT) :: hdferr
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
TYPE(C_PTR) :: file_default = C_NULL_PTR
@@ -779,6 +778,7 @@ CONTAINS
!! \param obj_name Name of object, relative to location, whose attribute is to be renamed
!! \param old_attr_name Prior attribute name
!! \param new_attr_name New attribute name
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param lapl_id Link access property list identifier
!! \param file \fortran_file
@@ -797,8 +797,8 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) :: es_id
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN), OPTIONAL :: lapl_id
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
INTEGER(HID_T) :: lapl_id_default
@@ -891,7 +891,7 @@ CONTAINS
!! \param obj_id Identifier for object to which attribute is attached
!! \param attr_name Name of attribute to open
!! \param attr_id Attribute identifier
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param aapl_id Attribute access property list
!! \param file \fortran_file
@@ -908,8 +908,8 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) :: es_id
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN), OPTIONAL :: aapl_id
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN) , OPTIONAL :: line
INTEGER(HID_T) :: aapl_id_default
@@ -1155,7 +1155,7 @@ CONTAINS
!! \li H5_ITER_N_F - Number of iteration orders
!! \param n Attribute’s position in index.
!! \param attr_id Attribute identifier.
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param aapl_id Attribute access property list.
!! \param lapl_id Link access property list.
@@ -1178,8 +1178,8 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN), OPTIONAL :: aapl_id
INTEGER(HID_T), INTENT(IN), OPTIONAL :: lapl_id
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN) , OPTIONAL :: line
INTEGER(HID_T) :: aapl_id_default
@@ -1507,7 +1507,7 @@ CONTAINS
!! \param type_id Attribute datatype identifier
!! \param space_id Attribute dataspace identifier
!! \param attr An attribute identifier
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param acpl_id Attribute creation property list identifier (Currently not used.)
!! \param aapl_id Attribute access property list identifier (Currently not used.)
@@ -1534,8 +1534,8 @@ CONTAINS
INTEGER(HID_T), INTENT(IN), OPTIONAL :: acpl_id
INTEGER(HID_T), INTENT(IN), OPTIONAL :: aapl_id
INTEGER(HID_T), INTENT(IN), OPTIONAL :: lapl_id
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
INTEGER(HID_T) :: acpl_id_default
@@ -1644,8 +1644,10 @@ CONTAINS
!!
!! \param obj_id Object identifier
!! \param attr_name Attribute name
-!! \param attr_exists Pointer to attribute exists status, must be of type LOGICAL(C_BOOL) and initialize to .FALSE.
-!! \param es_id \es_id
+!! \param attr_exists Pointer to attribute exists status. It should be declared INTEGER(C_INT) and initialized
+!! to zero (false) for portability. It will return one when true. LOGICAL(C_BOOL) is also
+!! acceptable but may encounter atypical anomalies. It should be initialized to false when used.
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param file \fortran_file
!! \param func \fortran_func
@@ -1657,11 +1659,11 @@ CONTAINS
IMPLICIT NONE
INTEGER(HID_T) , INTENT(IN) :: obj_id
CHARACTER(LEN=*), INTENT(IN) :: attr_name
- TYPE(C_PTR) , INTENT(INOUT) :: attr_exists
+ TYPE(C_PTR) , INTENT(IN) :: attr_exists
INTEGER(HID_T) , INTENT(IN) :: es_id
INTEGER , INTENT(OUT) :: hdferr
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
CHARACTER(LEN=LEN_TRIM(attr_name)+1,KIND=C_CHAR) :: c_attr_name
@@ -1760,7 +1762,7 @@ CONTAINS
!! \param obj_name Object name either relative to loc_id, absolute from the file’s root group, or '. '(a dot)
!! \param attr_name Attribute name
!! \param attr_exists Pointer to attribute exists status, must be of type LOGICAL(C_BOOL) and initialize to .FALSE.
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param lapl_id Link access property list identifier
!! \param file \fortran_file
@@ -1774,12 +1776,12 @@ CONTAINS
INTEGER (HID_T), INTENT(IN) :: loc_id
CHARACTER(LEN=*), INTENT(IN) :: obj_name
CHARACTER(LEN=*), INTENT(IN) :: attr_name
- TYPE(C_PTR) , INTENT(INOUT) :: attr_exists
+ TYPE(C_PTR) , INTENT(IN) :: attr_exists
INTEGER (HID_T), INTENT(IN) :: es_id
INTEGER , INTENT(OUT) :: hdferr
INTEGER (HID_T), INTENT(IN) , OPTIONAL :: lapl_id
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN) , OPTIONAL :: line
INTEGER(HID_T) :: lapl_id_default
@@ -1890,7 +1892,7 @@ CONTAINS
!! \param obj_name Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot)
!! \param attr_name Attribute name
!! \param attr_id Attribute identifier
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param aapl_id Attribute access property list (Currently unused; should be passed in as H5P_DEFAULT.)
!! \param lapl_id Link access property list identifier
@@ -1912,8 +1914,8 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN), OPTIONAL :: aapl_id
INTEGER(HID_T), INTENT(IN), OPTIONAL :: lapl_id
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
INTEGER(HID_T) :: aapl_id_default
@@ -2010,7 +2012,7 @@ CONTAINS
!! \param loc_id Location or object identifier; may be dataset or group
!! \param old_attr_name Prior attribute name
!! \param new_attr_name New attribute name
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param file \fortran_file
!! \param func \fortran_func
@@ -2026,8 +2028,8 @@ CONTAINS
CHARACTER(LEN=*), INTENT(IN) :: new_attr_name
INTEGER(HID_T), INTENT(IN) :: es_id
INTEGER, INTENT(OUT) :: hdferr
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
TYPE(C_PTR) :: file_default = C_NULL_PTR
@@ -2073,7 +2075,7 @@ CONTAINS
!! \param attr_id Identifier of an attribute to read.
!! \param memtype_id Identifier of the attribute datatype (in memory).
!! \param buf Buffer for data to be read.
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param file \fortran_file
!! \param func \fortran_func
@@ -2082,15 +2084,15 @@ CONTAINS
!! See C API: @ref H5Aread_async()
!!
- SUBROUTINE h5aread_async_f(attr_id, mem_type_id, buf, es_id, hdferr, file, func, line)
+ SUBROUTINE h5aread_async_f(attr_id, memtype_id, buf, es_id, hdferr, file, func, line)
IMPLICIT NONE
- INTEGER(HID_T), INTENT(IN) :: attr_id
- INTEGER(HID_T), INTENT(IN) :: mem_type_id
- TYPE(C_PTR) , INTENT(OUT) :: buf
- INTEGER(HID_T), INTENT(IN) :: es_id
- INTEGER , INTENT(OUT) :: hdferr
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ INTEGER(HID_T), INTENT(IN) :: attr_id
+ INTEGER(HID_T), INTENT(IN) :: memtype_id
+ TYPE(C_PTR) , INTENT(IN) :: buf
+ INTEGER(HID_T), INTENT(IN) :: es_id
+ INTEGER , INTENT(OUT) :: hdferr
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
TYPE(C_PTR) :: file_default = C_NULL_PTR
@@ -2098,7 +2100,7 @@ CONTAINS
INTEGER(KIND=C_INT) :: line_default = 0
INTERFACE
- INTEGER FUNCTION H5Aread_async(file, func, line, attr_id, mem_type_id, buf, es_id) &
+ INTEGER FUNCTION H5Aread_async(file, func, line, attr_id, memtype_id, buf, es_id) &
BIND(C,NAME='H5Aread_async')
IMPORT :: C_CHAR, C_INT, C_PTR
IMPORT :: HID_T
@@ -2107,7 +2109,7 @@ CONTAINS
TYPE(C_PTR), VALUE :: func
INTEGER(C_INT), VALUE :: line
INTEGER(HID_T), VALUE :: attr_id
- INTEGER(HID_T), VALUE :: mem_type_id
+ INTEGER(HID_T), VALUE :: memtype_id
TYPE(C_PTR) , VALUE :: buf
INTEGER(HID_T), VALUE :: es_id
END FUNCTION H5Aread_async
@@ -2117,7 +2119,7 @@ CONTAINS
IF (PRESENT(func)) func_default = func
IF (PRESENT(line)) line_default = INT(line, C_INT)
- hdferr = H5Aread_async(file_default, func_default, line_default, attr_id, mem_type_id, buf, es_id)
+ hdferr = H5Aread_async(file_default, func_default, line_default, attr_id, memtype_id, buf, es_id)
END SUBROUTINE h5aread_async_f
@@ -2129,7 +2131,7 @@ CONTAINS
!! \param attr_id Identifier of an attribute to read.
!! \param memtype_id Identifier of the attribute datatype (in memory).
!! \param buf Data to be written.
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param file \fortran_file
!! \param func \fortran_func
@@ -2138,13 +2140,13 @@ CONTAINS
!! See C API: @ref H5Awrite_async()
!!
- SUBROUTINE h5awrite_async_f(attr_id, mem_type_id, buf, es_id, hdferr, file, func, line)
+ SUBROUTINE h5awrite_async_f(attr_id, memtype_id, buf, es_id, hdferr, file, func, line)
IMPLICIT NONE
- INTEGER(HID_T), INTENT(IN) :: attr_id
- INTEGER(HID_T), INTENT(IN) :: mem_type_id
- TYPE(C_PTR) , INTENT(IN) :: buf
- INTEGER(HID_T), INTENT(IN) :: es_id
- INTEGER , INTENT(OUT) :: hdferr
+ INTEGER(HID_T), INTENT(IN) :: attr_id
+ INTEGER(HID_T), INTENT(IN) :: memtype_id
+ TYPE(C_PTR) , INTENT(IN) :: buf
+ INTEGER(HID_T), INTENT(IN) :: es_id
+ INTEGER , INTENT(OUT) :: hdferr
TYPE(C_PTR), OPTIONAL :: file
TYPE(C_PTR), OPTIONAL :: func
INTEGER , INTENT(IN), OPTIONAL :: line
@@ -2154,7 +2156,7 @@ CONTAINS
INTEGER(KIND=C_INT) :: line_default = 0
INTERFACE
- INTEGER FUNCTION H5Awrite_async(file, func, line, attr_id, mem_type_id, buf, es_id) &
+ INTEGER FUNCTION H5Awrite_async(file, func, line, attr_id, memtype_id, buf, es_id) &
BIND(C,NAME='H5Awrite_async')
IMPORT :: C_CHAR, C_INT, C_PTR
IMPORT :: HID_T
@@ -2163,7 +2165,7 @@ CONTAINS
TYPE(C_PTR), VALUE :: func
INTEGER(C_INT), VALUE :: line
INTEGER(HID_T), VALUE :: attr_id
- INTEGER(HID_T), VALUE :: mem_type_id
+ INTEGER(HID_T), VALUE :: memtype_id
TYPE(C_PTR) , VALUE :: buf
INTEGER(HID_T), VALUE :: es_id
END FUNCTION H5Awrite_async
@@ -2173,7 +2175,7 @@ CONTAINS
IF (PRESENT(func)) func_default = func
IF (PRESENT(line)) line_default = INT(line, C_INT)
- hdferr = H5Awrite_async(file_default, func_default, line_default, attr_id, mem_type_id, buf, es_id)
+ hdferr = H5Awrite_async(file_default, func_default, line_default, attr_id, memtype_id, buf, es_id)
END SUBROUTINE h5awrite_async_f
@@ -2239,10 +2241,10 @@ CONTAINS
!! See C API: @ref H5Aread()
!!
SUBROUTINE h5aread_f(attr_id, memtype_id, buf, hdferr)
- INTEGER(HID_T), INTENT(IN) :: attr_id
- INTEGER(HID_T), INTENT(IN) :: memtype_id
- TYPE(C_PTR) , INTENT(INOUT) :: buf
- INTEGER , INTENT(OUT) :: hdferr
+ INTEGER(HID_T), INTENT(IN) :: attr_id
+ INTEGER(HID_T), INTENT(IN) :: memtype_id
+ TYPE(C_PTR) , INTENT(IN) :: buf
+ INTEGER , INTENT(OUT) :: hdferr
END SUBROUTINE h5aread_f
!>
@@ -2299,14 +2301,14 @@ CONTAINS
END SUBROUTINE h5awrite_char_scalar_fix
- SUBROUTINE h5awrite_ptr(attr_id, mem_type_id, buf, hdferr)
+ SUBROUTINE h5awrite_ptr(attr_id, memtype_id, buf, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: attr_id
- INTEGER(HID_T), INTENT(IN) :: mem_type_id
+ INTEGER(HID_T), INTENT(IN) :: memtype_id
TYPE(C_PTR), INTENT(IN), TARGET :: buf
INTEGER, INTENT(OUT) :: hdferr
- hdferr = H5Awrite_f_c(attr_id, mem_type_id, buf)
+ hdferr = H5Awrite_f_c(attr_id, memtype_id, buf)
END SUBROUTINE h5awrite_ptr
@@ -2337,14 +2339,14 @@ CONTAINS
END SUBROUTINE h5aread_char_scalar_fix
- SUBROUTINE h5aread_ptr(attr_id, mem_type_id, buf, hdferr)
+ SUBROUTINE h5aread_ptr(attr_id, memtype_id, buf, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: attr_id
- INTEGER(HID_T), INTENT(IN) :: mem_type_id
+ INTEGER(HID_T), INTENT(IN) :: memtype_id
TYPE(C_PTR), INTENT(INOUT) :: buf
INTEGER, INTENT(OUT) :: hdferr
- hdferr = H5Aread_f_c(attr_id, mem_type_id, buf)
+ hdferr = H5Aread_f_c(attr_id, memtype_id, buf)
END SUBROUTINE h5aread_ptr
diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90
index 06034ac..5b571e5 100644
--- a/fortran/src/H5Dff.F90
+++ b/fortran/src/H5Dff.F90
@@ -287,7 +287,7 @@ CONTAINS
!! \param type_id Dataset datatype identifier
!! \param space_id Dataset dataspace identifier
!! \param dset_id Dataset identifier
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param dcpl_id Dataset creation property list
!! \param lcpl_id Link creation property list
@@ -311,8 +311,8 @@ CONTAINS
INTEGER(HID_T), INTENT(IN), OPTIONAL :: dcpl_id
INTEGER(HID_T), INTENT(IN), OPTIONAL :: lcpl_id
INTEGER(HID_T), INTENT(IN), OPTIONAL :: dapl_id
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
INTEGER(HID_T) :: lcpl_id_default
@@ -422,7 +422,7 @@ CONTAINS
!! \param loc_id File or group identifier
!! \param name Dataset name
!! \param dset_id Dataset identifier
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param dapl_id Dataset access property list
!! \param file \fortran_file
@@ -439,8 +439,8 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) :: es_id
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN), OPTIONAL :: dapl_id
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
INTEGER(HID_T) :: dapl_id_default
@@ -515,7 +515,7 @@ CONTAINS
!! \brief Asynchronously closes a dataset.
!!
!! \param dset_id Dataset identifier
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param file \fortran_file
!! \param func \fortran_func
@@ -528,8 +528,8 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) :: dset_id
INTEGER(HID_T), INTENT(IN) :: es_id
INTEGER, INTENT(OUT) :: hdferr
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
TYPE(C_PTR) :: file_default = C_NULL_PTR
@@ -659,7 +659,7 @@ CONTAINS
!!
!! \param dataset_id Dataset identifier
!! \param fsize Array containing the new magnitude of each dimension
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param file \fortran_file
!! \param func \fortran_func
@@ -673,8 +673,8 @@ CONTAINS
INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: fsize
INTEGER(HID_T), INTENT(IN) :: es_id
INTEGER, INTENT(OUT) :: hdferr
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
TYPE(C_PTR) :: file_default = C_NULL_PTR
@@ -1363,7 +1363,7 @@ CONTAINS
!!
!! \param dataset_id Dataset identifier.
!! \param dataspace_id Dataspace identifier.
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param file \fortran_file
!! \param func \fortran_func
@@ -1377,8 +1377,8 @@ CONTAINS
INTEGER(HID_T), INTENT(OUT) :: dataspace_id
INTEGER(HID_T), INTENT(IN) :: es_id
INTEGER, INTENT(OUT) :: hdferr
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
TYPE(C_PTR) :: file_default = C_NULL_PTR
@@ -1455,11 +1455,11 @@ CONTAINS
!!
SUBROUTINE h5dvlen_reclaim_f(type_id, space_id, plist_id, buf, hdferr)
IMPLICIT NONE
- INTEGER(HID_T), INTENT(IN) :: type_id
- INTEGER(HID_T), INTENT(IN) :: space_id
- INTEGER(HID_T), INTENT(IN) :: plist_id
- TYPE(C_PTR) , INTENT(INOUT) :: buf
- INTEGER , INTENT(OUT) :: hdferr
+ INTEGER(HID_T), INTENT(IN) :: type_id
+ INTEGER(HID_T), INTENT(IN) :: space_id
+ INTEGER(HID_T), INTENT(IN) :: plist_id
+ TYPE(C_PTR) , INTENT(IN) :: buf
+ INTEGER , INTENT(OUT) :: hdferr
INTERFACE
INTEGER FUNCTION h5dvlen_reclaim_c(type_id, space_id, plist_id, buf) BIND(C, NAME='h5dvlen_reclaim_c')
@@ -1485,7 +1485,7 @@ CONTAINS
!! \param dset_id Identifier of the dataset read from.
!! \param mem_type_id Identifier of the memory datatype.
!! \param buf Buffer to receive data read from file.
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param mem_space_id Identifier of the memory dataspace.
!! \param file_space_id Identifier of dataset's dataspace in the file. (Default: H5S_ALL_F)
@@ -1502,14 +1502,14 @@ CONTAINS
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: dset_id
INTEGER(HID_T), INTENT(IN) :: mem_type_id
- TYPE(C_PTR), INTENT(INOUT) :: buf
+ TYPE(C_PTR), INTENT(IN) :: buf
INTEGER(HID_T), INTENT(IN) :: es_id
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN), OPTIONAL :: mem_space_id
INTEGER(HID_T), INTENT(IN), OPTIONAL :: file_space_id
INTEGER(HID_T), INTENT(IN), OPTIONAL :: xfer_prp
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
TYPE(C_PTR) :: file_default = C_NULL_PTR
@@ -1552,7 +1552,7 @@ CONTAINS
!! \param dset_id Identifier of the dataset to write to.
!! \param mem_type_id Identifier of the memory datatype.
!! \param buf Buffer with data to be written to the file.
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param mem_space_id Identifier of the memory dataspace.
!! \param file_space_id Identifier of the dataset's dataspace in the file.
@@ -1575,8 +1575,8 @@ CONTAINS
INTEGER(HID_T), INTENT(IN), OPTIONAL :: mem_space_id
INTEGER(HID_T), INTENT(IN), OPTIONAL :: file_space_id
INTEGER(HID_T), INTENT(IN), OPTIONAL :: xfer_prp
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
TYPE(C_PTR) :: file_default = C_NULL_PTR
@@ -1662,7 +1662,7 @@ CONTAINS
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: dset_id
INTEGER(HID_T), INTENT(IN) :: mem_type_id
- TYPE(C_PTR), INTENT(INOUT) :: buf
+ TYPE(C_PTR), INTENT(IN) :: buf
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN), OPTIONAL :: mem_space_id
INTEGER(HID_T), INTENT(IN), OPTIONAL :: file_space_id
@@ -1773,9 +1773,9 @@ CONTAINS
SUBROUTINE h5dfill_f(fill_value, fill_type_id, buf, buf_type_id, space_id, hdferr)
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
- TYPE(C_PTR) :: fill_value
+ TYPE(C_PTR), INTENT(IN) :: fill_value
INTEGER(HID_T), INTENT(IN) :: fill_type_id
- TYPE(C_PTR) :: buf
+ TYPE(C_PTR), INTENT(IN) :: buf
INTEGER(HID_T), INTENT(IN) :: buf_type_id
INTEGER(HID_T), INTENT(IN) :: space_id
END SUBROUTINE h5dfill_f
@@ -2101,7 +2101,7 @@ CONTAINS
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: dset_id
INTEGER(HID_T), INTENT(IN) :: mem_type_id
- TYPE(C_PTR), INTENT(INOUT) :: buf
+ TYPE(C_PTR), INTENT(IN) :: buf
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN), OPTIONAL :: mem_space_id
INTEGER(HID_T), INTENT(IN), OPTIONAL :: file_space_id
@@ -2126,9 +2126,9 @@ CONTAINS
SUBROUTINE h5dfill_ptr(fill_value, fill_type_id, buf, buf_type_id, space_id, hdferr)
IMPLICIT NONE
- TYPE(C_PTR) :: fill_value
+ TYPE(C_PTR) , INTENT(IN) :: fill_value
INTEGER(HID_T), INTENT(IN) :: fill_type_id
- TYPE(C_PTR) :: buf
+ TYPE(C_PTR) , INTENT(IN) :: buf
INTEGER(HID_T), INTENT(IN) :: buf_type_id
INTEGER(HID_T), INTENT(IN) :: space_id
INTEGER, INTENT(OUT) :: hdferr
@@ -2288,7 +2288,7 @@ CONTAINS
INTEGER(HID_T), INTENT(IN), DIMENSION(*) :: mem_type_id
INTEGER(HID_T), INTENT(IN), DIMENSION(*) :: mem_space_id
INTEGER(HID_T), INTENT(IN), DIMENSION(*) :: file_space_id
- TYPE(C_PTR), DIMENSION(*) :: buf
+ TYPE(C_PTR), INTENT(IN), DIMENSION(*) :: buf
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN), OPTIONAL :: xfer_prp
@@ -2339,7 +2339,7 @@ CONTAINS
INTEGER(HID_T), INTENT(IN), DIMENSION(*) :: mem_type_id
INTEGER(HID_T), INTENT(IN), DIMENSION(*) :: mem_space_id
INTEGER(HID_T), INTENT(IN), DIMENSION(*) :: file_space_id
- TYPE(C_PTR), DIMENSION(*) :: buf
+ TYPE(C_PTR), INTENT(IN), DIMENSION(*) :: buf
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN), OPTIONAL :: xfer_prp
diff --git a/fortran/src/H5ESff.F90 b/fortran/src/H5ESff.F90
index 5b19a51..f102d23 100644
--- a/fortran/src/H5ESff.F90
+++ b/fortran/src/H5ESff.F90
@@ -18,6 +18,18 @@
! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
+! NOTES
+! _____ __ __ _____ ____ _____ _______ _ _ _______
+! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __|
+! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | ****
+! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | ****
+! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | ****
+! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_|
+!
+! If you add a new H5ES function to the module you must add the function name
+! to the Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
+! This is needed for Windows based operating systems.
+!
MODULE H5ES
@@ -32,7 +44,7 @@ CONTAINS
!!
!! \brief Creates an event set.
!!
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!!
!! See C API: @ref H5EScreate()
@@ -60,7 +72,7 @@ CONTAINS
!!
!! \brief Retrieves number of events in an event set.
!!
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param count The number of events in the event set
!! \param hdferr \fortran_error
!!
@@ -90,7 +102,7 @@ CONTAINS
!!
!! \brief Retrieves the next operation counter to be assigned in an event set.
!!
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param counter The number of events in the event set
!! \param hdferr \fortran_error
!!
@@ -121,7 +133,7 @@ CONTAINS
!!
!! \brief Waits for operations in event set to complete.
!!
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param timeout The number of events in the event set
!! \param num_in_progress The number of operations still in progress
!! \param err_occurred Flag if an operation in the event set failed
@@ -163,7 +175,7 @@ CONTAINS
!!
!! \brief Attempt to cancel operations in an event set.
!!
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param num_not_canceled The number of events not canceled
!! \param err_occurred Status indicating if error is present in the event set
!! \param hdferr \fortran_error
@@ -202,7 +214,7 @@ CONTAINS
!!
!! \brief Checks for failed operations.
!!
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param err_occurred Status indicating if error is present in the event set
!! \param hdferr \fortran_error
!!
@@ -238,7 +250,7 @@ CONTAINS
!!
!! \brief Retrieves the number of failed operations.
!!
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param num_errs Number of errors
!! \param hdferr \fortran_error
!!
@@ -270,7 +282,7 @@ CONTAINS
!!
!! \brief Terminates access to an event set.
!!
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!!
!! See C API: @ref H5ESclose()
diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90
index f1a0d2a..aec149f 100644
--- a/fortran/src/H5Fff.F90
+++ b/fortran/src/H5Fff.F90
@@ -127,7 +127,7 @@ CONTAINS
!! \li H5F_ACC_TRUNC_F
!! \li H5F_ACC_EXCL_F
!! \param file_id File identifier
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param creation_prp File creation property list identifier
!! \param access_prp File access property list identifier
@@ -147,8 +147,8 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN), OPTIONAL :: creation_prp
INTEGER(HID_T), INTENT(IN), OPTIONAL :: access_prp
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
INTEGER(HID_T) :: creation_prp_default
@@ -234,7 +234,7 @@ CONTAINS
!! \param scope Specifies the scope of the flushing action. Possible values are:
!! \li H5F_SCOPE_GLOBAL_F
!! \li H5F_SCOPE_LOCAL_F
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param file \fortran_file
!! \param func \fortran_func
@@ -248,8 +248,8 @@ CONTAINS
INTEGER, INTENT(IN) :: scope
INTEGER(HID_T), INTENT(IN) :: es_id
INTEGER, INTENT(OUT) :: hdferr
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
TYPE(C_PTR) :: file_default = C_NULL_PTR
@@ -418,7 +418,7 @@ CONTAINS
!! \li H5F_ACC_RDWR_F
!! \li H5F_ACC_RDONLY_F
!! \param file_id File identifier
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param access_prp File access property list identifier
!! \param file \fortran_file
@@ -436,8 +436,8 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) :: es_id
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN), OPTIONAL :: access_prp
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
INTEGER(HID_T) :: access_prp_default
@@ -515,7 +515,7 @@ CONTAINS
!!
!! \param file_id Identifier of a file for which an additional identifier is required.
!! \param ret_file_id New file identifier.
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param file \fortran_file
!! \param func \fortran_func
@@ -529,8 +529,8 @@ CONTAINS
INTEGER(HID_T), INTENT(OUT) :: ret_file_id
INTEGER(HID_T), INTENT(IN) :: es_id
INTEGER, INTENT(OUT) :: hdferr
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
TYPE(C_PTR) :: file_default = C_NULL_PTR
@@ -724,7 +724,7 @@ CONTAINS
!! \brief Asynchronously closes HDF5 file.
!!
!! \param file_id File identifier
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param file \fortran_file
!! \param func \fortran_func
@@ -737,8 +737,8 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) :: file_id
INTEGER(HID_T), INTENT(IN) :: es_id
INTEGER, INTENT(OUT) :: hdferr
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
TYPE(C_PTR) :: file_default = C_NULL_PTR
diff --git a/fortran/src/H5Gff.F90 b/fortran/src/H5Gff.F90
index 655c226..c8701a2 100644
--- a/fortran/src/H5Gff.F90
+++ b/fortran/src/H5Gff.F90
@@ -261,7 +261,7 @@ CONTAINS
!! \param loc_id Location identifier.
!! \param name Group name at the specified location.
!! \param grp_id Group identifier.
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param size_hint A parameter indicating the number of bytes to reserve for the names that will appear in the group.
!! Set to OBJECT_NAMELEN_DEFAULT_F if using any of the optional parameters lcpl_id, gcpl_id,
@@ -287,8 +287,8 @@ CONTAINS
INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lcpl_id
INTEGER(HID_T) , INTENT(IN), OPTIONAL :: gcpl_id
INTEGER(HID_T) , INTENT(IN), OPTIONAL :: gapl_id
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
INTEGER(HID_T) :: lcpl_id_default
@@ -420,7 +420,7 @@ CONTAINS
!! \param loc_id Location identifier.
!! \param name Name of the group to open.
!! \param grp_id Group identifier.
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param gapl_id Group access property list identifier.
!! \param file \fortran_file
@@ -438,8 +438,8 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) :: es_id
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN), OPTIONAL :: gapl_id
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
INTEGER(HID_T) :: gapl_id_default
@@ -509,7 +509,7 @@ CONTAINS
!! \brief Asynchronously closes the specified group.
!!
!! \param grp_id Group identifier.
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param file \fortran_file
!! \param func \fortran_func
@@ -522,8 +522,8 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) :: grp_id
INTEGER(HID_T), INTENT(IN) :: es_id
INTEGER, INTENT(OUT) :: hdferr
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
TYPE(C_PTR) :: file_default = C_NULL_PTR
@@ -1076,7 +1076,7 @@ CONTAINS
!!
!! \param loc_id Location identifier. The identifier may be that of a file, group, dataset, named datatype, or attribute.
!! \param ginfo Derived type in which group information is returned.
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param file \fortran_file
!! \param func \fortran_func
@@ -1092,8 +1092,8 @@ CONTAINS
TYPE(H5G_info_t), INTENT(OUT), TARGET :: ginfo
INTEGER(HID_T) , INTENT(IN) :: es_id
INTEGER , INTENT(OUT) :: hdferr
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
TYPE(C_PTR) :: ptr
@@ -1234,7 +1234,7 @@ CONTAINS
!! \param order Order of the count in the index.
!! \param n Position in the index of the group for which information is retrieved.
!! \param ginfo Derived type in which group information is returned.
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param lapl_id Link access property list.
!! \param file \fortran_file
@@ -1256,8 +1256,8 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) :: es_id
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN), OPTIONAL :: lapl_id
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
INTEGER(HID_T) :: lapl_id_default
@@ -1414,9 +1414,12 @@ CONTAINS
!! \param loc_id File or group identifier.
!! \param name Name of group containing group for which information is to be retrieved.
!! \param ginfo Derived type in which group information is returned.
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param lapl_id Link access property list.
+!! \param file \fortran_file
+!! \param func \fortran_func
+!! \param line \fortran_line
!!
!! See C API: @ref H5Gget_info_by_name_async()
!!
@@ -1430,8 +1433,8 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) :: es_id
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN), OPTIONAL :: lapl_id
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
INTEGER(HID_T) :: lapl_id_default
diff --git a/fortran/src/H5Lff.F90 b/fortran/src/H5Lff.F90
index 9111144..72a471e 100644
--- a/fortran/src/H5Lff.F90
+++ b/fortran/src/H5Lff.F90
@@ -180,7 +180,7 @@ CONTAINS
!!
!! \param loc_id Identifier of the file or group containing the object.
!! \param name Name of the link to delete.
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param lapl_id Link access property list identifier.
!! \param file \fortran_file
@@ -196,9 +196,9 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) :: es_id
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN), OPTIONAL :: lapl_id
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
- INTEGER , INTENT(IN), OPTIONAL :: line
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
+ INTEGER , OPTIONAL, INTENT(IN) :: line
INTEGER(HID_T) :: lapl_id_default
CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name
@@ -298,7 +298,7 @@ CONTAINS
!! \param target_path Path to the target object, which is not required to exist.
!! \param link_loc_id The file or group identifier for the new link.
!! \param link_name The name of the new link.
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param lcpl_id Link creation property list identifier.
!! \param lapl_id Link access property list identifier.
@@ -318,8 +318,8 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN), OPTIONAL :: lcpl_id
INTEGER(HID_T), INTENT(IN), OPTIONAL :: lapl_id
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
INTEGER(HID_T) :: lcpl_id_default
@@ -430,7 +430,7 @@ CONTAINS
!! \param obj_name Name of the target object, which must already exist.
!! \param link_loc_id The file or group identifier for the new link.
!! \param link_name The name of the new link.
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param lcpl_id Link creation property list identifier.
!! \param lapl_id Link access property list identifier.
@@ -451,8 +451,8 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN), OPTIONAL :: lcpl_id
INTEGER(HID_T), INTENT(IN), OPTIONAL :: lapl_id
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
INTEGER(HID_T) :: lcpl_id_default
@@ -644,7 +644,7 @@ CONTAINS
!! \li H5_ITER_NATIVE_F - No particular order, whatever is fastest
!! \li H5_ITER_N_F - Number of iteration orders
!! \param n Link for which to retrieve information.
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param lapl_id Link access property list.
!! \param file \fortran_file
@@ -664,8 +664,8 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) :: es_id
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN), OPTIONAL :: lapl_id
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
INTEGER(HID_T) :: lapl_id_default
@@ -765,8 +765,10 @@ CONTAINS
!!
!! \param loc_id Identifier of the file or group to query.
!! \param name Link name to check.
-!! \param link_exists Pointer to Link exists status, must be of type LOGICAL(C_BOOL) and initialize to .FALSE.
-!! \param es_id \es_id
+!! \param link_exists Pointer to link exists status. It should be declared INTEGER(C_INT) and initialized
+!! to zero (false) for portability. It will return one when true. LOGICAL(C_BOOL) is also
+!! acceptable but may encounter atypical anomalies. It should be initialized to false when used.
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param lapl_id Link access property list identifier.
!! \param file \fortran_file
@@ -779,12 +781,12 @@ CONTAINS
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: loc_id
CHARACTER(LEN=*), INTENT(IN) :: name
- TYPE(C_PTR) , INTENT(INOUT) :: link_exists
+ TYPE(C_PTR) , INTENT(IN) :: link_exists
INTEGER(HID_T), INTENT(IN) :: es_id
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN), OPTIONAL :: lapl_id
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
INTEGER(HID_T) :: lapl_id_default
@@ -1371,8 +1373,11 @@ CONTAINS
!! in \p return_value for H5Literate_async_f(), so \p return_value should
!! not be used for determining the return state of the callback routine.
!!
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
+!! \param file \fortran_file
+!! \param func \fortran_func
+!! \param line \fortran_line
!!
!! See C API: @ref H5Literate_async()
!!
@@ -1388,8 +1393,8 @@ CONTAINS
INTEGER , INTENT(OUT) :: return_value
INTEGER(HID_T) , INTENT(IN) :: es_id
INTEGER , INTENT(OUT) :: hdferr
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
TYPE(C_PTR) :: file_default = C_NULL_PTR
diff --git a/fortran/src/H5Off.F90 b/fortran/src/H5Off.F90
index 215f6e8..54c503e 100644
--- a/fortran/src/H5Off.F90
+++ b/fortran/src/H5Off.F90
@@ -266,7 +266,7 @@ CONTAINS
!! \param loc_id File or group identifier.
!! \param name Path to the object, relative to loc_id.
!! \param obj_id Object identifier for the opened object.
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param lapl_id Access property list identifier for the link pointing to the object.
!! \param file \fortran_file
@@ -283,8 +283,8 @@ CONTAINS
INTEGER(HID_T) , INTENT(IN) :: es_id
INTEGER , INTENT(OUT) :: hdferr
INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
INTEGER(HID_T) :: lapl_id_default
@@ -357,20 +357,23 @@ CONTAINS
!!
!! \brief Asynchronously closes an object in an HDF5 file.
!!
-!! \param object_id Object identifier.
-!! \param es_id \es_id
+!! \param object_id Object identifier
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
+!! \param file \fortran_file
+!! \param func \fortran_func
+!! \param line \fortran_line
!!
-!! See C API: @ref H5Oclose_async_f()
+!! See C API: @ref H5Oclose_async()
!!
SUBROUTINE h5oclose_async_f(object_id, es_id, hdferr, file, func, line)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: object_id
INTEGER(HID_T), INTENT(IN) :: es_id
INTEGER , INTENT(OUT) :: hdferr
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
- INTEGER , INTENT(IN), OPTIONAL :: line
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
+ INTEGER , OPTIONAL, INTENT(IN) :: line
TYPE(C_PTR) :: file_default = C_NULL_PTR
TYPE(C_PTR) :: func_default = C_NULL_PTR
@@ -497,7 +500,7 @@ CONTAINS
!! \param dst_name Name to be assigned to the new copy.
!! \param ocpypl_id Object copy property list.
!! \param lcpl_id Link creation property list for the new hard link.
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param file \fortran_file
!! \param func \fortran_func
@@ -516,8 +519,8 @@ CONTAINS
INTEGER , INTENT(OUT) :: hdferr
INTEGER(HID_T) , INTENT(IN), OPTIONAL :: ocpypl_id
INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lcpl_id
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
INTEGER(HID_T) :: ocpypl_id_default, lcpl_id_default
@@ -845,7 +848,7 @@ CONTAINS
!! \param order Order of iteration within index, NOTE: zero-based.
!! \param n Object to open.
!! \param obj_id An object identifier for the opened object.
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!!
!! \param lapl_id Link access property list.
@@ -867,8 +870,8 @@ CONTAINS
INTEGER(HID_T) , INTENT(IN) :: es_id
INTEGER , INTENT(OUT) :: hdferr
INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN), OPTIONAL :: line
INTEGER(HID_T) :: lapl_id_default
@@ -1025,33 +1028,35 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) :: object_id
INTEGER, INTENT(IN) :: index_type
INTEGER, INTENT(IN) :: order
-
- TYPE(C_FUNPTR):: op
- TYPE(C_PTR) :: op_data
+ TYPE(C_FUNPTR), INTENT(IN) :: op
+ TYPE(C_PTR), INTENT(INOUT) :: op_data ! Declare INOUT to bypass gfortran 4.8.5 issue
INTEGER, INTENT(OUT) :: return_value
INTEGER, INTENT(OUT) :: hdferr
- INTEGER, INTENT(IN), OPTIONAL :: fields
- INTEGER :: fields_c
+ INTEGER, INTENT(IN), OPTIONAL :: fields
+
+ INTEGER(C_INT) :: fields_c
+ INTEGER(C_INT) :: return_value_c
INTERFACE
- INTEGER FUNCTION h5ovisit_c(object_id, index_type, order, op, op_data, fields) &
- BIND(C, NAME='h5ovisit_c')
- IMPORT :: C_FUNPTR, C_PTR
+ INTEGER(C_INT) FUNCTION H5Ovisit3(object_id, index_type, order, op, op_data, fields) &
+ BIND(C, NAME='H5Ovisit3')
+ IMPORT :: C_FUNPTR, C_PTR, C_INT
IMPORT :: HID_T
IMPLICIT NONE
- INTEGER(HID_T), INTENT(IN) :: object_id
- INTEGER, INTENT(IN) :: index_type
- INTEGER, INTENT(IN) :: order
+ INTEGER(HID_T), VALUE :: object_id
+ INTEGER(C_INT), VALUE :: index_type
+ INTEGER(C_INT), VALUE :: order
TYPE(C_FUNPTR), VALUE :: op
- TYPE(C_PTR), VALUE :: op_data
- INTEGER, INTENT(IN) :: fields
- END FUNCTION h5ovisit_c
+ TYPE(C_PTR) , VALUE :: op_data
+ INTEGER(C_INT), VALUE :: fields
+ END FUNCTION H5Ovisit3
END INTERFACE
- fields_c = H5O_INFO_ALL_F
- IF(PRESENT(fields)) fields_c = fields
+ fields_c = INT(H5O_INFO_ALL_F,C_INT)
+ IF(PRESENT(fields)) fields_c = INT(fields,C_INT)
- return_value = h5ovisit_c(object_id, index_type, order, op, op_data, fields_c)
+ return_value_c = H5Ovisit3(object_id, INT(index_type,C_INT), INT(order, C_INT), op, op_data, fields_c)
+ return_value = INT(return_value_c)
IF(return_value.GE.0)THEN
hdferr = 0
@@ -1118,7 +1123,7 @@ CONTAINS
!! \param loc_id File or group identifier specifying location of group in which object is located.
!! \param name Name of group, relative to loc_id.
!! \param object_info Pointer to buffer returning object information, points to variable of datatype TYPE(C_H5O_INFO_T).
-!! \param es_id \es_id
+!! \param es_id \fortran_es_id
!! \param hdferr \fortran_error
!! \param lapl_id Link access property list.
!! \param fields Flags specifying the fields to include in object_info.
@@ -1133,13 +1138,13 @@ CONTAINS
IMPLICIT NONE
INTEGER(HID_T) , INTENT(IN) :: loc_id
CHARACTER(LEN=*), INTENT(IN) :: name
- TYPE(C_PTR) , INTENT(INOUT) :: object_info
+ TYPE(C_PTR) , INTENT(IN) :: object_info
INTEGER(HID_T) , INTENT(IN) :: es_id
INTEGER , INTENT(OUT) :: hdferr
INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id
INTEGER , INTENT(IN) , OPTIONAL :: fields
- TYPE(C_PTR), OPTIONAL :: file
- TYPE(C_PTR), OPTIONAL :: func
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: file
+ TYPE(C_PTR), OPTIONAL, INTENT(IN) :: func
INTEGER , INTENT(IN) , OPTIONAL :: line
CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name
@@ -1326,45 +1331,45 @@ CONTAINS
INTEGER , INTENT(IN) :: index_type
INTEGER , INTENT(IN) :: order
- TYPE(C_FUNPTR) :: op
- TYPE(C_PTR) :: op_data
+ TYPE(C_FUNPTR) , INTENT(IN) :: op
+ TYPE(C_PTR) , INTENT(INOUT) :: op_data ! Declare INOUT to bypass gfortran 4.8.5 issue
INTEGER , INTENT(OUT) :: return_value
INTEGER , INTENT(OUT) :: hdferr
INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id
INTEGER , INTENT(IN) , OPTIONAL :: fields
- INTEGER(SIZE_T) :: namelen
- INTEGER(HID_T) :: lapl_id_default
- INTEGER :: fields_c
+ INTEGER(HID_T) :: lapl_id_c
+ INTEGER(C_INT) :: fields_c
+ INTEGER(C_INT) :: return_value_c
+ CHARACTER(LEN=LEN_TRIM(object_name)+1,KIND=C_CHAR) :: object_name_c
INTERFACE
- INTEGER FUNCTION h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, &
- op, op_data, lapl_id, fields) BIND(C, NAME='h5ovisit_by_name_c')
- IMPORT :: C_CHAR, C_PTR, C_FUNPTR
+ INTEGER(C_INT) FUNCTION H5Ovisit_by_name3(loc_id, object_name, index_type, order, &
+ op, op_data, fields, lapl_id) BIND(C, NAME='H5Ovisit_by_name3')
+ IMPORT :: C_CHAR, C_PTR, C_FUNPTR, C_INT
IMPORT :: HID_T, SIZE_T
IMPLICIT NONE
- INTEGER(HID_T) , INTENT(IN) :: loc_id
- CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: object_name
- INTEGER(SIZE_T) :: namelen
- INTEGER , INTENT(IN) :: index_type
- INTEGER , INTENT(IN) :: order
- TYPE(C_FUNPTR) , VALUE :: op
- TYPE(C_PTR) , VALUE :: op_data
- INTEGER(HID_T) , INTENT(IN) :: lapl_id
- INTEGER , INTENT(IN) :: fields
- END FUNCTION h5ovisit_by_name_c
+ INTEGER(HID_T), VALUE :: loc_id
+ CHARACTER(KIND=C_CHAR), DIMENSION(*) :: object_name
+ INTEGER(C_INT), VALUE :: index_type
+ INTEGER(C_INT), VALUE :: order
+ TYPE(C_FUNPTR), VALUE :: op
+ TYPE(C_PTR) , VALUE :: op_data
+ INTEGER(C_INT), VALUE :: fields
+ INTEGER(HID_T), VALUE :: lapl_id
+ END FUNCTION H5Ovisit_by_name3
END INTERFACE
- fields_c = H5O_INFO_ALL_F
- IF(PRESENT(fields)) fields_c = fields
-
- namelen = LEN(object_name)
+ fields_c = INT(H5O_INFO_ALL_F, C_INT)
+ IF(PRESENT(fields)) fields_c = INT(fields, C_INT)
+ object_name_c = TRIM(object_name)//C_NULL_CHAR
- lapl_id_default = H5P_DEFAULT_F
- IF(PRESENT(lapl_id)) lapl_id_default = lapl_id
+ lapl_id_c = INT(H5P_DEFAULT_F, C_INT)
+ IF(PRESENT(lapl_id)) lapl_id_c = INT(lapl_id, C_INT)
- return_value = h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, &
- op, op_data, lapl_id_default, fields_c)
+ return_value_c = H5Ovisit_by_name3(loc_id, object_name_c, INT(index_type, C_INT), INT(order, C_INT), &
+ op, op_data, fields_c, lapl_id_c)
+ return_value = INT(return_value_c)
IF(return_value.GE.0)THEN
hdferr = 0
diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90
index 49917dd..c6229f7 100644
--- a/fortran/src/H5Pff.F90
+++ b/fortran/src/H5Pff.F90
@@ -4457,7 +4457,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
SUBROUTINE h5pget_f(prp_id, name, value, hdferr)
INTEGER(HID_T) , INTENT(IN) :: prp_id
CHARACTER(LEN=*), INTENT(IN) :: name
- TYPE(C_PTR) , INTENT(OUT) :: value
+ TYPE(C_PTR) , INTENT(IN) :: value
INTEGER , INTENT(OUT) :: hdferr
END SUBROUTINE h5pget_f
@@ -4675,7 +4675,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id
INTEGER(HID_T), INTENT(IN) :: type_id
- TYPE(C_PTR) :: fillvalue
+ TYPE(C_PTR) , INTENT(IN) :: fillvalue
INTEGER , INTENT(OUT) :: hdferr
hdferr = h5pget_fill_value_c(prp_id, type_id, fillvalue)
@@ -4825,7 +4825,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id
CHARACTER(LEN=*), INTENT(IN) :: name
- TYPE(C_PTR), INTENT(OUT) :: value
+ TYPE(C_PTR), INTENT(IN) :: value
INTEGER, INTENT(OUT) :: hdferr
INTEGER :: name_len
@@ -4998,8 +4998,8 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
CHARACTER(LEN=*), INTENT(IN) :: name
INTEGER(HID_T) , INTENT(OUT) :: class
INTEGER , INTENT(OUT) :: hdferr
- TYPE(C_PTR) , OPTIONAL :: create_data, copy_data, close_data
- TYPE(C_FUNPTR) , OPTIONAL :: create, copy, close
+ TYPE(C_PTR) , OPTIONAL, INTENT(IN) :: create_data, copy_data, close_data
+ TYPE(C_FUNPTR) , OPTIONAL, INTENT(IN) :: create, copy, close
INTEGER :: name_len
TYPE(C_PTR) :: create_data_default, copy_data_default, close_data_default
TYPE(C_FUNPTR) :: create_default, copy_default, close_default
@@ -5090,19 +5090,19 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
!!
SUBROUTINE h5pget_file_image_f(fapl_id, buf_ptr, buf_len_ptr, hdferr)
IMPLICIT NONE
- INTEGER(HID_T) , INTENT(IN) :: fapl_id
- TYPE(C_PTR) , INTENT(OUT), DIMENSION(*) :: buf_ptr
- INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr
- INTEGER , INTENT(OUT) :: hdferr
+ INTEGER(HID_T) , INTENT(IN) :: fapl_id
+ TYPE(C_PTR) , INTENT(IN), DIMENSION(*) :: buf_ptr
+ INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr
+ INTEGER , INTENT(OUT) :: hdferr
INTERFACE
INTEGER FUNCTION h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) &
BIND(C, NAME='h5pget_file_image_c')
IMPORT :: c_ptr
IMPORT :: HID_T, SIZE_T
- INTEGER(HID_T), INTENT(IN) :: fapl_id
- TYPE(C_PTR), DIMENSION(*), INTENT(OUT) :: buf_ptr
- INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr
+ INTEGER(HID_T) :: fapl_id
+ TYPE(C_PTR), DIMENSION(*) :: buf_ptr
+ INTEGER(SIZE_T) :: buf_len_ptr
END FUNCTION h5pget_file_image_c
END INTERFACE
@@ -6047,15 +6047,15 @@ END SUBROUTINE h5pget_virtual_dsetname_f
LOGICAL(C_BOOL) :: c_minimize
INTERFACE
- INTEGER FUNCTION h5pget_dset_no_attrs_hint_c(dcpl_id, minimize) BIND(C, NAME='H5Pget_dset_no_attrs_hint')
- IMPORT :: HID_T, C_BOOL
+ INTEGER(C_INT) FUNCTION H5Pget_dset_no_attrs_hint_c(dcpl_id, minimize) BIND(C, NAME='H5Pget_dset_no_attrs_hint')
+ IMPORT :: C_INT, HID_T, C_BOOL
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN), VALUE :: dcpl_id
LOGICAL(C_BOOL), INTENT(OUT) :: minimize
- END FUNCTION h5pget_dset_no_attrs_hint_c
+ END FUNCTION H5Pget_dset_no_attrs_hint_c
END INTERFACE
- hdferr = INT(h5pget_dset_no_attrs_hint_c(dcpl_id, c_minimize))
+ hdferr = INT(H5Pget_dset_no_attrs_hint_c(dcpl_id, c_minimize))
! Transfer value of C C_BOOL type to Fortran LOGICAL
minimize = c_minimize
@@ -6114,24 +6114,24 @@ END SUBROUTINE h5pget_virtual_dsetname_f
INTEGER(HID_T) , INTENT(IN) :: plist_id
INTEGER(HID_T) , INTENT(IN) :: new_vol_id
INTEGER , INTENT(OUT) :: hdferr
- TYPE(C_PTR) , OPTIONAL :: new_vol_info
+ TYPE(C_PTR) , INTENT(IN), OPTIONAL :: new_vol_info
TYPE(C_PTR) :: new_vol_info_default
INTERFACE
- INTEGER FUNCTION h5pset_vol(plist_id, new_vol_id, new_vol_info) BIND(C, NAME='H5Pset_vol')
- IMPORT :: HID_T, C_PTR
+ INTEGER(C_INT) FUNCTION H5Pset_vol(plist_id, new_vol_id, new_vol_info) BIND(C, NAME='H5Pset_vol')
+ IMPORT :: C_INT, HID_T, C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN), VALUE :: plist_id
INTEGER(HID_T), INTENT(IN), VALUE :: new_vol_id
TYPE(C_PTR) , INTENT(IN), VALUE :: new_vol_info
- END FUNCTION h5pset_vol
+ END FUNCTION H5Pset_vol
END INTERFACE
new_vol_info_default = C_NULL_PTR
IF(PRESENT(new_vol_info)) new_vol_info_default=new_vol_info
- hdferr = INT(h5pset_vol(plist_id, new_vol_id, new_vol_info_default))
+ hdferr = INT(H5Pset_vol(plist_id, new_vol_id, new_vol_info_default))
END SUBROUTINE h5pset_vol_f
@@ -6148,26 +6148,56 @@ END SUBROUTINE h5pget_virtual_dsetname_f
!!
SUBROUTINE h5pget_vol_id_f(plist_id, vol_id, hdferr)
IMPLICIT NONE
- INTEGER(HID_T) , INTENT(IN) :: plist_id
- INTEGER(HID_T) , INTENT(OUT) :: vol_id
- INTEGER , INTENT(OUT) :: hdferr
+ INTEGER(HID_T), INTENT(IN) :: plist_id
+ INTEGER(HID_T), INTENT(OUT) :: vol_id
+ INTEGER , INTENT(OUT) :: hdferr
INTERFACE
- INTEGER FUNCTION h5pget_vol_id(plist_id, vol_id) BIND(C, NAME='H5Pget_vol_id')
- IMPORT :: HID_T, C_PTR
+ INTEGER(C_INT) FUNCTION h5pget_vol_id(plist_id, vol_id) BIND(C, NAME='H5Pget_vol_id')
+ IMPORT :: C_INT, HID_T, C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN), VALUE :: plist_id
INTEGER(HID_T), INTENT(OUT) :: vol_id
END FUNCTION h5pget_vol_id
END INTERFACE
- hdferr = INT(h5pget_vol_id(plist_id, vol_id))
+ hdferr = INT(H5Pget_vol_id(plist_id, vol_id))
END SUBROUTINE h5pget_vol_id_f
!>
!! \ingroup FH5P
!!
+!! \brief Query the capability flags for the VOL connector that will be used with this file access property list (FAPL).
+!
+!! \param plist_id File access property list identifier
+!! \param cap_flags Flags that indicate the VOL connector capabilities
+!! \param hdferr \fortran_error
+!!
+!! See C API: @ref H5Pget_vol_cap_flags()
+!!
+ SUBROUTINE h5pget_vol_cap_flags_f(plist_id, cap_flags, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN) :: plist_id
+ INTEGER(C_INT64_T), INTENT(OUT) :: cap_flags
+ INTEGER , INTENT(OUT) :: hdferr
+
+ INTERFACE
+ INTEGER(C_INT) FUNCTION H5Pget_vol_cap_flags(plist_id, cap_flags) BIND(C, NAME='H5Pget_vol_cap_flags')
+ IMPORT :: C_INT, HID_T, C_PTR, C_INT64_T
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN), VALUE :: plist_id
+ INTEGER(C_INT64_T), INTENT(OUT) :: cap_flags
+ END FUNCTION H5Pget_vol_cap_flags
+ END INTERFACE
+
+ hdferr = INT(H5Pget_vol_cap_flags(plist_id, cap_flags))
+
+ END SUBROUTINE h5pget_vol_cap_flags_f
+
+!>
+!! \ingroup FH5P
+!!
!! \brief Gets the file locking properties. File locking is mainly used to help enforce SWMR semantics.
!!
!! \param fapl_id Target fileTarget file access property list identifier.
@@ -6187,17 +6217,17 @@ END SUBROUTINE h5pget_virtual_dsetname_f
LOGICAL(C_BOOL) :: c_ignore_flag
INTERFACE
- INTEGER FUNCTION h5pget_file_locking(fapl_id, use_file_locking, ignore_disabled_locks) &
+ INTEGER(C_INT) FUNCTION H5Pget_file_locking(fapl_id, use_file_locking, ignore_disabled_locks) &
BIND(C, NAME='H5Pget_file_locking')
- IMPORT :: HID_T, C_BOOL
+ IMPORT :: C_INT, HID_T, C_BOOL
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN), VALUE :: fapl_id
LOGICAL(C_BOOL), INTENT(OUT) :: use_file_locking
LOGICAL(C_BOOL), INTENT(OUT) :: ignore_disabled_locks
- END FUNCTION h5pget_file_locking
+ END FUNCTION H5Pget_file_locking
END INTERFACE
- hdferr = INT(h5pget_file_locking(fapl_id, c_use_flag, c_ignore_flag))
+ hdferr = INT(H5Pget_file_locking(fapl_id, c_use_flag, c_ignore_flag))
! Transfer value of C C_BOOL type to Fortran LOGICAL
use_file_locking = c_use_flag
@@ -6227,21 +6257,21 @@ END SUBROUTINE h5pget_virtual_dsetname_f
LOGICAL(C_BOOL) :: c_ignore_flag
INTERFACE
- INTEGER FUNCTION h5pset_file_locking(fapl_id, use_file_locking, ignore_disabled_locks) &
+ INTEGER(C_INT) FUNCTION H5Pset_file_locking(fapl_id, use_file_locking, ignore_disabled_locks) &
BIND(C, NAME='H5Pset_file_locking')
- IMPORT :: HID_T, C_BOOL
+ IMPORT :: C_INT, HID_T, C_BOOL
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN), VALUE :: fapl_id
LOGICAL(C_BOOL), INTENT(IN), VALUE :: use_file_locking
LOGICAL(C_BOOL), INTENT(IN), VALUE :: ignore_disabled_locks
- END FUNCTION h5pset_file_locking
+ END FUNCTION H5Pset_file_locking
END INTERFACE
! Transfer value of Fortran LOGICAL to C C_BOOL type
c_use_flag = use_file_locking
c_ignore_flag = ignore_disabled_locks
- hdferr = INT(h5pset_file_locking(fapl_id, c_use_flag, c_ignore_flag))
+ hdferr = INT(H5Pset_file_locking(fapl_id, c_use_flag, c_ignore_flag))
END SUBROUTINE h5pset_file_locking_f
diff --git a/fortran/src/H5Tff.F90 b/fortran/src/H5Tff.F90
index 84b9654..29550b7 100644
--- a/fortran/src/H5Tff.F90
+++ b/fortran/src/H5Tff.F90
@@ -2040,13 +2040,13 @@ CONTAINS
!!
SUBROUTINE h5tconvert_f(src_id, dst_id, nelmts, buf, hdferr, background, plist_id)
IMPLICIT NONE
- INTEGER(HID_T) , INTENT(IN) :: src_id
- INTEGER(HID_T) , INTENT(IN) :: dst_id
- INTEGER(SIZE_T), INTENT(IN) :: nelmts
- TYPE(C_PTR) , INTENT(INOUT) :: buf
- INTEGER , INTENT(OUT) :: hdferr
- TYPE(C_PTR) , INTENT(INOUT), OPTIONAL :: background
- INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: plist_id
+ INTEGER(HID_T) , INTENT(IN) :: src_id
+ INTEGER(HID_T) , INTENT(IN) :: dst_id
+ INTEGER(SIZE_T), INTENT(IN) :: nelmts
+ TYPE(C_PTR) , INTENT(IN) :: buf
+ INTEGER , INTENT(OUT) :: hdferr
+ TYPE(C_PTR) , INTENT(IN), OPTIONAL :: background
+ INTEGER(HID_T) , INTENT(IN), OPTIONAL :: plist_id
INTEGER(HID_T) :: plist_id_default
TYPE(C_PTR) :: background_default
diff --git a/fortran/src/H5VLff.F90 b/fortran/src/H5VLff.F90
index 3b451d0..56edccb 100644
--- a/fortran/src/H5VLff.F90
+++ b/fortran/src/H5VLff.F90
@@ -52,10 +52,10 @@ CONTAINS
!!
!! \brief Registers a new VOL connector as a member of the virtual object layer class by name.
!!
-!! \param name Connector name.
-!! \param vol_id VOL connector identifier if successful; otherwise returns H5I_INVALID_HID_F.
+!! \param name \fortran_vol_name
+!! \param vol_id VOL connector identifier if successful; otherwise returns H5I_INVALID_HID_F
!! \param hdferr \fortran_error
-!! \param vipl_id VOL initialization property list identifier.
+!! \param vipl_id VOL initialization property list identifier
!!
!! See C API: @ref H5VLregister_connector_by_name()
!!
@@ -94,10 +94,10 @@ CONTAINS
!!
!! \brief Registers a new VOL connector by value.
!!
-!! \param connector_value Connector value.
-!! \param vol_id VOL connector identifier if successful; otherwise returns H5I_INVALID_HID_F.
+!! \param connector_value Connector value
+!! \param vol_id VOL connector identifier if successful; otherwise returns H5I_INVALID_HID_F
!! \param hdferr \fortran_error
-!! \param vipl_id VOL initialization property list identifier.
+!! \param vipl_id VOL initialization property list identifier
!!
!! See C API: @ref H5VLregister_connector_by_value()
!!
@@ -134,8 +134,8 @@ CONTAINS
!!
!! \brief Determines whether a VOL class has been registered or not ccording to a specified connector name.
!!
-!! \param name Connector name.
-!! \param registered State of VOL class registration.
+!! \param name \fortran_vol_name
+!! \param registered State of VOL class registration
!! \param hdferr \fortran_error
!!
!! See C API: @ref H5VLis_connector_registered_by_name()
@@ -171,9 +171,9 @@ CONTAINS
!!
!! \brief Determines whether a VOL class has been registered or not according to a specified connector value (ID).
!!
-!! \param value ConneConnector value.
-!! \param registered State of VOL class registration.
-!! \param hdferr Retu\fortran_error
+!! \param value Connector value
+!! \param registered State of VOL class registration
+!! \param hdferr \fortran_error
!!
!! See C API: @ref H5VLis_connector_registered_by_value()
!!
@@ -205,7 +205,7 @@ CONTAINS
!!
!! \brief Retrieves the ID for a registered VOL connector.
!!
-!! \param obj_id Object id.
+!! \param obj_id Object id
!! \param vol_id Connector id.
!! \param hdferr \fortran_error
!!
@@ -238,7 +238,7 @@ CONTAINS
!!
!! \brief Retrieves the ID for a registered VOL connector.
!!
-!! \param name Connector name.
+!! \param name \fortran_vol_name
!! \param vol_id Connector id.
!! \param hdferr \fortran_error
!!
@@ -275,8 +275,8 @@ CONTAINS
!!
!! \brief Retrieves the ID for a registered VOL connector.
!!
-!! \param value CConnector value.
-!! \param vol_id Connector id.
+!! \param value Connector value
+!! \param vol_id Connector id
!! \param hdferr \fortran_error
!!
!! See C API: @ref H5VLget_connector_id_by_value()
@@ -308,10 +308,10 @@ CONTAINS
!!
!! \brief Retrieves a connector name for a VOL.
!!
-!! \param obj_id Object identifier or file identifier.
-!! \param name Connector name.
+!! \param obj_id Object identifier or file identifier
+!! \param name \fortran_vol_name
!! \param hdferr \fortran_error
-!! \param name_len Maximum length of the name to retrieve.
+!! \param name_len Maximum length of the name to retrieve
!!
!! See C API: @ref H5VLget_connector_name()
!!
@@ -355,7 +355,7 @@ CONTAINS
!!
!! \brief Closes a VOL connector ID.
!!
-!! \param vol_id A valid identifier of the connectory to unregister.
+!! \param vol_id A valid identifier of the connectory to unregister
!! \param hdferr \fortran_error
!!
!! See C API: @ref H5VLclose()
@@ -381,8 +381,8 @@ CONTAINS
!!
!! \brief Removes a VOL connector ID from the library.
!!
-!! \param plugin_id A valid identifier of the connector to unregister..
-!! \param hdferr Ret\fortran_error
+!! \param plugin_id A valid identifier of the connector to unregister
+!! \param hdferr \fortran_error
!!
!! See C API: @ref H5VLunregister_connector()
!!
diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java
index 045ce67..ed099cf 100644
--- a/java/src/hdf/hdf5lib/H5.java
+++ b/java/src/hdf/hdf5lib/H5.java
@@ -13806,7 +13806,7 @@ public class H5 implements java.io.Serializable {
/**
* @ingroup JH5T
*
- * H5Tcreate creates a new dataype of the specified class with the specified number of bytes.
+ * H5Tcreate creates a new datatype of the specified class with the specified number of bytes.
*
* @param tclass
* IN: Class of datatype to create.
@@ -15261,7 +15261,7 @@ public class H5 implements java.io.Serializable {
/**
* @ingroup JH5T
*
- * H5Tvlen_create creates a new variable-length (VL) dataype.
+ * H5Tvlen_create creates a new variable-length (VL) datatype.
*
* @param base_id
* IN: Identifier of parent datatype.
diff --git a/java/src/hdf/hdf5lib/HDFArray.java b/java/src/hdf/hdf5lib/HDFArray.java
index 28d5117..637a896 100644
--- a/java/src/hdf/hdf5lib/HDFArray.java
+++ b/java/src/hdf/hdf5lib/HDFArray.java
@@ -455,6 +455,7 @@ public class HDFArray {
new HDF5JavaException("HDFArray: unsupported Object type: " + ArrayDescriptor.NT);
throw(ex);
}
+ break;
} // end of statement for arrays of boxed objects
default:
HDF5JavaException ex =
@@ -527,6 +528,7 @@ public class HDFArray {
new HDF5JavaException("HDFArray: unsupported Object type: " + ArrayDescriptor.NT);
throw(ex);
}
+ break;
} // end of statement for arrays of boxed numerics
} // end of switch statement for arrays of primitives
diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c
index 18a74b3..63b82ea 100644
--- a/java/src/jni/h5Constants.c
+++ b/java/src/jni/h5Constants.c
@@ -1653,16 +1653,24 @@ Java_hdf_hdf5lib_HDF5Constants_H5FD_1MEM_1DEFAULT_1GHEAP_1SIZE(JNIEnv *env, jcla
{
return (hsize_t)(3 * (HADDR_MAX / (H5FD_MEM_NTYPES - 1)));
}
+H5_GCC_CLANG_DIAG_OFF("sign-conversion")
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1MEM_1DEFAULT_1LHEAP_1SIZE(JNIEnv *env, jclass cls)
{
+ /* XXX: BADNESS! - This value cannot fit into a jlong!
+ *
+ * For now, we're going to ignore these values since the multi VFD is
+ * scheduled for removal in HDF5 2.0.
+ */
return (hsize_t)(4 * (HADDR_MAX / (H5FD_MEM_NTYPES - 1)));
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1MEM_1DEFAULT_1OHDR_1SIZE(JNIEnv *env, jclass cls)
{
+ /* XXX: BADNESS! - This value cannot fit into a jlong! */
return (hsize_t)(5 * (HADDR_MAX / (H5FD_MEM_NTYPES - 1)));
}
+H5_GCC_CLANG_DIAG_ON("sign-conversion")
/* Symbols defined for compatibility with previous versions of the HDF5 API.
*
diff --git a/java/src/jni/h5aImp.c b/java/src/jni/h5aImp.c
index 07ecdb8..a8041a6 100644
--- a/java/src/jni/h5aImp.c
+++ b/java/src/jni/h5aImp.c
@@ -161,7 +161,7 @@ Java_hdf_hdf5lib_H5_H5Aread(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_t
hid_t sid = H5I_INVALID_HID;
size_t typeSize;
H5T_class_t type_class;
- jsize vl_array_len; // Only used by vl_data_class types
+ jsize vl_array_len = 0; // Only used by vl_data_class types
htri_t vl_data_class;
herr_t status = FAIL;
@@ -248,7 +248,7 @@ Java_hdf_hdf5lib_H5_H5Awrite(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_
hid_t sid = H5I_INVALID_HID;
size_t typeSize;
H5T_class_t type_class;
- jsize vl_array_len; // Only used by vl_data_class types
+ jsize vl_array_len = 0; // Only used by vl_data_class types
htri_t vl_data_class;
herr_t status = FAIL;
@@ -1107,7 +1107,6 @@ done:
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5AreadVL(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_type_id, jobjectArray buf)
{
- jboolean readBufIsCopy;
jbyte *readBuf = NULL;
hsize_t dims[H5S_MAX_RANK];
hid_t sid = H5I_INVALID_HID;
@@ -1174,7 +1173,6 @@ done:
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5AwriteVL(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_type_id, jobjectArray buf)
{
- jboolean writeBufIsCopy;
jbyte *writeBuf = NULL;
hsize_t dims[H5S_MAX_RANK];
hid_t sid = H5I_INVALID_HID;
@@ -1632,21 +1630,24 @@ H5AwriteVL_asstr(JNIEnv *env, hid_t aid, hid_t tid, jobjectArray buf)
continue;
}
- /*
- * length = ENVPTR->GetStringUTFLength(ENVONLY, jstr);
- * CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
- */
-
PIN_JAVA_STRING(ENVONLY, jstr, utf8, NULL, "H5AwriteVL_asstr: failed to pin string buffer");
/*
- * TODO: If the string isn't a copy, we should probably make
- * one before destroying it with h5str_convert.
+ * Make a copy of the string since h5str_convert uses strtok.
*/
+ char *utf8_copy = NULL;
- if (!h5str_convert(ENVONLY, (char **)&utf8, aid, tid, &(((char *)writeBuf)[i * typeSize]), 0))
+ jsize length = ENVPTR->GetStringUTFLength(ENVONLY, jstr);
+ CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
+
+ if (NULL == (utf8_copy = HDstrndup(utf8, (size_t)length)))
+ H5_LIBRARY_ERROR(ENVONLY);
+
+ if (!h5str_convert(ENVONLY, &utf8_copy, aid, tid, &(((char *)writeBuf)[i * typeSize]), 0))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
+ HDfree(utf8_copy);
+
UNPIN_JAVA_STRING(ENVONLY, jstr, utf8);
utf8 = NULL;
diff --git a/java/src/jni/h5dImp.c b/java/src/jni/h5dImp.c
index efddb96..de7fb21 100644
--- a/java/src/jni/h5dImp.c
+++ b/java/src/jni/h5dImp.c
@@ -1134,7 +1134,6 @@ JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5DreadVL(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id,
jlong mem_space_id, jlong file_space_id, jlong xfer_plist_id, jobjectArray buf)
{
- jboolean readBufIsCopy;
jbyte *readBuf = NULL;
size_t typeSize;
H5T_class_t type_class;
@@ -1195,7 +1194,6 @@ JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5DwriteVL(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id,
jlong mem_space_id, jlong file_space_id, jlong xfer_plist_id, jobjectArray buf)
{
- jboolean writeBufIsCopy;
jbyte *writeBuf = NULL;
size_t typeSize;
H5T_class_t type_class;
@@ -1680,21 +1678,24 @@ H5DwriteVL_asstr(JNIEnv *env, hid_t did, hid_t tid, hid_t mem_sid, hid_t file_si
continue;
}
- /*
- * length = ENVPTR->GetStringUTFLength(ENVONLY, jstr);
- * CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
- */
-
PIN_JAVA_STRING(ENVONLY, jstr, utf8, NULL, "H5DwriteVL_asstr: failed to pin string buffer");
/*
- * TODO: If the string isn't a copy, we should probably make
- * one before destroying it with h5str_convert.
+ * Make a copy of the string since h5str_convert uses strtok.
*/
+ char *utf8_copy = NULL;
- if (!h5str_convert(ENVONLY, (char **)&utf8, did, tid, &(((char *)writeBuf)[i * typeSize]), 0))
+ jsize length = ENVPTR->GetStringUTFLength(ENVONLY, jstr);
+ CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
+
+ if (NULL == (utf8_copy = HDstrndup(utf8, (size_t)length)))
+ H5_LIBRARY_ERROR(ENVONLY);
+
+ if (!h5str_convert(ENVONLY, &utf8_copy, did, tid, &(((char *)writeBuf)[i * typeSize]), 0))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
+ HDfree(utf8_copy);
+
UNPIN_JAVA_STRING(ENVONLY, jstr, utf8);
utf8 = NULL;
diff --git a/java/src/jni/h5lImp.c b/java/src/jni/h5lImp.c
index 1f2e8d8..67f4850 100644
--- a/java/src/jni/h5lImp.c
+++ b/java/src/jni/h5lImp.c
@@ -277,7 +277,7 @@ done:
JNIEXPORT jobject JNICALL
Java_hdf_hdf5lib_H5_H5Lget_1info(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong access_id)
{
- H5L_info2_t infobuf;
+ H5L_info2_t infobuf = {H5L_TYPE_ERROR, FALSE, -1, H5T_CSET_ERROR, {{{0}}}};
const char *linkName = NULL;
jvalue args[5];
herr_t status = FAIL;
@@ -340,7 +340,7 @@ JNIEXPORT jobject JNICALL
Java_hdf_hdf5lib_H5_H5Lget_1info_1by_1idx(JNIEnv *env, jclass clss, jlong loc_id, jstring name,
jint index_field, jint order, jlong link_n, jlong access_id)
{
- H5L_info2_t infobuf;
+ H5L_info2_t infobuf = {H5L_TYPE_ERROR, FALSE, -1, H5T_CSET_ERROR, {{{0}}}};
const char *groupName = NULL;
jvalue args[5];
herr_t status = FAIL;
@@ -454,7 +454,7 @@ JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Lget_1value(JNIEnv *env, jclass clss, jlong loc_id, jstring name,
jobjectArray link_value, jlong access_id)
{
- H5L_info2_t infobuf;
+ H5L_info2_t infobuf = {H5L_TYPE_ERROR, FALSE, -1, H5T_CSET_ERROR, {{{0}}}};
const char *file_name = NULL;
const char *obj_name = NULL;
const char *linkName = NULL;
@@ -544,7 +544,7 @@ Java_hdf_hdf5lib_H5_H5Lget_1value_1by_1idx(JNIEnv *env, jclass clss, jlong loc_i
jint index_field, jint order, jlong link_n,
jobjectArray link_value, jlong access_id)
{
- H5L_info2_t infobuf;
+ H5L_info2_t infobuf = {H5L_TYPE_ERROR, FALSE, -1, H5T_CSET_ERROR, {{{0}}}};
const char *file_name = NULL;
const char *obj_name = NULL;
const char *grpName = NULL;
diff --git a/java/src/jni/h5pDAPLImp.c b/java/src/jni/h5pDAPLImp.c
index 01108b3..666f47d 100644
--- a/java/src/jni/h5pDAPLImp.c
+++ b/java/src/jni/h5pDAPLImp.c
@@ -80,6 +80,8 @@ Java_hdf_hdf5lib_H5_H5Pget_1chunk_1cache(JNIEnv *env, jclass clss, jlong dapl, j
if (NULL != rdcc_nbytes)
PIN_LONG_ARRAY(ENVONLY, rdcc_nbytes, nbytesArray, &isCopy,
"H5Pget_chunk_cache: nbytesArray array not pinned");
+ if (NULL == nbytesArray)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "nbytesArray should not be NULL after pinning");
{
/* direct cast (size_t *)variable fails on 32-bit environment */
diff --git a/java/src/jni/h5pFAPLImp.c b/java/src/jni/h5pFAPLImp.c
index f094aaf..80ed6c6 100644
--- a/java/src/jni/h5pFAPLImp.c
+++ b/java/src/jni/h5pFAPLImp.c
@@ -1252,6 +1252,8 @@ Java_hdf_hdf5lib_H5_H5Pget_1cache(JNIEnv *env, jclass clss, jlong plist, jintArr
if (NULL != rdcc_nbytes)
PIN_LONG_ARRAY(ENVONLY, rdcc_nbytes, nbytesArray, &isCopy,
"H5Pget_cache: nbytesArray array not pinned");
+ if (NULL == nbytesArray)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "nbytesArray should not be NULL after pinning");
{
/* direct cast (size_t *)variable fails on 32-bit environment */
diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c
index 77fb244..56708a8 100644
--- a/java/src/jni/h5util.c
+++ b/java/src/jni/h5util.c
@@ -77,8 +77,7 @@ static int render_bin_output_region_data_points(FILE *stream, hid_t region_sp
hsize_t *ptdata);
static int render_bin_output_region_points(FILE *stream, hid_t region_space, hid_t region_id,
hid_t container);
-jobject translate_atomic_rbuf(JNIEnv *env, jobject ret_buf, jlong mem_type_id, H5T_class_t type_class,
- void *raw_buf);
+jobject translate_atomic_rbuf(JNIEnv *env, jlong mem_type_id, H5T_class_t type_class, void *raw_buf);
void translate_atomic_wbuf(JNIEnv *env, jobject in_obj, jlong mem_type_id, H5T_class_t type_class,
void *raw_buf);
@@ -439,40 +438,43 @@ h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_
break;
case H5T_ENUM: {
- void *value = NULL;
+ void *value = NULL;
+ unsigned char tmp_uchar = 0;
+ unsigned short tmp_ushort = 0;
+ unsigned int tmp_uint = 0;
+#if H5_SIZEOF_LONG != H5_SIZEOF_INT
+ unsigned long tmp_ulong = 0;
+#endif
+#if H5_SIZEOF_LONG_LONG != H5_SIZEOF_LONG
+ unsigned long long tmp_ullong = 0;
+#endif
token = HDstrtok(this_str, delimiter);
switch (typeSize) {
case sizeof(char): {
- unsigned char tmp_uchar = 0;
- value = &tmp_uchar;
+ value = &tmp_uchar;
break;
}
case sizeof(short): {
- unsigned short tmp_ushort = 0;
- value = &tmp_ushort;
+ value = &tmp_ushort;
break;
}
#if H5_SIZEOF_LONG != H5_SIZEOF_INT
case sizeof(long): {
- unsigned long tmp_ulong = 0;
- value = &tmp_ulong;
+ value = &tmp_ulong;
break;
}
#endif
#if H5_SIZEOF_LONG_LONG != H5_SIZEOF_LONG
case sizeof(long long): {
- unsigned long long tmp_ullong = 0;
- value = &tmp_ullong;
+ value = &tmp_ullong;
break;
}
#endif
-
default: {
- unsigned int tmp_uint = 0;
- value = &tmp_uint;
+ value = &tmp_uint;
break;
}
}
@@ -4045,16 +4047,14 @@ done:
} /* end Java_hdf_hdf5lib_H5_H5export_1attribute */
jobject
-translate_atomic_rbuf(JNIEnv *env, jobject ret_buf, jlong mem_type_id, H5T_class_t type_class, void *raw_buf)
+translate_atomic_rbuf(JNIEnv *env, jlong mem_type_id, H5T_class_t type_class, void *raw_buf)
{
- jobject jobj = NULL;
- hid_t memb = H5I_INVALID_HID;
- int ret_buflen = -1;
- jboolean found_jList = JNI_TRUE;
- jobjectArray jList = NULL;
+ jobject jobj = NULL;
+ hid_t memb = H5I_INVALID_HID;
+ jobjectArray jList = NULL;
H5T_class_t vlClass;
size_t vlSize;
- size_t i, x;
+ size_t i;
size_t typeSize;
// raw_buf is normally bytes except when used for variable length strings
char *char_buf = (char *)raw_buf;
@@ -4062,7 +4062,6 @@ translate_atomic_rbuf(JNIEnv *env, jobject ret_buf, jlong mem_type_id, H5T_class
/* retrieve the java.util.ArrayList interface class */
jclass arrCList = ENVPTR->FindClass(ENVONLY, "java/util/ArrayList");
jmethodID arrListMethod = ENVPTR->GetMethodID(ENVONLY, arrCList, "", "(I)V");
- jmethodID arrAddMethod = ENVPTR->GetMethodID(ENVONLY, arrCList, "add", "(Ljava/lang/Object;)Z");
/* Cache class types */
/* jclass cBool = ENVPTR->FindClass(ENVONLY, "java/lang/Boolean"); */
@@ -4087,7 +4086,6 @@ translate_atomic_rbuf(JNIEnv *env, jobject ret_buf, jlong mem_type_id, H5T_class
if (!(typeSize = H5Tget_size(mem_type_id)))
H5_LIBRARY_ERROR(ENVONLY);
- ret_buflen = ENVPTR->GetArrayLength(ENVONLY, ret_buf);
switch (type_class) {
case H5T_VLEN: {
if (!(memb = H5Tget_super(mem_type_id)))
@@ -4100,9 +4098,6 @@ translate_atomic_rbuf(JNIEnv *env, jobject ret_buf, jlong mem_type_id, H5T_class
/* Convert element to a list */
hvl_t vl_elem;
- found_jList = JNI_TRUE;
- jList = NULL;
-
/* Get the number of sequence elements */
HDmemcpy(&vl_elem, char_buf, sizeof(hvl_t));
jsize nelmts = (jsize)vl_elem.len;
@@ -4121,8 +4116,7 @@ translate_atomic_rbuf(JNIEnv *env, jobject ret_buf, jlong mem_type_id, H5T_class
break;
} /* H5T_VLEN */
case H5T_COMPOUND: {
- int nmembs = H5Tget_nmembers(mem_type_id);
- void *objBuf = NULL;
+ int nmembs = H5Tget_nmembers(mem_type_id);
/* The list we're going to return: */
if (NULL == (jList = (jobjectArray)ENVPTR->NewObject(ENVONLY, arrCList, arrListMethod, 0)))
@@ -4136,15 +4130,13 @@ translate_atomic_rbuf(JNIEnv *env, jobject ret_buf, jlong mem_type_id, H5T_class
if ((memb = H5Tget_member_type(mem_type_id, (unsigned int)i)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
- if ((memb_offset = H5Tget_member_offset(mem_type_id, (unsigned int)i)) < 0)
- H5_LIBRARY_ERROR(ENVONLY);
+ memb_offset = H5Tget_member_offset(mem_type_id, (unsigned int)i);
if ((memb_vlClass = H5Tget_class(memb)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (!(memb_vlSize = H5Tget_size(memb)))
H5_LIBRARY_ERROR(ENVONLY);
- translate_atomic_rbuf(ENVONLY, jList, memb, memb_vlClass,
- char_buf + i * typeSize + memb_offset);
+ translate_atomic_rbuf(ENVONLY, memb, memb_vlClass, char_buf + i * typeSize + memb_offset);
H5Tclose(memb);
}
jobj = jList;
@@ -4315,7 +4307,7 @@ translate_atomic_wbuf(JNIEnv *env, jobject in_obj, jlong mem_type_id, H5T_class_
hid_t memb = H5I_INVALID_HID;
H5T_class_t vlClass;
size_t vlSize;
- size_t i, x;
+ size_t i;
size_t typeSize;
// raw_buf is normally bytes except when used for variable length strings
char *char_buf = (char *)raw_buf;
@@ -4371,8 +4363,6 @@ translate_atomic_wbuf(JNIEnv *env, jobject in_obj, jlong mem_type_id, H5T_class_
break;
} /* H5T_VLEN */
case H5T_COMPOUND: {
- void *objBuf = NULL;
-
/* Convert each compound element */
int nmembs = H5Tget_nmembers(mem_type_id);
@@ -4394,14 +4384,13 @@ translate_atomic_wbuf(JNIEnv *env, jobject in_obj, jlong mem_type_id, H5T_class_
if ((memb = H5Tget_member_type(mem_type_id, (unsigned int)i)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
- if ((memb_offset = H5Tget_member_offset(mem_type_id, (unsigned int)i)) < 0)
- H5_LIBRARY_ERROR(ENVONLY);
+ memb_offset = H5Tget_member_offset(mem_type_id, (unsigned int)i);
if ((memb_vlClass = H5Tget_class(memb)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (!(memb_vlSize = H5Tget_size(memb)))
H5_LIBRARY_ERROR(ENVONLY);
- jobject arr_obj = ENVPTR->GetObjectArrayElement(ENVONLY, array, i);
+ jobject arr_obj = ENVPTR->GetObjectArrayElement(ENVONLY, array, (jsize)i);
translate_atomic_wbuf(ENVONLY, arr_obj, memb, memb_vlClass,
char_buf + i * typeSize + memb_offset);
ENVPTR->DeleteLocalRef(ENVONLY, arr_obj);
@@ -4434,7 +4423,7 @@ translate_atomic_wbuf(JNIEnv *env, jobject in_obj, jlong mem_type_id, H5T_class_
translate_wbuf(ENVONLY, array, memb, vlClass, (jsize)jnelmts, objBuf);
- HDmemcpy(char_buf, (char *)objBuf, vlSize * jnelmts);
+ HDmemcpy(char_buf, (char *)objBuf, vlSize * (size_t)jnelmts);
break;
} /* H5T_ARRAY */
case H5T_ENUM:
@@ -4446,6 +4435,7 @@ translate_atomic_wbuf(JNIEnv *env, jobject in_obj, jlong mem_type_id, H5T_class_
case sizeof(jbyte): {
jbyte byteValue = ENVPTR->CallByteMethod(ENVONLY, in_obj, byteValueMid);
HDmemcpy(char_buf, ((char *)&byteValue), typeSize);
+ break;
}
case sizeof(jshort): {
jshort shortValue = ENVPTR->CallShortMethod(ENVONLY, in_obj, shortValueMid);
@@ -4504,12 +4494,12 @@ translate_atomic_wbuf(JNIEnv *env, jobject in_obj, jlong mem_type_id, H5T_class_
length = ENVPTR->GetStringUTFLength(ENVONLY, in_obj);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (is_variable) {
- char *new_buf = (char *)HDcalloc((size_t)1, length + 1);
- HDmemcpy(((char *)new_buf), utf8, length);
+ char *new_buf = (char *)HDcalloc(1, (size_t)(length + 1));
+ HDmemcpy(((char *)new_buf), utf8, (size_t)length);
HDmemcpy(char_buf, &new_buf, typeSize);
}
else {
- HDmemcpy(char_buf, utf8, length);
+ HDmemcpy(char_buf, utf8, (size_t)length);
}
UNPIN_JAVA_STRING(ENVONLY, in_obj, utf8);
utf8 = NULL;
@@ -4547,25 +4537,13 @@ translate_rbuf(JNIEnv *env, jobjectArray ret_buf, jlong mem_type_id, H5T_class_t
jmethodID arrListMethod = ENVPTR->GetMethodID(ENVONLY, arrCList, "", "(I)V");
jmethodID arrAddMethod = ENVPTR->GetMethodID(ENVONLY, arrCList, "add", "(Ljava/lang/Object;)Z");
- /* Cache class types */
- jclass cByte = ENVPTR->FindClass(ENVONLY, "java/lang/Byte");
- jclass cShort = ENVPTR->FindClass(ENVONLY, "java/lang/Short");
- jclass cInt = ENVPTR->FindClass(ENVONLY, "java/lang/Integer");
- jclass cLong = ENVPTR->FindClass(ENVONLY, "java/lang/Long");
- jclass cFloat = ENVPTR->FindClass(ENVONLY, "java/lang/Float");
- jclass cDouble = ENVPTR->FindClass(ENVONLY, "java/lang/Double");
- jmethodID byteValueMid = ENVPTR->GetStaticMethodID(ENVONLY, cByte, "valueOf", "(B)Ljava/lang/Byte;");
- jmethodID shortValueMid = ENVPTR->GetStaticMethodID(ENVONLY, cShort, "valueOf", "(S)Ljava/lang/Short;");
- jmethodID intValueMid = ENVPTR->GetStaticMethodID(ENVONLY, cInt, "valueOf", "(I)Ljava/lang/Integer;");
- jmethodID longValueMid = ENVPTR->GetStaticMethodID(ENVONLY, cLong, "valueOf", "(J)Ljava/lang/Long;");
- jmethodID floatValueMid = ENVPTR->GetStaticMethodID(ENVONLY, cFloat, "valueOf", "(F)Ljava/lang/Float;");
- jmethodID doubleValueMid =
- ENVPTR->GetStaticMethodID(ENVONLY, cDouble, "valueOf", "(D)Ljava/lang/Double;");
-
if (!(typeSize = H5Tget_size(mem_type_id)))
H5_LIBRARY_ERROR(ENVONLY);
ret_buflen = ENVPTR->GetArrayLength(ENVONLY, ret_buf);
+ if (ret_buflen < 0)
+ H5_JNI_FATAL_ERROR(ENVONLY, "ret_buflen: Array length cannot be negative");
+
switch (type_class) {
case H5T_VLEN: {
if (!(memb = H5Tget_super(mem_type_id)))
@@ -4592,7 +4570,7 @@ translate_rbuf(JNIEnv *env, jobjectArray ret_buf, jlong mem_type_id, H5T_class_t
H5_BAD_ARGUMENT_ERROR(ENVONLY, "translate_rbuf: number of VL elements < 0");
/* The list we're going to return: */
- if (i < ret_buflen) {
+ if (i < (size_t)ret_buflen) {
jList = ENVPTR->GetObjectArrayElement(ENVONLY, (jobjectArray)ret_buf, (jsize)i);
}
if (NULL == jList) {
@@ -4604,7 +4582,6 @@ translate_rbuf(JNIEnv *env, jobjectArray ret_buf, jlong mem_type_id, H5T_class_t
}
translate_rbuf(ENVONLY, jList, memb, vlClass, (jsize)nelmts, vl_elem.p);
- int jListlen = ENVPTR->GetArrayLength(ENVONLY, jList);
if (found_jList == JNI_FALSE) {
jboolean addResult =
ENVPTR->CallBooleanMethod(ENVONLY, ret_buf, arrAddMethod, (jobject)jList);
@@ -4612,7 +4589,7 @@ translate_rbuf(JNIEnv *env, jobjectArray ret_buf, jlong mem_type_id, H5T_class_t
H5_JNI_FATAL_ERROR(ENVONLY, "translate_rbuf: cannot add VL element");
}
else {
- ENVPTR->SetObjectArrayElement(ENVONLY, ret_buf, i, (jobject)jList);
+ ENVPTR->SetObjectArrayElement(ENVONLY, ret_buf, (jsize)i, (jobject)jList);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
}
ENVPTR->DeleteLocalRef(ENVONLY, jList);
@@ -4620,15 +4597,13 @@ translate_rbuf(JNIEnv *env, jobjectArray ret_buf, jlong mem_type_id, H5T_class_t
break;
} /* H5T_VLEN */
case H5T_COMPOUND: {
- void *objBuf = NULL;
-
/* Convert each compound element to a list */
for (i = 0; i < (size_t)count; i++) {
found_jList = JNI_TRUE;
jList = NULL;
/* The list we're going to return: */
- if (i < ret_buflen) {
+ if (i < (size_t)ret_buflen) {
jList = ENVPTR->GetObjectArrayElement(ENVONLY, (jobjectArray)ret_buf, (jsize)i);
}
if (NULL == jList) {
@@ -4647,21 +4622,20 @@ translate_rbuf(JNIEnv *env, jobjectArray ret_buf, jlong mem_type_id, H5T_class_t
if ((memb = H5Tget_member_type(mem_type_id, (unsigned int)x)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
- if ((memb_offset = H5Tget_member_offset(mem_type_id, (unsigned int)x)) < 0)
- H5_LIBRARY_ERROR(ENVONLY);
+ memb_offset = H5Tget_member_offset(mem_type_id, (unsigned int)x);
if ((memb_vlClass = H5Tget_class(memb)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (!(memb_vlSize = H5Tget_size(memb)))
H5_LIBRARY_ERROR(ENVONLY);
- jobj = translate_atomic_rbuf(ENVONLY, jList, memb, memb_vlClass,
+ jobj = translate_atomic_rbuf(ENVONLY, memb, memb_vlClass,
char_buf + i * typeSize + memb_offset);
if (jobj) {
if (found_jList == JNI_FALSE)
ENVPTR->CallBooleanMethod(ENVONLY, jList, arrAddMethod, (jobject)jobj);
else
- ENVPTR->SetObjectArrayElement(ENVONLY, jList, i, (jobject)jobj);
+ ENVPTR->SetObjectArrayElement(ENVONLY, jList, (jsize)i, (jobject)jobj);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
ENVPTR->DeleteLocalRef(ENVONLY, jobj);
}
@@ -4671,7 +4645,7 @@ translate_rbuf(JNIEnv *env, jobjectArray ret_buf, jlong mem_type_id, H5T_class_t
if (ret_buflen == 0)
ENVPTR->CallBooleanMethod(ENVONLY, ret_buf, arrAddMethod, jList);
else
- ENVPTR->SetObjectArrayElement(ENVONLY, ret_buf, i, jList);
+ ENVPTR->SetObjectArrayElement(ENVONLY, ret_buf, (jsize)i, jList);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
ENVPTR->DeleteLocalRef(ENVONLY, jList);
}
@@ -4704,7 +4678,7 @@ translate_rbuf(JNIEnv *env, jobjectArray ret_buf, jlong mem_type_id, H5T_class_t
HDmemcpy((char *)objBuf, char_buf + i * typeSize, typeSize);
/* The list we're going to return: */
- if (i < ret_buflen) {
+ if (i < (size_t)ret_buflen) {
if (NULL ==
(jList = ENVPTR->GetObjectArrayElement(ENVONLY, (jobjectArray)ret_buf, (jsize)i)))
found_jList = JNI_FALSE;
@@ -4720,7 +4694,7 @@ translate_rbuf(JNIEnv *env, jobjectArray ret_buf, jlong mem_type_id, H5T_class_t
if (found_jList == JNI_FALSE)
ENVPTR->CallBooleanMethod(ENVONLY, ret_buf, arrAddMethod, jList);
else
- ENVPTR->SetObjectArrayElement(ENVONLY, ret_buf, i, jList);
+ ENVPTR->SetObjectArrayElement(ENVONLY, ret_buf, (jsize)i, jList);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
ENVPTR->DeleteLocalRef(ENVONLY, jList);
}
@@ -4739,13 +4713,12 @@ translate_rbuf(JNIEnv *env, jobjectArray ret_buf, jlong mem_type_id, H5T_class_t
case H5T_STRING: {
/* Convert each element to a list */
for (i = 0; i < (size_t)count; i++) {
- jobj =
- translate_atomic_rbuf(ENVONLY, ret_buf, mem_type_id, type_class, char_buf + i * typeSize);
+ jobj = translate_atomic_rbuf(ENVONLY, mem_type_id, type_class, char_buf + i * typeSize);
if (jobj) {
if (ret_buflen == 0)
ENVPTR->CallBooleanMethod(ENVONLY, ret_buf, arrAddMethod, (jobject)jobj);
else
- ENVPTR->SetObjectArrayElement(ENVONLY, ret_buf, i, (jobject)jobj);
+ ENVPTR->SetObjectArrayElement(ENVONLY, ret_buf, (jsize)i, (jobject)jobj);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
ENVPTR->DeleteLocalRef(ENVONLY, jobj);
}
@@ -4781,23 +4754,6 @@ translate_wbuf(JNIEnv *env, jobjectArray in_buf, jlong mem_type_id, H5T_class_t
/* retrieve the toArray method */
jmethodID mToArray = ENVPTR->GetMethodID(ENVONLY, arrCList, "toArray", "()[Ljava/lang/Object;");
- /* Cache class types */
- /* jclass cBool = ENVPTR->FindClass(ENVONLY, "java/lang/Boolean"); */
- jclass cByte = ENVPTR->FindClass(ENVONLY, "java/lang/Byte");
- jclass cShort = ENVPTR->FindClass(ENVONLY, "java/lang/Short");
- jclass cInt = ENVPTR->FindClass(ENVONLY, "java/lang/Integer");
- jclass cLong = ENVPTR->FindClass(ENVONLY, "java/lang/Long");
- jclass cFloat = ENVPTR->FindClass(ENVONLY, "java/lang/Float");
- jclass cDouble = ENVPTR->FindClass(ENVONLY, "java/lang/Double");
-
- /* jmethodID boolValueMid = ENVPTR->GetMethodID(ENVONLY, cBool, "booleanValue", "()Z"); */
- jmethodID byteValueMid = ENVPTR->GetMethodID(ENVONLY, cByte, "byteValue", "()B");
- jmethodID shortValueMid = ENVPTR->GetMethodID(ENVONLY, cShort, "shortValue", "()S");
- jmethodID intValueMid = ENVPTR->GetMethodID(ENVONLY, cInt, "intValue", "()I");
- jmethodID longValueMid = ENVPTR->GetMethodID(ENVONLY, cLong, "longValue", "()J");
- jmethodID floatValueMid = ENVPTR->GetMethodID(ENVONLY, cFloat, "floatValue", "()F");
- jmethodID doubleValueMid = ENVPTR->GetMethodID(ENVONLY, cDouble, "doubleValue", "()D");
-
if (!(typeSize = H5Tget_size(mem_type_id)))
H5_LIBRARY_ERROR(ENVONLY);
@@ -4840,8 +4796,6 @@ translate_wbuf(JNIEnv *env, jobjectArray in_buf, jlong mem_type_id, H5T_class_t
break;
} /* H5T_VLEN */
case H5T_COMPOUND: {
- void *objBuf = NULL;
-
/* Convert each list to a compound element */
for (i = 0; i < (size_t)count; i++) {
if (NULL == (jList = ENVPTR->GetObjectArrayElement(ENVONLY, (jobjectArray)in_buf, (jsize)i)))
@@ -4867,15 +4821,14 @@ translate_wbuf(JNIEnv *env, jobjectArray in_buf, jlong mem_type_id, H5T_class_t
if ((memb = H5Tget_member_type(mem_type_id, (unsigned int)x)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
- if ((memb_offset = H5Tget_member_offset(mem_type_id, (unsigned int)x)) < 0)
- H5_LIBRARY_ERROR(ENVONLY);
+ memb_offset = H5Tget_member_offset(mem_type_id, (unsigned int)x);
if ((memb_vlClass = H5Tget_class(memb)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (!(memb_vlSize = H5Tget_size(memb)))
H5_LIBRARY_ERROR(ENVONLY);
- jobject arr_obj = ENVPTR->GetObjectArrayElement(ENVONLY, array, x);
+ jobject arr_obj = ENVPTR->GetObjectArrayElement(ENVONLY, array, (jsize)x);
translate_atomic_wbuf(ENVONLY, arr_obj, memb, memb_vlClass,
char_buf + i * typeSize + memb_offset);
ENVPTR->DeleteLocalRef(ENVONLY, arr_obj);
@@ -4887,8 +4840,6 @@ translate_wbuf(JNIEnv *env, jobjectArray in_buf, jlong mem_type_id, H5T_class_t
break;
} /* H5T_COMPOUND */
case H5T_ARRAY: {
- void *objBuf = NULL;
-
if (!(memb = H5Tget_super(mem_type_id)))
H5_LIBRARY_ERROR(ENVONLY);
if ((vlClass = H5Tget_class(memb)) < 0)
@@ -4910,8 +4861,8 @@ translate_wbuf(JNIEnv *env, jobjectArray in_buf, jlong mem_type_id, H5T_class_t
if (jnelmts < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "translate_wbuf: number of array elements < 0");
- translate_wbuf(ENVONLY, array, memb, vlClass, (jsize)jnelmts,
- char_buf + i * vlSize * jnelmts); // objBuf);
+ translate_wbuf(ENVONLY, array, memb, vlClass, jnelmts,
+ char_buf + i * vlSize * (size_t)jnelmts);
ENVPTR->DeleteLocalRef(ENVONLY, jList);
} /* end for (i = 0; i < count; i++) */
diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h
index 891b348..5363e0f 100644
--- a/src/H5FDpublic.h
+++ b/src/H5FDpublic.h
@@ -314,6 +314,7 @@ typedef struct {
/**
* \param[in] dest Address of the destination buffer
* \param[in] src Address of the source buffer
+ * \param[in] size Size in bytes of the file image buffer to allocate
* \param[in] file_image_op A value from #H5FD_file_image_op_t indicating
* the operation being performed on the file image
* when this callback is invoked
@@ -326,6 +327,7 @@ typedef struct {
//!
/**
* \param[in] ptr Pointer to the buffer being reallocated
+ * \param[in] size Size in bytes of the file image buffer to allocate
* \param[in] file_image_op A value from #H5FD_file_image_op_t indicating
* the operation being performed on the file image
* when this callback is invoked
@@ -336,6 +338,10 @@ typedef struct {
void *(*image_realloc)(void *ptr, size_t size, H5FD_file_image_op_t file_image_op, void *udata);
//!
/**
+ * \param[in] ptr Pointer to the buffer being reallocated
+ * \param[in] file_image_op A value from #H5FD_file_image_op_t indicating
+ * the operation being performed on the file image
+ * when this callback is invoked
* \param[in] udata Value passed in in the H5Pset_file_image_callbacks
* parameter \p udata
*/
--
cgit v0.12