summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MANIFEST8
-rwxr-xr-xbin/release216
-rw-r--r--hl/src/H5DS.c7
-rw-r--r--hl/src/H5LTanalyze.c1163
-rw-r--r--hl/src/H5LTanalyze.l7
-rw-r--r--hl/src/H5LTparse.c1368
-rw-r--r--hl/src/H5LTparse.h155
-rw-r--r--release_docs/RELEASE.txt11
-rw-r--r--src/H5AC.c72
-rw-r--r--src/H5Adense.c80
-rw-r--r--src/H5Aint.c207
-rw-r--r--src/H5B2.c17
-rw-r--r--src/H5B2hdr.c11
-rw-r--r--src/H5EAdbg.c56
-rw-r--r--src/H5Eint.c3
-rw-r--r--src/H5F.c134
-rw-r--r--src/H5FD.c2
-rw-r--r--src/H5Gloc.c4
-rw-r--r--src/H5I.c120
-rw-r--r--src/H5Ochunk.c11
-rw-r--r--src/H5Ocont.c6
-rw-r--r--src/H5Ofsinfo.c2
-rw-r--r--src/H5Olink.c19
-rw-r--r--src/H5Spoint.c2
-rw-r--r--src/H5TS.c1
-rw-r--r--src/H5Tdbg.c12
-rw-r--r--src/H5Z.c126
-rw-r--r--src/H5public.h16
-rw-r--r--src/H5system.c8
-rw-r--r--src/H5trace.c86
-rw-r--r--test/H5srcdir.h4
-rw-r--r--test/chunk_info.c28
-rw-r--r--test/dtypes.c598
-rw-r--r--test/gen_bogus.c2
-rw-r--r--test/gen_new_super.c34
-rw-r--r--test/gen_nullspace.c27
-rw-r--r--test/gen_specmetaread.c3
-rw-r--r--test/h5test.c23
-rw-r--r--test/links.c19
-rw-r--r--test/th5o.c22
-rw-r--r--test/trefer.c8
-rw-r--r--test/vds_swmr.h2
-rw-r--r--test/vfd.c264
-rw-r--r--tools/lib/h5diff.c2
-rw-r--r--tools/lib/h5diff.h1
-rw-r--r--tools/lib/h5diff_array.c201
-rw-r--r--tools/lib/h5diff_attr.c53
-rw-r--r--tools/lib/h5diff_dset.c14
-rw-r--r--tools/lib/h5tools.c2
-rw-r--r--tools/lib/h5tools_dump.c6
-rw-r--r--tools/lib/h5tools_str.c16
-rw-r--r--tools/src/h5diff/h5diff_common.c5
-rw-r--r--tools/src/h5format_convert/h5format_convert.c6
-rw-r--r--tools/src/h5import/h5import.c4
-rw-r--r--tools/src/h5ls/h5ls.c2
-rw-r--r--tools/src/misc/h5mkgrp.c8
-rw-r--r--tools/test/h5copy/testh5copy.sh.in10
-rw-r--r--tools/test/h5diff/CMakeTests.cmake23
-rw-r--r--tools/test/h5diff/h5diff_plugin.sh.in117
-rw-r--r--tools/test/h5diff/h5diffgentest.c8
-rw-r--r--tools/test/h5diff/testfiles/h5diff_eps.txt4
-rw-r--r--tools/test/h5diff/testfiles/h5diff_eps1.h5 (renamed from tools/test/h5diff/testfiles/diff_eps1.h5)bin2272 -> 2272 bytes
-rw-r--r--tools/test/h5diff/testfiles/h5diff_eps2.h5 (renamed from tools/test/h5diff/testfiles/diff_eps2.h5)bin2272 -> 2272 bytes
-rw-r--r--tools/test/h5diff/testfiles/h5diff_strings1.h5 (renamed from tools/test/h5diff/testfiles/diff_strings1.h5)bin4640 -> 4640 bytes
-rw-r--r--tools/test/h5diff/testfiles/h5diff_strings2.h5 (renamed from tools/test/h5diff/testfiles/diff_strings2.h5)bin4640 -> 4640 bytes
-rw-r--r--tools/test/h5diff/testh5diff.sh.in61
-rw-r--r--tools/test/h5dump/h5dump_plugin.sh.in28
-rw-r--r--tools/test/h5dump/testh5dump.sh.in381
-rw-r--r--tools/test/h5dump/testh5dumppbits.sh.in158
-rw-r--r--tools/test/h5dump/testh5dumpvds.sh.in172
-rw-r--r--tools/test/h5dump/testh5dumpxml.sh.in31
-rw-r--r--tools/test/h5jam/tellub.c6
-rw-r--r--tools/test/h5ls/h5ls_plugin.sh.in6
-rw-r--r--tools/test/misc/testh5mkgrp.sh.in91
74 files changed, 3198 insertions, 3182 deletions
diff --git a/MANIFEST b/MANIFEST
index f2c8318..9720ebf 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2400,8 +2400,6 @@
#test files for h5diff
-./tools/test/h5diff/testfiles/diff_eps1.txt
-./tools/test/h5diff/testfiles/diff_eps2.txt
./tools/test/h5diff/testfiles/h5diff_10.txt
./tools/test/h5diff/testfiles/h5diff_11.txt
./tools/test/h5diff/testfiles/h5diff_12.txt
@@ -2609,6 +2607,8 @@
./tools/test/h5diff/testfiles/h5diff_dset3.h5
./tools/test/h5diff/testfiles/h5diff_dtypes.h5
./tools/test/h5diff/testfiles/h5diff_empty.h5
+./tools/test/h5diff/testfiles/h5diff_eps1.h5
+./tools/test/h5diff/testfiles/h5diff_eps2.h5
./tools/test/h5diff/testfiles/h5diff_hyper1.h5
./tools/test/h5diff/testfiles/h5diff_hyper2.h5
./tools/test/h5diff/testfiles/h5diff_types.h5
@@ -2649,8 +2649,8 @@
./tools/test/h5diff/testfiles/h5diff_ud.txt
./tools/test/h5diff/testfiles/h5diff_udfail.err
./tools/test/h5diff/testfiles/h5diff_udfail.txt
-./tools/test/h5diff/testfiles/diff_strings1.h5
-./tools/test/h5diff/testfiles/diff_strings2.h5
+./tools/test/h5diff/testfiles/h5diff_strings1.h5
+./tools/test/h5diff/testfiles/h5diff_strings2.h5
./tools/test/h5diff/testfiles/h5diff_vlstr.txt
#vds
./tools/test/h5diff/testfiles/h5diff_v1.txt
diff --git a/bin/release b/bin/release
index a34191e..95f58ea 100755
--- a/bin/release
+++ b/bin/release
@@ -39,7 +39,7 @@ USAGE()
{
cat << EOF
Usage: $0 -d <dir> [--docver BRANCHNAME] [-h] [--nocheck] [--private] <methods> ...
- -d DIR The name of the directory where the releas(es) should be
+ -d DIR The name of the directory where the releas(es) should be
placed.
--docver BRANCHNAME This is added for 1.8 and beyond to get the correct
version of documentation files from the hdf5docs
@@ -53,10 +53,10 @@ The other command-line options are the names of the programs to use
for compressing the resulting tar archive (if none are given then
"tar" is assumed):
- tar -- use tar and don't do any compressing.
- gzip -- use gzip with "-9" and append ".gz" to the output name.
+ tar -- use tar and don't do any compressing.
+ gzip -- use gzip with "-9" and append ".gz" to the output name.
bzip2 -- use bzip2 with "-9" and append ".bz2" to the output name.
- zip -- convert all text files to DOS style and form a zip file for Windows use.
+ zip -- convert all text files to DOS style and form a zip file for Windows use.
cmake-tgz -- create a tar file using the gzip default level with a build-unix.sh
command file and all other CMake files needed to build HDF5 source
using CMake on unix machines.
@@ -122,8 +122,8 @@ EOF
tar2zip()
{
if [ $# -ne 3 ]; then
- echo "usage: tar2zip <tarfilename> <zipfilename>"
- return 1
+ echo "usage: tar2zip <tarfilename> <zipfilename>"
+ return 1
fi
ztmpdir=/tmp/ztmpdir$$
mkdir -p $ztmpdir
@@ -135,10 +135,10 @@ tar2zip()
(cd $ztmpdir; tar xf -) < $tarfile
# sanity check
if [ ! -d $ztmpdir/$version ]; then
- echo "untar did not create $ztmpdir/$version source dir"
- # cleanup
- rm -rf $ztmpdir
- return 1
+ echo "untar did not create $ztmpdir/$version source dir"
+ # cleanup
+ rm -rf $ztmpdir
+ return 1
fi
# step 2: convert text files
# There maybe a simpler way to do this.
@@ -147,11 +147,11 @@ tar2zip()
# -q quiet mode
# grep redirect output to /dev/null because -q or -s are not portable.
find $ztmpdir/$version | \
- while read inf; do \
- if file $inf | grep "$inf\: .*text" > /dev/null 2>&1 ; then \
- unix2dos -q -k $inf; \
- fi\
- done
+ while read inf; do \
+ if file $inf | grep "$inf\: .*text" > /dev/null 2>&1 ; then \
+ unix2dos -q -k $inf; \
+ fi\
+ done
# step 3: make zipball
# -9 maximum compression
# -y Store symbolic links as such in the zip archive
@@ -202,8 +202,8 @@ tar2zip()
tar2cmakezip()
{
if [ $# -ne 3 ]; then
- echo "usage: tar2cmakezip <tarfilename> <zipfilename>"
- return 1
+ echo "usage: tar2cmakezip <tarfilename> <zipfilename>"
+ return 1
fi
cmziptmpdir=/tmp/cmziptmpdir$$
cmziptmpsubdir=$cmziptmpdir/CMake-$HDF5_VERS
@@ -216,10 +216,10 @@ tar2cmakezip()
(cd $cmziptmpsubdir; tar xf -) < $tarfile
# sanity check
if [ ! -d $cmziptmpsubdir/$version ]; then
- echo "untar did not create $cmziptmpsubdir/$version source dir"
- # cleanup
- rm -rf $cmziptmpdir
- return 1
+ echo "untar did not create $cmziptmpsubdir/$version source dir"
+ # cleanup
+ rm -rf $cmziptmpdir
+ return 1
fi
# step 2: add batch file for building CMake on window
@@ -245,11 +245,11 @@ tar2cmakezip()
# -q quiet mode
# grep redirect output to /dev/null because -q or -s are not portable.
find $cmziptmpsubdir/$version | \
- while read inf; do \
- if file $inf | grep "$inf\: .*text" > /dev/null 2>&1 ; then \
- unix2dos -q -k $inf; \
- fi\
- done
+ while read inf; do \
+ if file $inf | grep "$inf\: .*text" > /dev/null 2>&1 ; then \
+ unix2dos -q -k $inf; \
+ fi\
+ done
# step 3: make zipball
# -9 maximum compression
@@ -301,8 +301,8 @@ tar2cmakezip()
tar2cmaketgz()
{
if [ $# -ne 3 ]; then
- echo "usage: tar2cmaketgz <tarfilename> <tgzfilename>"
- return 1
+ echo "usage: tar2cmaketgz <tarfilename> <tgzfilename>"
+ return 1
fi
cmgztmpdir=/tmp/cmgztmpdir$$
cmgztmpsubdir=$cmgztmpdir/CMake-$HDF5_VERS
@@ -315,10 +315,10 @@ tar2cmaketgz()
(cd $cmgztmpsubdir; tar xf -) < $tarfile
# sanity check
if [ ! -d $cmgztmpsubdir/$version ]; then
- echo "untar did not create $cmgztmpsubdir/$version source dir"
- # cleanup
- rm -rf $cmgztmpdir
- return 1
+ echo "untar did not create $cmgztmpsubdir/$version source dir"
+ # cleanup
+ rm -rf $cmgztmpdir
+ return 1
fi
@@ -384,8 +384,8 @@ tar2cmaketgz()
tar2hpccmaketgz()
{
if [ $# -ne 3 ]; then
- echo "usage: tar2hpccmaketgz <tarfilename> <tgzfilename>"
- return 1
+ echo "usage: tar2hpccmaketgz <tarfilename> <tgzfilename>"
+ return 1
fi
cmgztmpdir=/tmp/cmgztmpdir$$
cmgztmpsubdir=$cmgztmpdir/HPC-CMake-$HDF5_VERS
@@ -398,10 +398,10 @@ tar2hpccmaketgz()
(cd $cmgztmpsubdir; tar xf -) < $tarfile
# sanity check
if [ ! -d $cmgztmpsubdir/$version ]; then
- echo "untar did not create $cmgztmpsubdir/$version source dir"
- # cleanup
- rm -rf $cmgztmpdir
- return 1
+ echo "untar did not create $cmgztmpsubdir/$version source dir"
+ # cleanup
+ rm -rf $cmgztmpdir
+ return 1
fi
@@ -442,7 +442,7 @@ check=yes
release_date=`date +%F`
today=`date +%Y%m%d`
pmode='no'
-tmpdir="../#release_tmp.$$" # tmp work directory
+tmpdir="../#release_tmp.$$" # tmp work directory
DOC_URL=https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5doc.git
CPPLUS_RM_NAME=cpplus_RM
MAINT_MODE_ENABLED=""
@@ -459,11 +459,11 @@ fi
RESTORE_VERSION()
{
if [ X-${VERS_OLD} != X- ]; then
- echo restoring version information back to $VERS_OLD
- rm -f config/lt_vers.am
- cp $tmpdir/lt_vers.am config/lt_vers.am
- bin/h5vers -s $VERS_OLD
- VERS_OLD=
+ echo restoring version information back to $VERS_OLD
+ rm -f config/lt_vers.am
+ cp $tmpdir/lt_vers.am config/lt_vers.am
+ bin/h5vers -s $VERS_OLD
+ VERS_OLD=
fi
}
@@ -473,32 +473,32 @@ while [ -n "$1" ]; do
arg=$1
shift
case "$arg" in
- -d)
- DEST=$1
- shift
- ;;
- --nocheck)
- check=no
- ;;
- -h)
- USAGE
- exit 0
- ;;
- --private)
- pmode=yes
- ;;
+ -d)
+ DEST=$1
+ shift
+ ;;
+ --nocheck)
+ check=no
+ ;;
+ -h)
+ USAGE
+ exit 0
+ ;;
+ --private)
+ pmode=yes
+ ;;
--docver)
DOCVERSION=$1
shift
;;
- -*)
- echo "Unknown switch: $arg" 1>&2
- USAGE
- exit 1
- ;;
- *)
- methods="$methods $arg"
- ;;
+ -*)
+ echo "Unknown switch: $arg" 1>&2
+ USAGE
+ exit 1
+ ;;
+ *)
+ methods="$methods $arg"
+ ;;
esac
done
@@ -553,7 +553,7 @@ if [ "X$fail" = "Xyes" ]; then
echo "--nocheck argument to the bin/release command."
exit 1
else
- echo "Continuing anyway..."
+ echo "Continuing anyway..."
fi
fi
@@ -595,61 +595,61 @@ MD5file=$HDF5_VERS.md5
cp /dev/null $DEST/$MD5file
for comp in $methods; do
case $comp in
- tar)
- cp -p $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.tar
- (cd $DEST; md5sum $HDF5_VERS.tar >> $MD5file)
- ;;
- gzip)
- test "$verbose" && echo " Running gzip..." 1>&2
- gzip -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.gz
- (cd $DEST; md5sum $HDF5_VERS.tar.gz >> $MD5file)
- ;;
+ tar)
+ cp -p $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.tar
+ (cd $DEST; md5sum $HDF5_VERS.tar >> $MD5file)
+ ;;
+ gzip)
+ test "$verbose" && echo " Running gzip..." 1>&2
+ gzip -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.gz
+ (cd $DEST; md5sum $HDF5_VERS.tar.gz >> $MD5file)
+ ;;
cmake-tgz)
- test "$verbose" && echo " Creating CMake tar.gz file..." 1>&2
- tar2cmaketgz $HDF5_VERS $tmpdir/$HDF5_VERS.tar $DEST/CMake-$HDF5_VERS.tar.gz 1>&2
- (cd $DEST; md5sum CMake-$HDF5_VERS.tar.gz >> $MD5file)
+ test "$verbose" && echo " Creating CMake tar.gz file..." 1>&2
+ tar2cmaketgz $HDF5_VERS $tmpdir/$HDF5_VERS.tar $DEST/CMake-$HDF5_VERS.tar.gz 1>&2
+ (cd $DEST; md5sum CMake-$HDF5_VERS.tar.gz >> $MD5file)
;;
hpc-cmake-tgz)
- test "$verbose" && echo " Creating HPC-CMake tar.gz file..." 1>&2
- tar2hpccmaketgz $HDF5_VERS $tmpdir/$HDF5_VERS.tar $DEST/HPC-CMake-$HDF5_VERS.tar.gz 1>&2
- (cd $DEST; md5sum HPC-CMake-$HDF5_VERS.tar.gz >> $MD5file)
+ test "$verbose" && echo " Creating HPC-CMake tar.gz file..." 1>&2
+ tar2hpccmaketgz $HDF5_VERS $tmpdir/$HDF5_VERS.tar $DEST/HPC-CMake-$HDF5_VERS.tar.gz 1>&2
+ (cd $DEST; md5sum HPC-CMake-$HDF5_VERS.tar.gz >> $MD5file)
+ ;;
+ bzip2)
+ test "$verbose" && echo " Running bzip2..." 1>&2
+ bzip2 -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.bz2
+ (cd $DEST; md5sum $HDF5_VERS.tar.bz2 >> $MD5file)
+ ;;
+ zip)
+ test "$verbose" && echo " Creating zip ball..." 1>&2
+ tar2zip $HDF5_VERS $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.zip 1>&2
+ (cd $DEST; md5sum $HDF5_VERS.zip >> $MD5file)
;;
- bzip2)
- test "$verbose" && echo " Running bzip2..." 1>&2
- bzip2 -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.bz2
- (cd $DEST; md5sum $HDF5_VERS.tar.bz2 >> $MD5file)
- ;;
- zip)
- test "$verbose" && echo " Creating zip ball..." 1>&2
- tar2zip $HDF5_VERS $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.zip 1>&2
- (cd $DEST; md5sum $HDF5_VERS.zip >> $MD5file)
- ;;
cmake-zip)
test "$verbose" && echo " Creating CMake-zip ball..." 1>&2
tar2cmakezip $HDF5_VERS $tmpdir/$HDF5_VERS.tar $DEST/CMake-$HDF5_VERS.zip 1>&2
(cd $DEST; md5sum CMake-$HDF5_VERS.zip >> $MD5file)
;;
- doc)
+ doc)
if [ "${DOCVERSION}" = "" ]; then
DOCVERSION=master
fi
- test "$verbose" && echo " Creating docs..." 1>&2
- # Check out docs from git repo
- (cd $tmpdir; git clone -q $DOC_URL ${DOCVERSION} > /dev/null) || exit 1
+ test "$verbose" && echo " Creating docs..." 1>&2
+ # Check out docs from git repo
+ (cd $tmpdir; git clone -q $DOC_URL ${DOCVERSION} > /dev/null) || exit 1
# Create doxygen C++ RM
- (cd c++/src && doxygen cpp_doc_config > /dev/null ) || exit 1
- # Replace version of C++ RM with just-created version
- rm -rf $tmpdir/${DOCVERSION}/html/$CPPLUS_RM_NAME || exit 1
- mv c++/src/$CPPLUS_RM_NAME $tmpdir/${DOCVERSION}/html/$CPPLUS_RM_NAME || exit 1
+ (cd c++/src && doxygen cpp_doc_config > /dev/null ) || exit 1
+ # Replace version of C++ RM with just-created version
+ rm -rf $tmpdir/${DOCVERSION}/html/$CPPLUS_RM_NAME || exit 1
+ mv c++/src/$CPPLUS_RM_NAME $tmpdir/${DOCVERSION}/html/$CPPLUS_RM_NAME || exit 1
# Compress the docs and move them to the release area
- mv $tmpdir/${DOCVERSION} $tmpdir/${HDF5_VERS}_docs || exit 1
- (cd $tmpdir && tar cf ${HDF5_VERS}_docs.tar ${HDF5_VERS}_docs) || exit 1
- mv $tmpdir/${HDF5_VERS}_docs.tar $DEST || exit 1
- ;;
- *)
- echo "***Error*** Unknown method $comp"
- exit 1
- ;;
+ mv $tmpdir/${DOCVERSION} $tmpdir/${HDF5_VERS}_docs || exit 1
+ (cd $tmpdir && tar cf ${HDF5_VERS}_docs.tar ${HDF5_VERS}_docs) || exit 1
+ mv $tmpdir/${HDF5_VERS}_docs.tar $DEST || exit 1
+ ;;
+ *)
+ echo "***Error*** Unknown method $comp"
+ exit 1
+ ;;
esac
done
diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c
index 63fb461..82dc129 100644
--- a/hl/src/H5DS.c
+++ b/hl/src/H5DS.c
@@ -1460,10 +1460,6 @@ out:
*
* Date: January 11, 2005
*
-* Comments:
-*
-* Modifications:
-*
*-------------------------------------------------------------------------
*/
@@ -1481,6 +1477,9 @@ herr_t H5DSset_label(hid_t did, unsigned int idx, const char *label)
char ** buf; /* discarding the 'const' qualifier in the free */
char const ** const_buf; /* buf calls */
} u;
+
+ HDmemset(&u, 0, sizeof(u));
+
/*-------------------------------------------------------------------------
* parameter checking
*-------------------------------------------------------------------------
diff --git a/hl/src/H5LTanalyze.c b/hl/src/H5LTanalyze.c
index c05db67..e5f0bea 100644
--- a/hl/src/H5LTanalyze.c
+++ b/hl/src/H5LTanalyze.c
@@ -1,25 +1,25 @@
-#if defined __GNUC__ && 402 <= __GNUC__ * 100 + __GNUC_MINOR__
-#pragma GCC diagnostic ignored "-Wconversion"
-#pragma GCC diagnostic ignored "-Wimplicit-function-declaration"
-#pragma GCC diagnostic ignored "-Wlarger-than="
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-#pragma GCC diagnostic ignored "-Wnested-externs"
-#pragma GCC diagnostic ignored "-Wold-style-definition"
-#pragma GCC diagnostic ignored "-Wredundant-decls"
-#pragma GCC diagnostic ignored "-Wsign-compare"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wstrict-overflow"
-#pragma GCC diagnostic ignored "-Wstrict-prototypes"
-#pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
-#pragma GCC diagnostic ignored "-Wswitch-default"
-#pragma GCC diagnostic ignored "-Wunused-function"
-#pragma GCC diagnostic ignored "-Wunused-macros"
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#elif defined __SUNPRO_CC
-#pragma disable_warn
-#elif defined _MSC_VER
-#pragma warning(push, 1)
-#endif
+#if defined __GNUC__ && 402 <= __GNUC__ * 100 + __GNUC_MINOR__
+#pragma GCC diagnostic ignored "-Wconversion"
+#pragma GCC diagnostic ignored "-Wimplicit-function-declaration"
+#pragma GCC diagnostic ignored "-Wlarger-than="
+#pragma GCC diagnostic ignored "-Wmissing-prototypes"
+#pragma GCC diagnostic ignored "-Wnested-externs"
+#pragma GCC diagnostic ignored "-Wold-style-definition"
+#pragma GCC diagnostic ignored "-Wredundant-decls"
+#pragma GCC diagnostic ignored "-Wsign-compare"
+#pragma GCC diagnostic ignored "-Wsign-conversion"
+#pragma GCC diagnostic ignored "-Wstrict-overflow"
+#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
+#pragma GCC diagnostic ignored "-Wswitch-default"
+#pragma GCC diagnostic ignored "-Wunused-function"
+#pragma GCC diagnostic ignored "-Wunused-macros"
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#elif defined __SUNPRO_CC
+#pragma disable_warn
+#elif defined _MSC_VER
+#pragma warning(push, 1)
+#endif
#line 2 "hl/src/H5LTanalyze.c"
#line 4 "hl/src/H5LTanalyze.c"
@@ -30,11 +30,17 @@
#define yy_create_buffer H5LTyy_create_buffer
#define yy_delete_buffer H5LTyy_delete_buffer
-#define yy_flex_debug H5LTyy_flex_debug
+#define yy_scan_buffer H5LTyy_scan_buffer
+#define yy_scan_string H5LTyy_scan_string
+#define yy_scan_bytes H5LTyy_scan_bytes
#define yy_init_buffer H5LTyy_init_buffer
#define yy_flush_buffer H5LTyy_flush_buffer
#define yy_load_buffer_state H5LTyy_load_buffer_state
#define yy_switch_to_buffer H5LTyy_switch_to_buffer
+#define yypush_buffer_state H5LTyypush_buffer_state
+#define yypop_buffer_state H5LTyypop_buffer_state
+#define yyensure_buffer_stack H5LTyyensure_buffer_stack
+#define yy_flex_debug H5LTyy_flex_debug
#define yyin H5LTyyin
#define yyleng H5LTyyleng
#define yylex H5LTyylex
@@ -49,12 +55,246 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 37
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
+#ifdef yy_create_buffer
+#define H5LTyy_create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer H5LTyy_create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define H5LTyy_delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer H5LTyy_delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define H5LTyy_scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer H5LTyy_scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define H5LTyy_scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string H5LTyy_scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define H5LTyy_scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes H5LTyy_scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define H5LTyy_init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer H5LTyy_init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define H5LTyy_flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer H5LTyy_flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define H5LTyy_load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state H5LTyy_load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define H5LTyy_switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer H5LTyy_switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define H5LTyypush_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state H5LTyypush_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define H5LTyypop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state H5LTyypop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define H5LTyyensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack H5LTyyensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define H5LTyylex_ALREADY_DEFINED
+#else
+#define yylex H5LTyylex
+#endif
+
+#ifdef yyrestart
+#define H5LTyyrestart_ALREADY_DEFINED
+#else
+#define yyrestart H5LTyyrestart
+#endif
+
+#ifdef yylex_init
+#define H5LTyylex_init_ALREADY_DEFINED
+#else
+#define yylex_init H5LTyylex_init
+#endif
+
+#ifdef yylex_init_extra
+#define H5LTyylex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra H5LTyylex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define H5LTyylex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy H5LTyylex_destroy
+#endif
+
+#ifdef yyget_debug
+#define H5LTyyget_debug_ALREADY_DEFINED
+#else
+#define yyget_debug H5LTyyget_debug
+#endif
+
+#ifdef yyset_debug
+#define H5LTyyset_debug_ALREADY_DEFINED
+#else
+#define yyset_debug H5LTyyset_debug
+#endif
+
+#ifdef yyget_extra
+#define H5LTyyget_extra_ALREADY_DEFINED
+#else
+#define yyget_extra H5LTyyget_extra
+#endif
+
+#ifdef yyset_extra
+#define H5LTyyset_extra_ALREADY_DEFINED
+#else
+#define yyset_extra H5LTyyset_extra
+#endif
+
+#ifdef yyget_in
+#define H5LTyyget_in_ALREADY_DEFINED
+#else
+#define yyget_in H5LTyyget_in
+#endif
+
+#ifdef yyset_in
+#define H5LTyyset_in_ALREADY_DEFINED
+#else
+#define yyset_in H5LTyyset_in
+#endif
+
+#ifdef yyget_out
+#define H5LTyyget_out_ALREADY_DEFINED
+#else
+#define yyget_out H5LTyyget_out
+#endif
+
+#ifdef yyset_out
+#define H5LTyyset_out_ALREADY_DEFINED
+#else
+#define yyset_out H5LTyyset_out
+#endif
+
+#ifdef yyget_leng
+#define H5LTyyget_leng_ALREADY_DEFINED
+#else
+#define yyget_leng H5LTyyget_leng
+#endif
+
+#ifdef yyget_text
+#define H5LTyyget_text_ALREADY_DEFINED
+#else
+#define yyget_text H5LTyyget_text
+#endif
+
+#ifdef yyget_lineno
+#define H5LTyyget_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno H5LTyyget_lineno
+#endif
+
+#ifdef yyset_lineno
+#define H5LTyyset_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno H5LTyyset_lineno
+#endif
+
+#ifdef yywrap
+#define H5LTyywrap_ALREADY_DEFINED
+#else
+#define yywrap H5LTyywrap
+#endif
+
+#ifdef yyalloc
+#define H5LTyyalloc_ALREADY_DEFINED
+#else
+#define yyalloc H5LTyyalloc
+#endif
+
+#ifdef yyrealloc
+#define H5LTyyrealloc_ALREADY_DEFINED
+#else
+#define yyrealloc H5LTyyrealloc
+#endif
+
+#ifdef yyfree
+#define H5LTyyfree_ALREADY_DEFINED
+#else
+#define yyfree H5LTyyfree
+#endif
+
+#ifdef yytext
+#define H5LTyytext_ALREADY_DEFINED
+#else
+#define yytext H5LTyytext
+#endif
+
+#ifdef yyleng
+#define H5LTyyleng_ALREADY_DEFINED
+#else
+#define yyleng H5LTyyleng
+#endif
+
+#ifdef yyin
+#define H5LTyyin_ALREADY_DEFINED
+#else
+#define yyin H5LTyyin
+#endif
+
+#ifdef yyout
+#define H5LTyyout_ALREADY_DEFINED
+#else
+#define yyout H5LTyyout
+#endif
+
+#ifdef yy_flex_debug
+#define H5LTyy_flex_debug_ALREADY_DEFINED
+#else
+#define yy_flex_debug H5LTyy_flex_debug
+#endif
+
+#ifdef yylineno
+#define H5LTyylineno_ALREADY_DEFINED
+#else
+#define yylineno H5LTyylineno
+#endif
+
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
@@ -75,7 +315,7 @@
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
@@ -92,7 +332,7 @@ typedef uint32_t flex_uint32_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
@@ -125,65 +365,61 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
+/* begin standard C++ headers. */
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
#else
-#define yyconst
+#define yynoreturn
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
*/
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN (yy_start) = 1 + 2 *
-
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START
-
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE H5LTyyrestart(H5LTyyin )
-
+#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -200,30 +436,30 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
typedef size_t yy_size_t;
#endif
-extern yy_size_t H5LTyyleng;
+extern int yyleng;
-extern FILE *H5LTyyin, *H5LTyyout;
+extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
-
+
#define YY_LESS_LINENO(n)
-
+ #define YY_LINENO_REWIND_TO(ptr)
+
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up H5LTyytext. */ \
+ /* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = (yy_hold_char); \
YY_RESTORE_YY_MORE_OFFSET \
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
- YY_DO_BEFORE_ACTION; /* set up H5LTyytext again */ \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_STRUCT_YY_BUFFER_STATE
@@ -238,12 +474,12 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- yy_size_t yy_buf_size;
+ int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- yy_size_t yy_n_chars;
+ int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -283,8 +519,8 @@ struct yy_buffer_state
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
- * (via H5LTyyrestart()), so that the user can continue scanning by
- * just pointing H5LTyyin at a new input file.
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
@@ -294,7 +530,7 @@ struct yy_buffer_state
/* Stack of input buffers. */
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
@@ -305,103 +541,98 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)
-
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
-/* yy_hold_char holds the character lost when H5LTyytext is formed. */
+/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
-static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
-yy_size_t H5LTyyleng;
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+int yyleng;
/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
+static char *yy_c_buf_p = NULL;
static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
-/* Flag which is used to allow H5LTyywrap()'s to do buffer switches
- * instead of setting up a fresh H5LTyyin. A bit of a hack ...
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
-void H5LTyyrestart (FILE *input_file );
-void H5LTyy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE H5LTyy_create_buffer (FILE *file,int size );
-void H5LTyy_delete_buffer (YY_BUFFER_STATE b );
-void H5LTyy_flush_buffer (YY_BUFFER_STATE b );
-void H5LTyypush_buffer_state (YY_BUFFER_STATE new_buffer );
-void H5LTyypop_buffer_state (void );
+void yyrestart ( FILE *input_file );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
+void yy_delete_buffer ( YY_BUFFER_STATE b );
+void yy_flush_buffer ( YY_BUFFER_STATE b );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state ( void );
-static void H5LTyyensure_buffer_stack (void );
-static void H5LTyy_load_buffer_state (void );
-static void H5LTyy_init_buffer (YY_BUFFER_STATE b,FILE *file );
+static void yyensure_buffer_stack ( void );
+static void yy_load_buffer_state ( void );
+static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
-#define YY_FLUSH_BUFFER H5LTyy_flush_buffer(YY_CURRENT_BUFFER )
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
-YY_BUFFER_STATE H5LTyy_scan_buffer (char *base,yy_size_t size );
-YY_BUFFER_STATE H5LTyy_scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE H5LTyy_scan_bytes (yyconst char *bytes,yy_size_t len );
-
-void *H5LTyyalloc (yy_size_t );
-void *H5LTyyrealloc (void *,yy_size_t );
-void H5LTyyfree (void * );
-
-#define yy_new_buffer H5LTyy_create_buffer
+void *yyalloc ( yy_size_t );
+void *yyrealloc ( void *, yy_size_t );
+void yyfree ( void * );
+#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
- H5LTyyensure_buffer_stack (); \
+ yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- H5LTyy_create_buffer(H5LTyyin,YY_BUF_SIZE ); \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
-
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
- H5LTyyensure_buffer_stack (); \
+ yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- H5LTyy_create_buffer(H5LTyyin,YY_BUF_SIZE ); \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
-
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
/* Begin user sect3 */
+typedef flex_uint8_t YY_CHAR;
-typedef unsigned char YY_CHAR;
-
-FILE *H5LTyyin = (FILE *) 0, *H5LTyyout = (FILE *) 0;
+FILE *yyin = NULL, *yyout = NULL;
typedef int yy_state_type;
-extern int H5LTyylineno;
+extern int yylineno;
+int yylineno = 1;
-int H5LTyylineno = 1;
-
-extern char *H5LTyytext;
-#define yytext_ptr H5LTyytext
+extern char *yytext;
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
+#define yytext_ptr yytext
-static yy_state_type yy_get_previous_state (void );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
-static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[] );
+static yy_state_type yy_get_previous_state ( void );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
+static int yy_get_next_buffer ( void );
+static void yynoreturn yy_fatal_error ( const char* msg );
/* Done after the current pattern has been matched and before the
- * corresponding action - sets up H5LTyytext.
+ * corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
- H5LTyyleng = (size_t) (yy_cp - yy_bp); \
+ yyleng = (int) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
-
#define YY_NUM_RULES 66
#define YY_END_OF_BUFFER 67
/* This struct is not used in this scanner,
@@ -411,7 +642,7 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_acclist[437] =
+static const flex_int16_t yy_acclist[437] =
{ 0,
64, 64, 64, 64, 67, 66, 64, 66, 64, 65,
66, 56, 66, 55, 66, 62, 66, 63, 66, 66,
@@ -463,7 +694,7 @@ static yyconst flex_int16_t yy_acclist[437] =
57, 21, 57, 34, 34, 57
} ;
-static yyconst flex_int16_t yy_accept[546] =
+static const flex_int16_t yy_accept[546] =
{ 0,
1, 2, 3, 4, 5, 6, 7, 9, 12, 14,
16, 18, 20, 21, 22, 23, 24, 26, 28, 30,
@@ -527,7 +758,7 @@ static yyconst flex_int16_t yy_accept[546] =
432, 434, 435, 437, 437
} ;
-static yyconst flex_int32_t yy_ec[256] =
+static const YY_CHAR yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -559,7 +790,7 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[42] =
+static const YY_CHAR yy_meta[42] =
{ 0,
1, 1, 1, 2, 3, 3, 3, 3, 3, 3,
3, 3, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -568,7 +799,7 @@ static yyconst flex_int32_t yy_meta[42] =
1
} ;
-static yyconst flex_int16_t yy_base[547] =
+static const flex_int16_t yy_base[547] =
{ 0,
0, 0, 41, 0, 610, 611, 81, 83, 611, 0,
611, 611, 56, 599, 580, 575, 611, 611, 611, 611,
@@ -632,7 +863,7 @@ static yyconst flex_int16_t yy_base[547] =
0, 611, 0, 611, 106, 275
} ;
-static yyconst flex_int16_t yy_def[547] =
+static const flex_int16_t yy_def[547] =
{ 0,
544, 1, 544, 3, 544, 544, 544, 544, 544, 545,
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
@@ -696,7 +927,7 @@ static yyconst flex_int16_t yy_def[547] =
546, 544, 546, 0, 544, 544
} ;
-static yyconst flex_int16_t yy_nxt[653] =
+static const flex_int16_t yy_nxt[653] =
{ 0,
6, 7, 8, 9, 10, 10, 10, 10, 10, 10,
10, 10, 11, 12, 6, 6, 13, 6, 6, 6,
@@ -772,7 +1003,7 @@ static yyconst flex_int16_t yy_nxt[653] =
544, 544
} ;
-static yyconst flex_int16_t yy_chk[653] =
+static const flex_int16_t yy_chk[653] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -848,15 +1079,15 @@ static yyconst flex_int16_t yy_chk[653] =
544, 544
} ;
-extern int H5LTyy_flex_debug;
-int H5LTyy_flex_debug = 0;
+extern int yy_flex_debug;
+int yy_flex_debug = 0;
static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
static char *yy_full_match;
static int yy_lp;
#define REJECT \
{ \
-*yy_cp = (yy_hold_char); /* undo effects of setting up H5LTyytext */ \
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
++(yy_lp); \
goto find_rule; \
@@ -865,7 +1096,7 @@ goto find_rule; \
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-char *H5LTyytext;
+char *yytext;
#line 1 "hl/src/H5LTanalyze.l"
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
@@ -893,6 +1124,13 @@ char *H5LTyytext;
/* Turn off suggest const & malloc attribute warnings in gcc */
#if defined __GNUC__ && 402 <= __GNUC__ * 100 + __GNUC_MINOR__
#pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
+#endif
+
+/* Turn off null dereference warnings in gcc.
+ * We have no control over this generated code.
+ */
+#if defined __GNUC__ && 600 <= __GNUC__ * 100
+#pragma GCC diagnostic ignored "-Wnull-dereference"
#endif
int my_yyinput(char *, int);
@@ -942,8 +1180,9 @@ extern hbool_t is_opq_tag;
hbool_t first_quote = 1;
+#line 1162 "hl/src/H5LTanalyze.c"
-#line 925 "hl/src/H5LTanalyze.c"
+#line 1164 "hl/src/H5LTanalyze.c"
#define INITIAL 0
#define TAG_STRING 1
@@ -952,36 +1191,36 @@ hbool_t first_quote = 1;
#define YY_EXTRA_TYPE void *
#endif
-static int yy_init_globals (void );
+static int yy_init_globals ( void );
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int H5LTyylex_destroy (void );
+int yylex_destroy ( void );
-int H5LTyyget_debug (void );
+int yyget_debug ( void );
-void H5LTyyset_debug (int debug_flag );
+void yyset_debug ( int debug_flag );
-YY_EXTRA_TYPE H5LTyyget_extra (void );
+YY_EXTRA_TYPE yyget_extra ( void );
-void H5LTyyset_extra (YY_EXTRA_TYPE user_defined );
+void yyset_extra ( YY_EXTRA_TYPE user_defined );
-FILE *H5LTyyget_in (void );
+FILE *yyget_in ( void );
-void H5LTyyset_in (FILE * in_str );
+void yyset_in ( FILE * _in_str );
-FILE *H5LTyyget_out (void );
+FILE *yyget_out ( void );
-void H5LTyyset_out (FILE * out_str );
+void yyset_out ( FILE * _out_str );
-yy_size_t H5LTyyget_leng (void );
+ int yyget_leng ( void );
-char *H5LTyyget_text (void );
+char *yyget_text ( void );
-int H5LTyyget_lineno (void );
+int yyget_lineno ( void );
-void H5LTyyset_lineno (int line_number );
+void yyset_lineno ( int _line_number );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -989,35 +1228,43 @@ void H5LTyyset_lineno (int line_number );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int H5LTyywrap (void );
+extern "C" int yywrap ( void );
#else
-extern int H5LTyywrap (void );
+extern int yywrap ( void );
#endif
#endif
- static void yyunput (int c,char *buf_ptr );
+#ifndef YY_NO_UNPUT
+
+ static void yyunput ( int c, char *buf_ptr );
+
+#endif
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int );
+static void yy_flex_strncpy ( char *, const char *, int );
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * );
+static int yy_flex_strlen ( const char * );
#endif
#ifndef YY_NO_INPUT
-
#ifdef __cplusplus
-static int yyinput (void );
+static int yyinput ( void );
#else
-static int input (void );
+static int input ( void );
#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -1025,7 +1272,7 @@ static int input (void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( H5LTyytext, H5LTyyleng, 1, H5LTyyout )) {} } while (0)
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -1036,20 +1283,20 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- size_t n; \
+ int n; \
for ( n = 0; n < max_size && \
- (c = getc( H5LTyyin )) != EOF && c != '\n'; ++n ) \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
- if ( c == EOF && ferror( H5LTyyin ) ) \
+ if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
- while ( (result = fread(buf, 1, max_size, H5LTyyin))==0 && ferror(H5LTyyin)) \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
@@ -1057,7 +1304,7 @@ static int input (void );
break; \
} \
errno=0; \
- clearerr(H5LTyyin); \
+ clearerr(yyin); \
} \
}\
\
@@ -1090,12 +1337,12 @@ static int input (void );
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int H5LTyylex (void);
+extern int yylex (void);
-#define YY_DECL int H5LTyylex (void)
+#define YY_DECL int yylex (void)
#endif /* !YY_DECL */
-/* Code executed at the beginning of each rule, after H5LTyytext and H5LTyyleng
+/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
@@ -1104,7 +1351,7 @@ extern int H5LTyylex (void);
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
-#define YY_BREAK break;
+#define YY_BREAK /*LINTED*/break;
#endif
#define YY_RULE_SETUP \
@@ -1114,15 +1361,10 @@ extern int H5LTyylex (void);
*/
YY_DECL
{
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
-
-#line 82 "hl/src/H5LTanalyze.l"
-
-
-#line 1103 "hl/src/H5LTanalyze.c"
-
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
+
if ( !(yy_init) )
{
(yy_init) = 1;
@@ -1133,33 +1375,39 @@ YY_DECL
/* Create the reject buffer large enough to save one state per allowed character. */
if ( ! (yy_state_buf) )
- (yy_state_buf) = (yy_state_type *)H5LTyyalloc(YY_STATE_BUF_SIZE );
+ (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE );
if ( ! (yy_state_buf) )
- YY_FATAL_ERROR( "out of dynamic memory in H5LTyylex()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
if ( ! (yy_start) )
(yy_start) = 1; /* first start state */
- if ( ! H5LTyyin )
- H5LTyyin = stdin;
+ if ( ! yyin )
+ yyin = stdin;
- if ( ! H5LTyyout )
- H5LTyyout = stdout;
+ if ( ! yyout )
+ yyout = stdout;
if ( ! YY_CURRENT_BUFFER ) {
- H5LTyyensure_buffer_stack ();
+ yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- H5LTyy_create_buffer(H5LTyyin,YY_BUF_SIZE );
+ yy_create_buffer( yyin, YY_BUF_SIZE );
}
- H5LTyy_load_buffer_state( );
+ yy_load_buffer_state( );
}
- while ( 1 ) /* loops until end-of-file is reached */
+ {
+#line 89 "hl/src/H5LTanalyze.l"
+
+
+#line 1383 "hl/src/H5LTanalyze.c"
+
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
yy_cp = (yy_c_buf_p);
- /* Support of H5LTyytext. */
+ /* Support of yytext. */
*yy_cp = (yy_hold_char);
/* yy_bp points to the position in yy_ch_buf of the start of
@@ -1175,14 +1423,14 @@ YY_DECL
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 545 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
*(yy_state_ptr)++ = yy_current_state;
++yy_cp;
}
@@ -1191,7 +1439,9 @@ yy_match:
yy_find_action:
yy_current_state = *--(yy_state_ptr);
(yy_lp) = yy_accept[yy_current_state];
+
find_rule: /* we branch to this label when backing up */
+
for ( ; ; ) /* until we find what rule we matched */
{
if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
@@ -1215,293 +1465,293 @@ do_action: /* This label is used only to access EOF actions. */
{ /* beginning of action switch */
case 1:
YY_RULE_SETUP
-#line 84 "hl/src/H5LTanalyze.l"
+#line 91 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I8BE_TOKEN);}
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 85 "hl/src/H5LTanalyze.l"
+#line 92 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I8LE_TOKEN);}
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 86 "hl/src/H5LTanalyze.l"
+#line 93 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I16BE_TOKEN);}
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 87 "hl/src/H5LTanalyze.l"
+#line 94 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I16LE_TOKEN);}
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 88 "hl/src/H5LTanalyze.l"
+#line 95 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I32BE_TOKEN);}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 89 "hl/src/H5LTanalyze.l"
+#line 96 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I32LE_TOKEN);}
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 90 "hl/src/H5LTanalyze.l"
+#line 97 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I64BE_TOKEN);}
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 91 "hl/src/H5LTanalyze.l"
+#line 98 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I64LE_TOKEN);}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 93 "hl/src/H5LTanalyze.l"
+#line 100 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U8BE_TOKEN);}
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 94 "hl/src/H5LTanalyze.l"
+#line 101 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U8LE_TOKEN);}
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 95 "hl/src/H5LTanalyze.l"
+#line 102 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U16BE_TOKEN);}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 96 "hl/src/H5LTanalyze.l"
+#line 103 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U16LE_TOKEN);}
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 97 "hl/src/H5LTanalyze.l"
+#line 104 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U32BE_TOKEN);}
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 98 "hl/src/H5LTanalyze.l"
+#line 105 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U32LE_TOKEN);}
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 99 "hl/src/H5LTanalyze.l"
+#line 106 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U64BE_TOKEN);}
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 100 "hl/src/H5LTanalyze.l"
+#line 107 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U64LE_TOKEN);}
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 102 "hl/src/H5LTanalyze.l"
+#line 109 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_CHAR_TOKEN);}
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 103 "hl/src/H5LTanalyze.l"
+#line 110 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_SCHAR_TOKEN);}
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 104 "hl/src/H5LTanalyze.l"
+#line 111 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_UCHAR_TOKEN);}
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 105 "hl/src/H5LTanalyze.l"
+#line 112 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_SHORT_TOKEN);}
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 106 "hl/src/H5LTanalyze.l"
+#line 113 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_USHORT_TOKEN);}
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 107 "hl/src/H5LTanalyze.l"
+#line 114 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_INT_TOKEN);}
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 108 "hl/src/H5LTanalyze.l"
+#line 115 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_UINT_TOKEN);}
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 109 "hl/src/H5LTanalyze.l"
+#line 116 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_LONG_TOKEN);}
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 110 "hl/src/H5LTanalyze.l"
+#line 117 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_ULONG_TOKEN);}
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 111 "hl/src/H5LTanalyze.l"
+#line 118 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_LLONG_TOKEN);}
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 112 "hl/src/H5LTanalyze.l"
+#line 119 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_ULLONG_TOKEN);}
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 114 "hl/src/H5LTanalyze.l"
+#line 121 "hl/src/H5LTanalyze.l"
{return hid(H5T_IEEE_F32BE_TOKEN);}
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 115 "hl/src/H5LTanalyze.l"
+#line 122 "hl/src/H5LTanalyze.l"
{return hid(H5T_IEEE_F32LE_TOKEN);}
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 116 "hl/src/H5LTanalyze.l"
+#line 123 "hl/src/H5LTanalyze.l"
{return hid(H5T_IEEE_F64BE_TOKEN);}
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 117 "hl/src/H5LTanalyze.l"
+#line 124 "hl/src/H5LTanalyze.l"
{return hid(H5T_IEEE_F64LE_TOKEN);}
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 118 "hl/src/H5LTanalyze.l"
+#line 125 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_FLOAT_TOKEN);}
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 119 "hl/src/H5LTanalyze.l"
+#line 126 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_DOUBLE_TOKEN);}
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 120 "hl/src/H5LTanalyze.l"
+#line 127 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_LDOUBLE_TOKEN);}
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 122 "hl/src/H5LTanalyze.l"
+#line 129 "hl/src/H5LTanalyze.l"
{return token(H5T_STRING_TOKEN);}
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 123 "hl/src/H5LTanalyze.l"
+#line 130 "hl/src/H5LTanalyze.l"
{return token(STRSIZE_TOKEN);}
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 124 "hl/src/H5LTanalyze.l"
+#line 131 "hl/src/H5LTanalyze.l"
{return token(STRPAD_TOKEN);}
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 125 "hl/src/H5LTanalyze.l"
+#line 132 "hl/src/H5LTanalyze.l"
{return token(CSET_TOKEN);}
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 126 "hl/src/H5LTanalyze.l"
+#line 133 "hl/src/H5LTanalyze.l"
{return token(CTYPE_TOKEN);}
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 127 "hl/src/H5LTanalyze.l"
-{return token(H5T_STR_NULLTERM_TOKEN);}
+#line 134 "hl/src/H5LTanalyze.l"
+{return token(H5T_STR_NULLTERM_TOKEN);}
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 128 "hl/src/H5LTanalyze.l"
-{return token(H5T_STR_NULLPAD_TOKEN);}
+#line 135 "hl/src/H5LTanalyze.l"
+{return token(H5T_STR_NULLPAD_TOKEN);}
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 129 "hl/src/H5LTanalyze.l"
-{return token(H5T_STR_SPACEPAD_TOKEN);}
+#line 136 "hl/src/H5LTanalyze.l"
+{return token(H5T_STR_SPACEPAD_TOKEN);}
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 130 "hl/src/H5LTanalyze.l"
+#line 137 "hl/src/H5LTanalyze.l"
{return token(H5T_CSET_ASCII_TOKEN);}
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 131 "hl/src/H5LTanalyze.l"
+#line 138 "hl/src/H5LTanalyze.l"
{return token(H5T_CSET_UTF8_TOKEN);}
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 132 "hl/src/H5LTanalyze.l"
+#line 139 "hl/src/H5LTanalyze.l"
{return token(H5T_C_S1_TOKEN);}
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 133 "hl/src/H5LTanalyze.l"
+#line 140 "hl/src/H5LTanalyze.l"
{return token(H5T_FORTRAN_S1_TOKEN);}
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 134 "hl/src/H5LTanalyze.l"
+#line 141 "hl/src/H5LTanalyze.l"
{return token(H5T_VARIABLE_TOKEN);}
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 136 "hl/src/H5LTanalyze.l"
+#line 143 "hl/src/H5LTanalyze.l"
{return token(H5T_COMPOUND_TOKEN);}
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 137 "hl/src/H5LTanalyze.l"
+#line 144 "hl/src/H5LTanalyze.l"
{return token(H5T_ENUM_TOKEN);}
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 138 "hl/src/H5LTanalyze.l"
+#line 145 "hl/src/H5LTanalyze.l"
{return token(H5T_ARRAY_TOKEN);}
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 139 "hl/src/H5LTanalyze.l"
+#line 146 "hl/src/H5LTanalyze.l"
{return token(H5T_VLEN_TOKEN);}
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 141 "hl/src/H5LTanalyze.l"
+#line 148 "hl/src/H5LTanalyze.l"
{return token(H5T_OPAQUE_TOKEN);}
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 142 "hl/src/H5LTanalyze.l"
+#line 149 "hl/src/H5LTanalyze.l"
{return token(OPQ_SIZE_TOKEN);}
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 143 "hl/src/H5LTanalyze.l"
+#line 150 "hl/src/H5LTanalyze.l"
{return token(OPQ_TAG_TOKEN);}
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 145 "hl/src/H5LTanalyze.l"
-{
- if( is_str_size || (is_enum && is_enum_memb) ||
+#line 152 "hl/src/H5LTanalyze.l"
+{
+ if( is_str_size || (is_enum && is_enum_memb) ||
is_opq_size || (asindex>-1 && arr_stack[asindex].is_dim) ||
(csindex>-1 && cmpd_stack[csindex].is_field) ) {
- H5LTyylval.ival = atoi(H5LTyytext);
- return NUMBER;
+ H5LTyylval.ival = atoi(yytext);
+ return NUMBER;
} else
REJECT;
}
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 155 "hl/src/H5LTanalyze.l"
+#line 162 "hl/src/H5LTanalyze.l"
{
/*if it's first quote, and is a compound field name or an enum symbol*/
- if((is_opq_tag || is_enum || (csindex>-1 && cmpd_stack[csindex].is_field))
+ if((is_opq_tag || is_enum || (csindex>-1 && cmpd_stack[csindex].is_field))
&& first_quote) {
first_quote = 0;
BEGIN TAG_STRING;
@@ -1513,12 +1763,12 @@ YY_RULE_SETUP
case 57:
/* rule 57 can match eol */
YY_RULE_SETUP
-#line 165 "hl/src/H5LTanalyze.l"
+#line 172 "hl/src/H5LTanalyze.l"
{
#ifdef H5_HAVE_WIN32_API
- H5LTyylval.sval = _strdup(H5LTyytext);
+ H5LTyylval.sval = _strdup(yytext);
#else /* H5_HAVE_WIN32_API */
- H5LTyylval.sval = strdup(H5LTyytext);
+ H5LTyylval.sval = strdup(yytext);
#endif /* H5_HAVE_WIN32_API */
BEGIN INITIAL;
return STRING;
@@ -1526,52 +1776,52 @@ YY_RULE_SETUP
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 175 "hl/src/H5LTanalyze.l"
+#line 182 "hl/src/H5LTanalyze.l"
{return token('{');}
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 176 "hl/src/H5LTanalyze.l"
+#line 183 "hl/src/H5LTanalyze.l"
{return token('}');}
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 177 "hl/src/H5LTanalyze.l"
+#line 184 "hl/src/H5LTanalyze.l"
{return token('[');}
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 178 "hl/src/H5LTanalyze.l"
+#line 185 "hl/src/H5LTanalyze.l"
{return token(']');}
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 179 "hl/src/H5LTanalyze.l"
+#line 186 "hl/src/H5LTanalyze.l"
{return token(':');}
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 180 "hl/src/H5LTanalyze.l"
+#line 187 "hl/src/H5LTanalyze.l"
{return token(';');}
YY_BREAK
case 64:
/* rule 64 can match eol */
YY_RULE_SETUP
-#line 181 "hl/src/H5LTanalyze.l"
+#line 188 "hl/src/H5LTanalyze.l"
;
YY_BREAK
case 65:
/* rule 65 can match eol */
YY_RULE_SETUP
-#line 182 "hl/src/H5LTanalyze.l"
+#line 189 "hl/src/H5LTanalyze.l"
{ return 0; }
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 184 "hl/src/H5LTanalyze.l"
+#line 191 "hl/src/H5LTanalyze.l"
ECHO;
YY_BREAK
-#line 1553 "hl/src/H5LTanalyze.c"
+#line 1803 "hl/src/H5LTanalyze.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(TAG_STRING):
yyterminate();
@@ -1589,15 +1839,15 @@ ECHO;
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
- * just pointed H5LTyyin at a new source and called
- * H5LTyylex(). If so, then we have to assure
+ * just pointed yyin at a new source and called
+ * yylex(). If so, then we have to assure
* consistency between YY_CURRENT_BUFFER and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = H5LTyyin;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
@@ -1650,11 +1900,11 @@ ECHO;
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( H5LTyywrap( ) )
+ if ( yywrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
- * H5LTyytext, we can now set up
+ * yytext, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
@@ -1703,7 +1953,8 @@ ECHO;
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
-} /* end of H5LTyylex */
+ } /* end of user's declarations */
+} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -1714,9 +1965,9 @@ ECHO;
*/
static int yy_get_next_buffer (void)
{
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = (yytext_ptr);
- register int number_to_move, i;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = (yytext_ptr);
+ int number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
@@ -1745,7 +1996,7 @@ static int yy_get_next_buffer (void)
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
@@ -1758,7 +2009,7 @@ static int yy_get_next_buffer (void)
else
{
- yy_size_t num_to_read =
+ int num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
@@ -1784,7 +2035,7 @@ static int yy_get_next_buffer (void)
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- H5LTyyrestart(H5LTyyin );
+ yyrestart( yyin );
}
else
@@ -1798,12 +2049,15 @@ static int yy_get_next_buffer (void)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) H5LTyyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
(yy_n_chars) += number_to_move;
@@ -1819,9 +2073,9 @@ static int yy_get_next_buffer (void)
static yy_state_type yy_get_previous_state (void)
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
-
+ yy_state_type yy_current_state;
+ char *yy_cp;
+
yy_current_state = (yy_start);
(yy_state_ptr) = (yy_state_buf);
@@ -1829,14 +2083,14 @@ static int yy_get_next_buffer (void)
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
{
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 545 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
*(yy_state_ptr)++ = yy_current_state;
}
@@ -1850,16 +2104,16 @@ static int yy_get_next_buffer (void)
*/
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
{
- register int yy_is_jam;
-
- register YY_CHAR yy_c = 1;
+ int yy_is_jam;
+
+ YY_CHAR yy_c = 1;
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 545 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 544);
if ( ! yy_is_jam )
*(yy_state_ptr)++ = yy_current_state;
@@ -1867,22 +2121,24 @@ static int yy_get_next_buffer (void)
return yy_is_jam ? 0 : yy_current_state;
}
- static void yyunput (int c, register char * yy_bp )
-{
- register char *yy_cp;
+#ifndef YY_NO_UNPUT
+ static void yyunput (int c, char * yy_bp )
+{
+ char *yy_cp;
+
yy_cp = (yy_c_buf_p);
- /* undo effects of setting up H5LTyytext */
+ /* undo effects of setting up yytext */
*yy_cp = (yy_hold_char);
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register yy_size_t number_to_move = (yy_n_chars) + 2;
- register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+ int number_to_move = (yy_n_chars) + 2;
+ char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
- register char *source =
+ char *source =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
@@ -1891,7 +2147,7 @@ static int yy_get_next_buffer (void)
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+ (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
@@ -1904,6 +2160,8 @@ static int yy_get_next_buffer (void)
(yy_c_buf_p) = yy_cp;
}
+#endif
+
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (void)
@@ -1913,7 +2171,7 @@ static int yy_get_next_buffer (void)
{
int c;
-
+
*(yy_c_buf_p) = (yy_hold_char);
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
@@ -1928,7 +2186,7 @@ static int yy_get_next_buffer (void)
else
{ /* need more input */
- yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
+ int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
@@ -1945,14 +2203,14 @@ static int yy_get_next_buffer (void)
*/
/* Reset buffer status. */
- H5LTyyrestart(H5LTyyin );
+ yyrestart( yyin );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( H5LTyywrap( ) )
- return EOF;
+ if ( yywrap( ) )
+ return 0;
if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
@@ -1971,7 +2229,7 @@ static int yy_get_next_buffer (void)
}
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- *(yy_c_buf_p) = '\0'; /* preserve H5LTyytext */
+ *(yy_c_buf_p) = '\0'; /* preserve yytext */
(yy_hold_char) = *++(yy_c_buf_p);
return c;
@@ -1980,35 +2238,35 @@ static int yy_get_next_buffer (void)
/** Immediately switch to a different input stream.
* @param input_file A readable stream.
- *
+ *
* @note This function does not reset the start condition to @c INITIAL .
*/
- void H5LTyyrestart (FILE * input_file )
+ void yyrestart (FILE * input_file )
{
-
+
if ( ! YY_CURRENT_BUFFER ){
- H5LTyyensure_buffer_stack ();
+ yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- H5LTyy_create_buffer(H5LTyyin,YY_BUF_SIZE );
+ yy_create_buffer( yyin, YY_BUF_SIZE );
}
- H5LTyy_init_buffer(YY_CURRENT_BUFFER,input_file );
- H5LTyy_load_buffer_state( );
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file );
+ yy_load_buffer_state( );
}
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
- *
+ *
*/
- void H5LTyy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
-
+
/* TODO. We should be able to replace this entire function body
* with
- * H5LTyypop_buffer_state();
- * H5LTyypush_buffer_state(new_buffer);
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
*/
- H5LTyyensure_buffer_stack ();
+ yyensure_buffer_stack ();
if ( YY_CURRENT_BUFFER == new_buffer )
return;
@@ -2021,61 +2279,61 @@ static int yy_get_next_buffer (void)
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- H5LTyy_load_buffer_state( );
+ yy_load_buffer_state( );
/* We don't actually know whether we did this switch during
- * EOF (H5LTyywrap()) processing, but the only time this flag
- * is looked at is after H5LTyywrap() is called, so it's safe
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
(yy_did_buffer_switch_on_eof) = 1;
}
-static void H5LTyy_load_buffer_state (void)
+static void yy_load_buffer_state (void)
{
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
- H5LTyyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
(yy_hold_char) = *(yy_c_buf_p);
}
/** Allocate and initialize an input buffer state.
* @param file A readable stream.
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- *
+ *
* @return the allocated buffer state.
*/
- YY_BUFFER_STATE H5LTyy_create_buffer (FILE * file, int size )
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) H5LTyyalloc(sizeof( struct yy_buffer_state ) );
+
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in H5LTyy_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) H5LTyyalloc(b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in H5LTyy_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
- H5LTyy_init_buffer(b,file );
+ yy_init_buffer( b, file );
return b;
}
/** Destroy the buffer.
- * @param b a buffer created with H5LTyy_create_buffer()
- *
+ * @param b a buffer created with yy_create_buffer()
+ *
*/
- void H5LTyy_delete_buffer (YY_BUFFER_STATE b )
+ void yy_delete_buffer (YY_BUFFER_STATE b )
{
-
+
if ( ! b )
return;
@@ -2083,27 +2341,27 @@ static void H5LTyy_load_buffer_state (void)
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- H5LTyyfree((void *) b->yy_ch_buf );
+ yyfree( (void *) b->yy_ch_buf );
- H5LTyyfree((void *) b );
+ yyfree( (void *) b );
}
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
- * such as during a H5LTyyrestart() or at EOF.
+ * such as during a yyrestart() or at EOF.
*/
- static void H5LTyy_init_buffer (YY_BUFFER_STATE b, FILE * file )
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
{
int oerrno = errno;
-
- H5LTyy_flush_buffer(b );
+
+ yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then H5LTyy_init_buffer was _probably_
- * called from H5LTyyrestart() or through yy_get_next_buffer.
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() or through yy_get_next_buffer.
* In that case, we don't want to reset the lineno or column.
*/
if (b != YY_CURRENT_BUFFER){
@@ -2112,15 +2370,15 @@ static void H5LTyy_load_buffer_state (void)
}
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-
+
errno = oerrno;
}
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- *
+ *
*/
- void H5LTyy_flush_buffer (YY_BUFFER_STATE b )
+ void yy_flush_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
return;
@@ -2140,23 +2398,23 @@ static void H5LTyy_load_buffer_state (void)
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- H5LTyy_load_buffer_state( );
+ yy_load_buffer_state( );
}
/** Pushes the new state onto the stack. The new state becomes
* the current state. This function will allocate the stack
* if necessary.
* @param new_buffer The new state.
- *
+ *
*/
-void H5LTyypush_buffer_state (YY_BUFFER_STATE new_buffer )
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
{
if (new_buffer == NULL)
return;
- H5LTyyensure_buffer_stack();
+ yyensure_buffer_stack();
- /* This block is copied from H5LTyy_switch_to_buffer. */
+ /* This block is copied from yy_switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
@@ -2170,27 +2428,27 @@ void H5LTyypush_buffer_state (YY_BUFFER_STATE new_buffer )
(yy_buffer_stack_top)++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- /* copied from H5LTyy_switch_to_buffer. */
- H5LTyy_load_buffer_state( );
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
/** Removes and deletes the top of the stack, if present.
* The next element becomes the new top.
- *
+ *
*/
-void H5LTyypop_buffer_state (void)
+void yypop_buffer_state (void)
{
if (!YY_CURRENT_BUFFER)
return;
- H5LTyy_delete_buffer(YY_CURRENT_BUFFER );
+ yy_delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
if ((yy_buffer_stack_top) > 0)
--(yy_buffer_stack_top);
if (YY_CURRENT_BUFFER) {
- H5LTyy_load_buffer_state( );
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
@@ -2198,22 +2456,22 @@ void H5LTyypop_buffer_state (void)
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
-static void H5LTyyensure_buffer_stack (void)
+static void yyensure_buffer_stack (void)
{
yy_size_t num_to_alloc;
-
+
if (!(yy_buffer_stack)) {
/* First allocation is just for 2 elements, since we don't know if this
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
- num_to_alloc = 1;
- (yy_buffer_stack) = (struct yy_buffer_state**)H5LTyyalloc
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in H5LTyyensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
@@ -2225,15 +2483,15 @@ static void H5LTyyensure_buffer_stack (void)
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
/* Increase the buffer to prepare for a possible push. */
- int grow_size = 8 /* arbitrary grow size */;
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
num_to_alloc = (yy_buffer_stack_max) + grow_size;
- (yy_buffer_stack) = (struct yy_buffer_state**)H5LTyyrealloc
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in H5LTyyensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
/* zero only the new slots.*/
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -2244,80 +2502,80 @@ static void H5LTyyensure_buffer_stack (void)
/** Setup the input buffer state to scan directly from a user-specified character buffer.
* @param base the character buffer
* @param size the size in bytes of the character buffer
- *
+ *
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE H5LTyy_scan_buffer (char * base, yy_size_t size )
+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
-
+
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
- return 0;
+ return NULL;
- b = (YY_BUFFER_STATE) H5LTyyalloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in H5LTyy_scan_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
- b->yy_input_file = 0;
+ b->yy_input_file = NULL;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- H5LTyy_switch_to_buffer(b );
+ yy_switch_to_buffer( b );
return b;
}
-/** Setup the input buffer state to scan a string. The next call to H5LTyylex() will
+/** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
- *
+ *
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
- * H5LTyy_scan_bytes() instead.
+ * yy_scan_bytes() instead.
*/
-YY_BUFFER_STATE H5LTyy_scan_string (yyconst char * yystr )
+YY_BUFFER_STATE yy_scan_string (const char * yystr )
{
-
- return H5LTyy_scan_bytes(yystr,strlen(yystr) );
+
+ return yy_scan_bytes( yystr, (int) strlen(yystr) );
}
-/** Setup the input buffer state to scan the given bytes. The next call to H5LTyylex() will
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
* @param yybytes the byte buffer to scan
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
- *
+ *
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE H5LTyy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
+YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
-
+
/* Get memory for full buffer, including space for trailing EOB's. */
- n = _yybytes_len + 2;
- buf = (char *) H5LTyyalloc(n );
+ n = (yy_size_t) (_yybytes_len + 2);
+ buf = (char *) yyalloc( n );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in H5LTyy_scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = H5LTyy_scan_buffer(buf,n );
+ b = yy_scan_buffer( buf, n );
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in H5LTyy_scan_bytes()" );
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
@@ -2331,9 +2589,9 @@ YY_BUFFER_STATE H5LTyy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_
#define YY_EXIT_FAILURE 2
#endif
-static void yy_fatal_error (yyconst char* msg )
+static void yynoreturn yy_fatal_error (const char* msg )
{
- (void) fprintf( stderr, "%s\n", msg );
+ fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
@@ -2343,107 +2601,107 @@ static void yy_fatal_error (yyconst char* msg )
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up H5LTyytext. */ \
+ /* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
- H5LTyytext[H5LTyyleng] = (yy_hold_char); \
- (yy_c_buf_p) = H5LTyytext + yyless_macro_arg; \
+ yytext[yyleng] = (yy_hold_char); \
+ (yy_c_buf_p) = yytext + yyless_macro_arg; \
(yy_hold_char) = *(yy_c_buf_p); \
*(yy_c_buf_p) = '\0'; \
- H5LTyyleng = yyless_macro_arg; \
+ yyleng = yyless_macro_arg; \
} \
while ( 0 )
/* Accessor methods (get/set functions) to struct members. */
/** Get the current line number.
- *
+ *
*/
-int H5LTyyget_lineno (void)
+int yyget_lineno (void)
{
-
- return H5LTyylineno;
+
+ return yylineno;
}
/** Get the input stream.
- *
+ *
*/
-FILE *H5LTyyget_in (void)
+FILE *yyget_in (void)
{
- return H5LTyyin;
+ return yyin;
}
/** Get the output stream.
- *
+ *
*/
-FILE *H5LTyyget_out (void)
+FILE *yyget_out (void)
{
- return H5LTyyout;
+ return yyout;
}
/** Get the length of the current token.
- *
+ *
*/
-yy_size_t H5LTyyget_leng (void)
+int yyget_leng (void)
{
- return H5LTyyleng;
+ return yyleng;
}
/** Get the current token.
- *
+ *
*/
-char *H5LTyyget_text (void)
+char *yyget_text (void)
{
- return H5LTyytext;
+ return yytext;
}
/** Set the current line number.
- * @param line_number
- *
+ * @param _line_number line number
+ *
*/
-void H5LTyyset_lineno (int line_number )
+void yyset_lineno (int _line_number )
{
-
- H5LTyylineno = line_number;
+
+ yylineno = _line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
- * @param in_str A readable stream.
- *
- * @see H5LTyy_switch_to_buffer
+ * @param _in_str A readable stream.
+ *
+ * @see yy_switch_to_buffer
*/
-void H5LTyyset_in (FILE * in_str )
+void yyset_in (FILE * _in_str )
{
- H5LTyyin = in_str ;
+ yyin = _in_str ;
}
-void H5LTyyset_out (FILE * out_str )
+void yyset_out (FILE * _out_str )
{
- H5LTyyout = out_str ;
+ yyout = _out_str ;
}
-int H5LTyyget_debug (void)
+int yyget_debug (void)
{
- return H5LTyy_flex_debug;
+ return yy_flex_debug;
}
-void H5LTyyset_debug (int bdebug )
+void yyset_debug (int _bdebug )
{
- H5LTyy_flex_debug = bdebug ;
+ yy_flex_debug = _bdebug ;
}
static int yy_init_globals (void)
{
/* Initialization is the same as for the non-reentrant scanner.
- * This function is called from H5LTyylex_destroy(), so don't allocate here.
+ * This function is called from yylex_destroy(), so don't allocate here.
*/
- (yy_buffer_stack) = 0;
+ (yy_buffer_stack) = NULL;
(yy_buffer_stack_top) = 0;
(yy_buffer_stack_max) = 0;
- (yy_c_buf_p) = (char *) 0;
+ (yy_c_buf_p) = NULL;
(yy_init) = 0;
(yy_start) = 0;
@@ -2454,39 +2712,39 @@ static int yy_init_globals (void)
/* Defined in main.c */
#ifdef YY_STDINIT
- H5LTyyin = stdin;
- H5LTyyout = stdout;
+ yyin = stdin;
+ yyout = stdout;
#else
- H5LTyyin = (FILE *) 0;
- H5LTyyout = (FILE *) 0;
+ yyin = NULL;
+ yyout = NULL;
#endif
/* For future reference: Set errno on error, since we are called by
- * H5LTyylex_init()
+ * yylex_init()
*/
return 0;
}
-/* H5LTyylex_destroy is for both reentrant and non-reentrant scanners. */
-int H5LTyylex_destroy (void)
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (void)
{
-
+
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- H5LTyy_delete_buffer(YY_CURRENT_BUFFER );
+ yy_delete_buffer( YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
- H5LTyypop_buffer_state();
+ yypop_buffer_state();
}
/* Destroy the stack itself. */
- H5LTyyfree((yy_buffer_stack) );
+ yyfree((yy_buffer_stack) );
(yy_buffer_stack) = NULL;
- H5LTyyfree ( (yy_state_buf) );
+ yyfree ( (yy_state_buf) );
(yy_state_buf) = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
- * H5LTyylex() is called, initialization will occur. */
+ * yylex() is called, initialization will occur. */
yy_init_globals( );
return 0;
@@ -2497,18 +2755,19 @@ int H5LTyylex_destroy (void)
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+static void yy_flex_strncpy (char* s1, const char * s2, int n )
{
- register int i;
+
+ int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s )
+static int yy_flex_strlen (const char * s )
{
- register int n;
+ int n;
for ( n = 0; s[n]; ++n )
;
@@ -2516,13 +2775,14 @@ static int yy_flex_strlen (yyconst char * s )
}
#endif
-void *H5LTyyalloc (yy_size_t size )
+void *yyalloc (yy_size_t size )
{
- return (void *) malloc( size );
+ return malloc(size);
}
-void *H5LTyyrealloc (void * ptr, yy_size_t size )
+void *yyrealloc (void * ptr, yy_size_t size )
{
+
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
@@ -2530,35 +2790,34 @@ void *H5LTyyrealloc (void * ptr, yy_size_t size )
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
- return (void *) realloc( (char *) ptr, size );
+ return realloc(ptr, size);
}
-void H5LTyyfree (void * ptr )
+void yyfree (void * ptr )
{
- free( (char *) ptr ); /* see H5LTyyrealloc() for (char *) cast */
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
-#line 184 "hl/src/H5LTanalyze.l"
-
+#line 191 "hl/src/H5LTanalyze.l"
int my_yyinput(char *buf, int max_size)
{
int ret;
-
- memcpy(buf, myinput, input_len);
+
+ memcpy(buf, myinput, input_len);
ret = (int)input_len;
return ret;
}
int H5LTyyerror(const char *msg)
{
- printf("ERROR: %s before \"%s\".\n", msg, H5LTyytext);
+ printf("ERROR: %s before \"%s\".\n", msg, yytext);
return 0;
}
-int H5LTyywrap()
+int yywrap()
{
return(1);
}
diff --git a/hl/src/H5LTanalyze.l b/hl/src/H5LTanalyze.l
index 5015053..cdd5b0d 100644
--- a/hl/src/H5LTanalyze.l
+++ b/hl/src/H5LTanalyze.l
@@ -28,6 +28,13 @@
#pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
#endif
+/* Turn off null dereference warnings in gcc.
+ * We have no control over this generated code.
+ */
+#if defined __GNUC__ && 600 <= __GNUC__ * 100
+#pragma GCC diagnostic ignored "-Wnull-dereference"
+#endif
+
int my_yyinput(char *, int);
#undef YY_INPUT
#define YY_INPUT(b, r, ms) (r=my_yyinput(b, ms))
diff --git a/hl/src/H5LTparse.c b/hl/src/H5LTparse.c
index d8661a7..a9b3dc3 100644
--- a/hl/src/H5LTparse.c
+++ b/hl/src/H5LTparse.c
@@ -1,30 +1,30 @@
-#if defined __GNUC__ && 402 <= __GNUC__ * 100 + __GNUC_MINOR__
-#pragma GCC diagnostic ignored "-Wconversion"
-#pragma GCC diagnostic ignored "-Wimplicit-function-declaration"
-#pragma GCC diagnostic ignored "-Wlarger-than="
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-#pragma GCC diagnostic ignored "-Wnested-externs"
-#pragma GCC diagnostic ignored "-Wold-style-definition"
-#pragma GCC diagnostic ignored "-Wredundant-decls"
-#pragma GCC diagnostic ignored "-Wsign-compare"
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#pragma GCC diagnostic ignored "-Wstrict-overflow"
-#pragma GCC diagnostic ignored "-Wstrict-prototypes"
-#pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
-#pragma GCC diagnostic ignored "-Wswitch-default"
-#pragma GCC diagnostic ignored "-Wunused-function"
-#pragma GCC diagnostic ignored "-Wunused-macros"
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#elif defined __SUNPRO_CC
-#pragma disable_warn
-#elif defined _MSC_VER
-#pragma warning(push, 1)
-#endif
-/* A Bison parser, made by GNU Bison 2.7. */
+#if defined __GNUC__ && 402 <= __GNUC__ * 100 + __GNUC_MINOR__
+#pragma GCC diagnostic ignored "-Wconversion"
+#pragma GCC diagnostic ignored "-Wimplicit-function-declaration"
+#pragma GCC diagnostic ignored "-Wlarger-than="
+#pragma GCC diagnostic ignored "-Wmissing-prototypes"
+#pragma GCC diagnostic ignored "-Wnested-externs"
+#pragma GCC diagnostic ignored "-Wold-style-definition"
+#pragma GCC diagnostic ignored "-Wredundant-decls"
+#pragma GCC diagnostic ignored "-Wsign-compare"
+#pragma GCC diagnostic ignored "-Wsign-conversion"
+#pragma GCC diagnostic ignored "-Wstrict-overflow"
+#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
+#pragma GCC diagnostic ignored "-Wswitch-default"
+#pragma GCC diagnostic ignored "-Wunused-function"
+#pragma GCC diagnostic ignored "-Wunused-macros"
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#elif defined __SUNPRO_CC
+#pragma disable_warn
+#elif defined _MSC_VER
+#pragma warning(push, 1)
+#endif
+/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison implementation for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -66,7 +66,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.7"
+#define YYBISON_VERSION "3.0.4"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -85,14 +85,14 @@
#define yyparse H5LTyyparse
#define yylex H5LTyylex
#define yyerror H5LTyyerror
-#define yylval H5LTyylval
-#define yychar H5LTyychar
#define yydebug H5LTyydebug
#define yynerrs H5LTyynerrs
+#define yylval H5LTyylval
+#define yychar H5LTyychar
+
/* Copy the first part of user declarations. */
-/* Line 371 of yacc.c */
-#line 20 "hl/src/H5LTparse.y"
+#line 20 "hl/src/H5LTparse.y" /* yacc.c:339 */
#include <stdio.h>
#include <string.h>
@@ -127,7 +127,7 @@ struct arr_info {
};
/*stack for nested array type*/
struct arr_info arr_stack[STACK_SIZE];
-int asindex = -1; /*pointer to the top of array stack*/
+int asindex = -1; /*pointer to the top of array stack*/
hbool_t is_str_size = 0; /*flag to lexer for string size*/
hbool_t is_str_pad = 0; /*flag to lexer for string padding*/
@@ -135,7 +135,7 @@ H5T_str_t str_pad; /*variable for string padding*/
H5T_cset_t str_cset; /*variable for string character set*/
hbool_t is_variable = 0; /*variable for variable-length string*/
size_t str_size; /*variable for string size*/
-
+
hid_t enum_id; /*type ID*/
hbool_t is_enum = 0; /*flag to lexer for enum type*/
hbool_t is_enum_memb = 0; /*flag to lexer for enum member*/
@@ -145,14 +145,13 @@ hbool_t is_opq_size = 0; /*flag to lexer for opaque type size*/
hbool_t is_opq_tag = 0; /*flag to lexer for opaque type tag*/
-/* Line 371 of yacc.c */
-#line 128 "hl/src/H5LTparse.c"
+#line 127 "hl/src/H5LTparse.c" /* yacc.c:339 */
-# ifndef YY_NULL
+# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
-# define YY_NULL nullptr
+# define YY_NULLPTR nullptr
# else
-# define YY_NULL 0
+# define YY_NULLPTR 0
# endif
# endif
@@ -168,7 +167,7 @@ hbool_t is_opq_tag = 0; /*flag to lexer for opaque type tag*/
by #include "H5LTparse.h". */
#ifndef YY_H5LTYY_HL_SRC_H5LTPARSE_H_INCLUDED
# define YY_H5LTYY_HL_SRC_H5LTPARSE_H_INCLUDED
-/* Enabling traces. */
+/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
@@ -176,113 +175,99 @@ hbool_t is_opq_tag = 0; /*flag to lexer for opaque type tag*/
extern int H5LTyydebug;
#endif
-/* Tokens. */
+/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- H5T_STD_I8BE_TOKEN = 258,
- H5T_STD_I8LE_TOKEN = 259,
- H5T_STD_I16BE_TOKEN = 260,
- H5T_STD_I16LE_TOKEN = 261,
- H5T_STD_I32BE_TOKEN = 262,
- H5T_STD_I32LE_TOKEN = 263,
- H5T_STD_I64BE_TOKEN = 264,
- H5T_STD_I64LE_TOKEN = 265,
- H5T_STD_U8BE_TOKEN = 266,
- H5T_STD_U8LE_TOKEN = 267,
- H5T_STD_U16BE_TOKEN = 268,
- H5T_STD_U16LE_TOKEN = 269,
- H5T_STD_U32BE_TOKEN = 270,
- H5T_STD_U32LE_TOKEN = 271,
- H5T_STD_U64BE_TOKEN = 272,
- H5T_STD_U64LE_TOKEN = 273,
- H5T_NATIVE_CHAR_TOKEN = 274,
- H5T_NATIVE_SCHAR_TOKEN = 275,
- H5T_NATIVE_UCHAR_TOKEN = 276,
- H5T_NATIVE_SHORT_TOKEN = 277,
- H5T_NATIVE_USHORT_TOKEN = 278,
- H5T_NATIVE_INT_TOKEN = 279,
- H5T_NATIVE_UINT_TOKEN = 280,
- H5T_NATIVE_LONG_TOKEN = 281,
- H5T_NATIVE_ULONG_TOKEN = 282,
- H5T_NATIVE_LLONG_TOKEN = 283,
- H5T_NATIVE_ULLONG_TOKEN = 284,
- H5T_IEEE_F32BE_TOKEN = 285,
- H5T_IEEE_F32LE_TOKEN = 286,
- H5T_IEEE_F64BE_TOKEN = 287,
- H5T_IEEE_F64LE_TOKEN = 288,
- H5T_NATIVE_FLOAT_TOKEN = 289,
- H5T_NATIVE_DOUBLE_TOKEN = 290,
- H5T_NATIVE_LDOUBLE_TOKEN = 291,
- H5T_STRING_TOKEN = 292,
- STRSIZE_TOKEN = 293,
- STRPAD_TOKEN = 294,
- CSET_TOKEN = 295,
- CTYPE_TOKEN = 296,
- H5T_VARIABLE_TOKEN = 297,
- H5T_STR_NULLTERM_TOKEN = 298,
- H5T_STR_NULLPAD_TOKEN = 299,
- H5T_STR_SPACEPAD_TOKEN = 300,
- H5T_CSET_ASCII_TOKEN = 301,
- H5T_CSET_UTF8_TOKEN = 302,
- H5T_C_S1_TOKEN = 303,
- H5T_FORTRAN_S1_TOKEN = 304,
- H5T_OPAQUE_TOKEN = 305,
- OPQ_SIZE_TOKEN = 306,
- OPQ_TAG_TOKEN = 307,
- H5T_COMPOUND_TOKEN = 308,
- H5T_ENUM_TOKEN = 309,
- H5T_ARRAY_TOKEN = 310,
- H5T_VLEN_TOKEN = 311,
- STRING = 312,
- NUMBER = 313
- };
+ enum yytokentype
+ {
+ H5T_STD_I8BE_TOKEN = 258,
+ H5T_STD_I8LE_TOKEN = 259,
+ H5T_STD_I16BE_TOKEN = 260,
+ H5T_STD_I16LE_TOKEN = 261,
+ H5T_STD_I32BE_TOKEN = 262,
+ H5T_STD_I32LE_TOKEN = 263,
+ H5T_STD_I64BE_TOKEN = 264,
+ H5T_STD_I64LE_TOKEN = 265,
+ H5T_STD_U8BE_TOKEN = 266,
+ H5T_STD_U8LE_TOKEN = 267,
+ H5T_STD_U16BE_TOKEN = 268,
+ H5T_STD_U16LE_TOKEN = 269,
+ H5T_STD_U32BE_TOKEN = 270,
+ H5T_STD_U32LE_TOKEN = 271,
+ H5T_STD_U64BE_TOKEN = 272,
+ H5T_STD_U64LE_TOKEN = 273,
+ H5T_NATIVE_CHAR_TOKEN = 274,
+ H5T_NATIVE_SCHAR_TOKEN = 275,
+ H5T_NATIVE_UCHAR_TOKEN = 276,
+ H5T_NATIVE_SHORT_TOKEN = 277,
+ H5T_NATIVE_USHORT_TOKEN = 278,
+ H5T_NATIVE_INT_TOKEN = 279,
+ H5T_NATIVE_UINT_TOKEN = 280,
+ H5T_NATIVE_LONG_TOKEN = 281,
+ H5T_NATIVE_ULONG_TOKEN = 282,
+ H5T_NATIVE_LLONG_TOKEN = 283,
+ H5T_NATIVE_ULLONG_TOKEN = 284,
+ H5T_IEEE_F32BE_TOKEN = 285,
+ H5T_IEEE_F32LE_TOKEN = 286,
+ H5T_IEEE_F64BE_TOKEN = 287,
+ H5T_IEEE_F64LE_TOKEN = 288,
+ H5T_NATIVE_FLOAT_TOKEN = 289,
+ H5T_NATIVE_DOUBLE_TOKEN = 290,
+ H5T_NATIVE_LDOUBLE_TOKEN = 291,
+ H5T_STRING_TOKEN = 292,
+ STRSIZE_TOKEN = 293,
+ STRPAD_TOKEN = 294,
+ CSET_TOKEN = 295,
+ CTYPE_TOKEN = 296,
+ H5T_VARIABLE_TOKEN = 297,
+ H5T_STR_NULLTERM_TOKEN = 298,
+ H5T_STR_NULLPAD_TOKEN = 299,
+ H5T_STR_SPACEPAD_TOKEN = 300,
+ H5T_CSET_ASCII_TOKEN = 301,
+ H5T_CSET_UTF8_TOKEN = 302,
+ H5T_C_S1_TOKEN = 303,
+ H5T_FORTRAN_S1_TOKEN = 304,
+ H5T_OPAQUE_TOKEN = 305,
+ OPQ_SIZE_TOKEN = 306,
+ OPQ_TAG_TOKEN = 307,
+ H5T_COMPOUND_TOKEN = 308,
+ H5T_ENUM_TOKEN = 309,
+ H5T_ARRAY_TOKEN = 310,
+ H5T_VLEN_TOKEN = 311,
+ STRING = 312,
+ NUMBER = 313
+ };
#endif
-
+/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+
+union YYSTYPE
{
-/* Line 387 of yacc.c */
-#line 72 "hl/src/H5LTparse.y"
+#line 72 "hl/src/H5LTparse.y" /* yacc.c:355 */
int ival; /*for integer token*/
char *sval; /*for name string*/
hid_t hid; /*for hid_t token*/
+#line 232 "hl/src/H5LTparse.c" /* yacc.c:355 */
+};
-/* Line 387 of yacc.c */
-#line 236 "hl/src/H5LTparse.c"
-} YYSTYPE;
+typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
+
extern YYSTYPE H5LTyylval;
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-hid_t H5LTyyparse (void *YYPARSE_PARAM);
-#else
-hid_t H5LTyyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
hid_t H5LTyyparse (void);
-#else
-hid_t H5LTyyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
#endif /* !YY_H5LTYY_HL_SRC_H5LTPARSE_H_INCLUDED */
/* Copy the second part of user declarations. */
-/* Line 390 of yacc.c */
-#line 264 "hl/src/H5LTparse.c"
+#line 249 "hl/src/H5LTparse.c" /* yacc.c:358 */
#ifdef short
# undef short
@@ -296,11 +281,8 @@ typedef unsigned char yytype_uint8;
#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
#else
-typedef short int yytype_int8;
+typedef signed char yytype_int8;
#endif
#ifdef YYTYPE_UINT16
@@ -320,8 +302,7 @@ typedef short int yytype_int16;
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# elif ! defined YYSIZE_T
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
@@ -343,6 +324,33 @@ typedef short int yytype_int16;
# endif
#endif
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
+# endif
+#endif
+
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
# define YYUSE(E) ((void) (E))
@@ -350,24 +358,26 @@ typedef short int yytype_int16;
# define YYUSE(E) /* empty */
#endif
-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(N) (N)
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
-#else
-static int
-YYID (yyi)
- int yyi;
+# define YY_INITIAL_VALUE(Value) Value
#endif
-{
- return yyi;
-}
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif
+
#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -385,8 +395,7 @@ YYID (yyi)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
# ifndef EXIT_SUCCESS
@@ -398,8 +407,8 @@ YYID (yyi)
# endif
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
@@ -415,7 +424,7 @@ YYID (yyi)
# endif
# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
+ && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
@@ -423,15 +432,13 @@ YYID (yyi)
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
@@ -441,7 +448,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
#if (! defined yyoverflow \
&& (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
@@ -466,16 +473,16 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
#endif
@@ -494,7 +501,7 @@ union yyalloc
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
- while (YYID (0))
+ while (0)
# endif
# endif
#endif /* !YYCOPY_NEEDED */
@@ -510,17 +517,19 @@ union yyalloc
#define YYNNTS 46
/* YYNRULES -- Number of rules. */
#define YYNRULES 95
-/* YYNRULES -- Number of states. */
+/* YYNSTATES -- Number of states. */
#define YYNSTATES 143
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+ by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 313
-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, without out-of-bounds checking. */
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -558,52 +567,7 @@ static const yytype_uint8 yytranslate[] =
};
#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const yytype_uint8 yyprhs[] =
-{
- 0, 0, 3, 4, 6, 8, 10, 12, 14, 16,
- 18, 20, 22, 24, 26, 28, 30, 32, 34, 36,
- 38, 40, 42, 44, 46, 48, 50, 52, 54, 56,
- 58, 60, 62, 64, 66, 68, 70, 72, 74, 76,
- 78, 80, 82, 84, 86, 88, 90, 92, 93, 99,
- 100, 103, 104, 112, 114, 115, 118, 120, 121, 128,
- 129, 132, 133, 134, 140, 142, 147, 148, 149, 150,
- 151, 167, 169, 171, 172, 173, 174, 175, 176, 197,
- 199, 201, 203, 205, 207, 209, 211, 213, 215, 216,
- 224, 225, 228, 229, 236, 238
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int8 yyrhs[] =
-{
- 67, 0, -1, -1, 68, -1, 69, -1, 72, -1,
- 80, -1, 87, -1, 70, -1, 71, -1, 95, -1,
- 105, -1, 88, -1, 3, -1, 4, -1, 5, -1,
- 6, -1, 7, -1, 8, -1, 9, -1, 10, -1,
- 11, -1, 12, -1, 13, -1, 14, -1, 15, -1,
- 16, -1, 17, -1, 18, -1, 19, -1, 20, -1,
- 21, -1, 22, -1, 23, -1, 24, -1, 25, -1,
- 26, -1, 27, -1, 28, -1, 29, -1, 30, -1,
- 31, -1, 32, -1, 33, -1, 34, -1, 35, -1,
- 36, -1, -1, 53, 73, 59, 74, 60, -1, -1,
- 74, 75, -1, -1, 68, 76, 63, 77, 63, 78,
- 65, -1, 57, -1, -1, 64, 79, -1, 58, -1,
- -1, 55, 81, 59, 82, 68, 60, -1, -1, 82,
- 83, -1, -1, -1, 61, 84, 86, 85, 62, -1,
- 58, -1, 56, 59, 68, 60, -1, -1, -1, -1,
- -1, 50, 59, 51, 89, 93, 65, 90, 52, 91,
- 63, 94, 63, 65, 92, 60, -1, 58, -1, 57,
- -1, -1, -1, -1, -1, -1, 37, 59, 38, 96,
- 101, 65, 97, 39, 102, 65, 98, 40, 103, 65,
- 99, 41, 104, 65, 100, 60, -1, 42, -1, 58,
- -1, 43, -1, 44, -1, 45, -1, 46, -1, 47,
- -1, 48, -1, 49, -1, -1, 54, 59, 70, 65,
- 106, 107, 60, -1, -1, 107, 108, -1, -1, 63,
- 110, 63, 109, 111, 65, -1, 57, -1, 58, -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
0, 105, 105, 106, 108, 109, 110, 111, 113, 114,
@@ -652,13 +616,13 @@ static const char *const yytname[] =
"$@5", "dimsize", "vlen_type", "opaque_type", "$@6", "@7", "$@8", "$@9",
"opaque_size", "opaque_tag", "string_type", "$@10", "$@11", "$@12",
"$@13", "@14", "strsize", "strpad", "cset", "ctype", "enum_type", "$@15",
- "enum_list", "enum_def", "$@16", "enum_symbol", "enum_val", YY_NULL
+ "enum_list", "enum_def", "$@16", "enum_symbol", "enum_val", YY_NULLPTR
};
#endif
# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
@@ -671,71 +635,18 @@ static const yytype_uint16 yytoknum[] =
};
# endif
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint8 yyr1[] =
-{
- 0, 66, 67, 67, 68, 68, 68, 68, 69, 69,
- 69, 69, 69, 70, 70, 70, 70, 70, 70, 70,
- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
- 71, 71, 71, 71, 71, 71, 71, 73, 72, 74,
- 74, 76, 75, 77, 78, 78, 79, 81, 80, 82,
- 82, 84, 85, 83, 86, 87, 89, 90, 91, 92,
- 88, 93, 94, 96, 97, 98, 99, 100, 95, 101,
- 101, 102, 102, 102, 103, 103, 104, 104, 106, 105,
- 107, 107, 109, 108, 110, 111
-};
+#define YYPACT_NINF -25
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
-{
- 0, 2, 0, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 0, 5, 0,
- 2, 0, 7, 1, 0, 2, 1, 0, 6, 0,
- 2, 0, 0, 5, 1, 4, 0, 0, 0, 0,
- 15, 1, 1, 0, 0, 0, 0, 0, 20, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 0, 7,
- 0, 2, 0, 6, 1, 1
-};
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-25)))
-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
-static const yytype_uint8 yydefact[] =
-{
- 2, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 0, 0, 47, 0, 57,
- 0, 0, 3, 4, 8, 9, 5, 6, 7, 12,
- 10, 11, 0, 0, 0, 0, 0, 0, 1, 73,
- 66, 49, 0, 59, 0, 0, 0, 0, 88, 0,
- 65, 79, 80, 0, 71, 0, 48, 51, 50, 90,
- 61, 0, 60, 74, 67, 0, 0, 0, 58, 0,
- 0, 0, 89, 0, 91, 64, 62, 0, 68, 53,
- 0, 94, 0, 0, 81, 82, 83, 0, 0, 54,
- 92, 63, 75, 0, 0, 0, 0, 0, 72, 0,
- 56, 55, 52, 95, 0, 0, 0, 93, 84, 85,
- 0, 69, 76, 0, 0, 70, 0, 86, 87, 0,
- 77, 0, 78
-};
+#define YYTABLE_NINF -1
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int16 yydefgoto[] =
-{
- -1, 41, 42, 43, 44, 45, 46, 54, 67, 78,
- 85, 100, 115, 121, 47, 56, 69, 82, 87, 103,
- 96, 48, 49, 66, 90, 108, 133, 75, 119, 50,
- 65, 89, 117, 134, 141, 73, 107, 130, 139, 51,
- 79, 86, 94, 116, 102, 124
-};
+#define yytable_value_is_error(Yytable_value) \
+ 0
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -25
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
static const yytype_int16 yypact[] =
{
114, -25, -25, -25, -25, -25, -25, -25, -25, -25,
@@ -755,7 +666,29 @@ static const yytype_int16 yypact[] =
-25, 143, -25
};
-/* YYPGOTO[NTERM-NUM]. */
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 2, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 0, 0, 47, 0, 57,
+ 0, 0, 3, 4, 8, 9, 5, 6, 7, 12,
+ 10, 11, 0, 0, 0, 0, 0, 0, 1, 73,
+ 66, 49, 0, 59, 0, 0, 0, 0, 88, 0,
+ 65, 79, 80, 0, 71, 0, 48, 51, 50, 90,
+ 61, 0, 60, 74, 67, 0, 0, 0, 58, 0,
+ 0, 0, 89, 0, 91, 64, 62, 0, 68, 53,
+ 0, 94, 0, 0, 81, 82, 83, 0, 0, 54,
+ 92, 63, 75, 0, 0, 0, 0, 0, 72, 0,
+ 56, 55, 52, 95, 0, 0, 0, 93, 84, 85,
+ 0, 69, 76, 0, 0, 70, 0, 86, 87, 0,
+ 77, 0, 78
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
-25, -25, -21, -25, 108, -25, -25, -25, -25, -25,
@@ -765,10 +698,19 @@ static const yytype_int8 yypgoto[] =
-25, -25, -25, -25, -25, -25
};
-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -1
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
+{
+ -1, 41, 42, 43, 44, 45, 46, 54, 67, 78,
+ 85, 100, 115, 121, 47, 56, 69, 82, 87, 103,
+ 96, 48, 49, 66, 90, 108, 133, 75, 119, 50,
+ 65, 89, 117, 134, 141, 73, 107, 130, 139, 51,
+ 79, 86, 94, 116, 102, 124
+};
+
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_uint8 yytable[] =
{
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
@@ -794,12 +736,6 @@ static const yytype_uint8 yytable[] =
132, 136, 140, 142
};
-#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-25)))
-
-#define yytable_value_is_error(Yytable_value) \
- YYID (0)
-
static const yytype_uint8 yycheck[] =
{
3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
@@ -825,8 +761,8 @@ static const yytype_uint8 yycheck[] =
65, 41, 65, 60
};
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
@@ -846,30 +782,46 @@ static const yytype_uint8 yystos[] =
65, 100, 60
};
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY (-2)
-#define YYEOF 0
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror. This remains here temporarily
- to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
-
-#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
-#endif
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 66, 67, 67, 68, 68, 68, 68, 69, 69,
+ 69, 69, 69, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+ 71, 71, 71, 71, 71, 71, 71, 73, 72, 74,
+ 74, 76, 75, 77, 78, 78, 79, 81, 80, 82,
+ 82, 84, 85, 83, 86, 87, 89, 90, 91, 92,
+ 88, 93, 94, 96, 97, 98, 99, 100, 95, 101,
+ 101, 102, 102, 102, 103, 103, 104, 104, 106, 105,
+ 107, 107, 109, 108, 110, 111
+};
+
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 0, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 0, 5, 0,
+ 2, 0, 7, 1, 0, 2, 1, 0, 6, 0,
+ 2, 0, 0, 5, 1, 4, 0, 0, 0, 0,
+ 15, 1, 1, 0, 0, 0, 0, 0, 20, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 0, 7,
+ 0, 2, 0, 6, 1, 1
+};
+
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
#define YYRECOVERING() (!!yyerrstatus)
@@ -886,27 +838,15 @@ do \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (YYID (0))
+ YYERROR; \
+ } \
+while (0)
/* Error token number */
-#define YYTERROR 1
-#define YYERRCODE 256
+#define YYTERROR 1
+#define YYERRCODE 256
-/* This macro is provided for backward compatibility. */
-#ifndef YY_LOCATION_PRINT
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-#endif
-
-
-/* YYLEX -- calling `yylex' with the right arguments. */
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif
/* Enable debugging if requested. */
#if YYDEBUG
@@ -916,40 +856,36 @@ while (YYID (0))
# define YYFPRINTF fprintf
# endif
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (YYID (0))
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
+/* This macro is provided for backward compatibility. */
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT. |
+`----------------------------------------*/
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
{
FILE *yyo = yyoutput;
YYUSE (yyo);
@@ -958,14 +894,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
# ifdef YYPRINT
if (yytype < YYNTOKENS)
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
# endif
- switch (yytype)
- {
- default:
- break;
- }
+ YYUSE (yytype);
}
@@ -973,22 +903,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+ YYFPRINTF (yyoutput, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
yy_symbol_value_print (yyoutput, yytype, yyvaluep);
YYFPRINTF (yyoutput, ")");
@@ -999,16 +918,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
| TOP (included). |
`------------------------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
-#endif
{
YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++)
@@ -1019,49 +930,42 @@ yy_stack_print (yybottom, yytop)
YYFPRINTF (stderr, "\n");
}
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
-#else
-static void
-yy_reduce_print (yyvsp, yyrule)
- YYSTYPE *yyvsp;
- int yyrule;
-#endif
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
{
+ unsigned long int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
- unsigned long int yylno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
+ yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- );
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ );
YYFPRINTF (stderr, "\n");
}
}
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, Rule); \
-} while (YYID (0))
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, Rule); \
+} while (0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
@@ -1075,7 +979,7 @@ int yydebug;
/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
+#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
@@ -1098,15 +1002,8 @@ int yydebug;
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
- const char *yystr;
-#endif
{
YYSIZE_T yylen;
for (yylen = 0; yystr[yylen]; yylen++)
@@ -1122,16 +1019,8 @@ yystrlen (yystr)
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static char *
yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-#endif
{
char *yyd = yydest;
const char *yys = yysrc;
@@ -1161,27 +1050,27 @@ yytnamerr (char *yyres, const char *yystr)
char const *yyp = yystr;
for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
do_not_strip_quotes: ;
}
@@ -1204,11 +1093,11 @@ static int
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken)
{
- YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
YYSIZE_T yysize = yysize0;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
- const char *yyformat = YY_NULL;
+ const char *yyformat = YY_NULLPTR;
/* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
/* Number of reported tokens (one for the "unexpected", one per
@@ -1216,10 +1105,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
int yycount = 0;
/* There are many possibilities here to consider:
- - Assume YYFAIL is not used. It's too flawed to consider. See
- <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
- for details. YYERROR is fine as it does not invoke this
- function.
- If this state is a consistent state with a default action, then
the only way this function was invoked is if the default action
is an error action. In that case, don't check for expected
@@ -1269,7 +1154,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
}
yyarg[yycount++] = yytname[yyx];
{
- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
@@ -1336,31 +1221,17 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
-#endif
{
YYUSE (yyvaluep);
-
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
- switch (yytype)
- {
-
- default:
- break;
- }
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YYUSE (yytype);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
}
@@ -1369,18 +1240,8 @@ yydestruct (yymsg, yytype, yyvaluep)
/* The lookahead symbol. */
int yychar;
-
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END
-#endif
-#ifndef YY_INITIAL_VALUE
-# define YY_INITIAL_VALUE(Value) /* Nothing. */
-#endif
-
/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
-
+YYSTYPE yylval;
/* Number of syntax errors so far. */
int yynerrs;
@@ -1389,35 +1250,16 @@ int yynerrs;
| yyparse. |
`----------*/
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-hid_t
-yyparse (void *YYPARSE_PARAM)
-#else
-hid_t
-yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
hid_t
yyparse (void)
-#else
-hid_t
-yyparse ()
-
-#endif
-#endif
{
int yystate;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
@@ -1485,23 +1327,23 @@ yyparse ()
#ifdef yyoverflow
{
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yystacksize);
-
- yyss = yyss1;
- yyvs = yyvs1;
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
@@ -1509,22 +1351,22 @@ yyparse ()
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
+ yystacksize = YYMAXDEPTH;
{
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
}
# endif
#endif /* no yyoverflow */
@@ -1533,10 +1375,10 @@ yyparse ()
yyvsp = yyvs + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
+ (unsigned long int) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
+ YYABORT;
}
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
@@ -1565,7 +1407,7 @@ yybackup:
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
+ yychar = yylex ();
}
if (yychar <= YYEOF)
@@ -1630,7 +1472,7 @@ yyreduce:
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'.
+ '$$ = $1'.
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
@@ -1644,440 +1486,439 @@ yyreduce:
switch (yyn)
{
case 2:
-/* Line 1792 of yacc.c */
-#line 105 "hl/src/H5LTparse.y"
+#line 105 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ memset(arr_stack, 0, STACK_SIZE*sizeof(struct arr_info)); /*initialize here?*/ }
+#line 1470 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 3:
-/* Line 1792 of yacc.c */
-#line 106 "hl/src/H5LTparse.y"
+#line 106 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ return (yyval.hid);}
+#line 1476 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 13:
-/* Line 1792 of yacc.c */
-#line 120 "hl/src/H5LTparse.y"
+#line 120 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I8BE); }
+#line 1482 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 14:
-/* Line 1792 of yacc.c */
-#line 121 "hl/src/H5LTparse.y"
+#line 121 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I8LE); }
+#line 1488 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 15:
-/* Line 1792 of yacc.c */
-#line 122 "hl/src/H5LTparse.y"
+#line 122 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I16BE); }
+#line 1494 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 16:
-/* Line 1792 of yacc.c */
-#line 123 "hl/src/H5LTparse.y"
+#line 123 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I16LE); }
+#line 1500 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 17:
-/* Line 1792 of yacc.c */
-#line 124 "hl/src/H5LTparse.y"
+#line 124 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I32BE); }
+#line 1506 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 18:
-/* Line 1792 of yacc.c */
-#line 125 "hl/src/H5LTparse.y"
+#line 125 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I32LE); }
+#line 1512 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 19:
-/* Line 1792 of yacc.c */
-#line 126 "hl/src/H5LTparse.y"
+#line 126 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I64BE); }
+#line 1518 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 20:
-/* Line 1792 of yacc.c */
-#line 127 "hl/src/H5LTparse.y"
+#line 127 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I64LE); }
+#line 1524 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 21:
-/* Line 1792 of yacc.c */
-#line 128 "hl/src/H5LTparse.y"
+#line 128 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U8BE); }
+#line 1530 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 22:
-/* Line 1792 of yacc.c */
-#line 129 "hl/src/H5LTparse.y"
+#line 129 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U8LE); }
+#line 1536 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 23:
-/* Line 1792 of yacc.c */
-#line 130 "hl/src/H5LTparse.y"
+#line 130 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U16BE); }
+#line 1542 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 24:
-/* Line 1792 of yacc.c */
-#line 131 "hl/src/H5LTparse.y"
+#line 131 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U16LE); }
+#line 1548 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 25:
-/* Line 1792 of yacc.c */
-#line 132 "hl/src/H5LTparse.y"
+#line 132 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U32BE); }
+#line 1554 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 26:
-/* Line 1792 of yacc.c */
-#line 133 "hl/src/H5LTparse.y"
+#line 133 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U32LE); }
+#line 1560 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 27:
-/* Line 1792 of yacc.c */
-#line 134 "hl/src/H5LTparse.y"
+#line 134 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U64BE); }
+#line 1566 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 28:
-/* Line 1792 of yacc.c */
-#line 135 "hl/src/H5LTparse.y"
+#line 135 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U64LE); }
+#line 1572 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 29:
-/* Line 1792 of yacc.c */
-#line 136 "hl/src/H5LTparse.y"
+#line 136 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_CHAR); }
+#line 1578 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 30:
-/* Line 1792 of yacc.c */
-#line 137 "hl/src/H5LTparse.y"
+#line 137 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_SCHAR); }
+#line 1584 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 31:
-/* Line 1792 of yacc.c */
-#line 138 "hl/src/H5LTparse.y"
+#line 138 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_UCHAR); }
+#line 1590 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 32:
-/* Line 1792 of yacc.c */
-#line 139 "hl/src/H5LTparse.y"
+#line 139 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_SHORT); }
+#line 1596 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 33:
-/* Line 1792 of yacc.c */
-#line 140 "hl/src/H5LTparse.y"
+#line 140 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_USHORT); }
+#line 1602 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 34:
-/* Line 1792 of yacc.c */
-#line 141 "hl/src/H5LTparse.y"
+#line 141 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_INT); }
+#line 1608 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 35:
-/* Line 1792 of yacc.c */
-#line 142 "hl/src/H5LTparse.y"
+#line 142 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_UINT); }
+#line 1614 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 36:
-/* Line 1792 of yacc.c */
-#line 143 "hl/src/H5LTparse.y"
+#line 143 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_LONG); }
+#line 1620 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 37:
-/* Line 1792 of yacc.c */
-#line 144 "hl/src/H5LTparse.y"
+#line 144 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_ULONG); }
+#line 1626 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 38:
-/* Line 1792 of yacc.c */
-#line 145 "hl/src/H5LTparse.y"
+#line 145 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_LLONG); }
+#line 1632 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 39:
-/* Line 1792 of yacc.c */
-#line 146 "hl/src/H5LTparse.y"
+#line 146 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_ULLONG); }
+#line 1638 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 40:
-/* Line 1792 of yacc.c */
-#line 149 "hl/src/H5LTparse.y"
+#line 149 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F32BE); }
+#line 1644 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 41:
-/* Line 1792 of yacc.c */
-#line 150 "hl/src/H5LTparse.y"
+#line 150 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F32LE); }
+#line 1650 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 42:
-/* Line 1792 of yacc.c */
-#line 151 "hl/src/H5LTparse.y"
+#line 151 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F64BE); }
+#line 1656 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 43:
-/* Line 1792 of yacc.c */
-#line 152 "hl/src/H5LTparse.y"
+#line 152 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F64LE); }
+#line 1662 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 44:
-/* Line 1792 of yacc.c */
-#line 153 "hl/src/H5LTparse.y"
+#line 153 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_FLOAT); }
+#line 1668 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 45:
-/* Line 1792 of yacc.c */
-#line 154 "hl/src/H5LTparse.y"
+#line 154 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_DOUBLE); }
+#line 1674 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 46:
-/* Line 1792 of yacc.c */
-#line 155 "hl/src/H5LTparse.y"
+#line 155 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_LDOUBLE); }
+#line 1680 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 47:
-/* Line 1792 of yacc.c */
-#line 159 "hl/src/H5LTparse.y"
+#line 159 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ csindex++; cmpd_stack[csindex].id = H5Tcreate(H5T_COMPOUND, 1); /*temporarily set size to 1*/ }
+#line 1686 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 48:
-/* Line 1792 of yacc.c */
-#line 161 "hl/src/H5LTparse.y"
- { (yyval.hid) = cmpd_stack[csindex].id;
+#line 161 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+ { (yyval.hid) = cmpd_stack[csindex].id;
cmpd_stack[csindex].id = 0;
- cmpd_stack[csindex].first_memb = 1;
+ cmpd_stack[csindex].first_memb = 1;
csindex--;
}
+#line 1696 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 51:
-/* Line 1792 of yacc.c */
-#line 170 "hl/src/H5LTparse.y"
+#line 170 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ cmpd_stack[csindex].is_field = 1; /*notify lexer a compound member is parsed*/ }
+#line 1702 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 52:
-/* Line 1792 of yacc.c */
-#line 172 "hl/src/H5LTparse.y"
- {
+#line 172 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+ {
size_t origin_size, new_size;
hid_t dtype_id = cmpd_stack[csindex].id;
/*Adjust size and insert member, consider both member size and offset.*/
if(cmpd_stack[csindex].first_memb) { /*reclaim the size 1 temporarily set*/
- new_size = H5Tget_size((yyvsp[(1) - (7)].hid)) + (yyvsp[(6) - (7)].ival);
+ new_size = H5Tget_size((yyvsp[-6].hid)) + (yyvsp[-1].ival);
H5Tset_size(dtype_id, new_size);
/*member name is saved in yylval.sval by lexer*/
- H5Tinsert(dtype_id, (yyvsp[(4) - (7)].sval), (yyvsp[(6) - (7)].ival), (yyvsp[(1) - (7)].hid));
+ H5Tinsert(dtype_id, (yyvsp[-3].sval), (yyvsp[-1].ival), (yyvsp[-6].hid));
cmpd_stack[csindex].first_memb = 0;
} else {
origin_size = H5Tget_size(dtype_id);
-
- if((yyvsp[(6) - (7)].ival) == 0) {
- new_size = origin_size + H5Tget_size((yyvsp[(1) - (7)].hid));
+
+ if((yyvsp[-1].ival) == 0) {
+ new_size = origin_size + H5Tget_size((yyvsp[-6].hid));
H5Tset_size(dtype_id, new_size);
- H5Tinsert(dtype_id, (yyvsp[(4) - (7)].sval), origin_size, (yyvsp[(1) - (7)].hid));
+ H5Tinsert(dtype_id, (yyvsp[-3].sval), origin_size, (yyvsp[-6].hid));
} else {
- new_size = (yyvsp[(6) - (7)].ival) + H5Tget_size((yyvsp[(1) - (7)].hid));
+ new_size = (yyvsp[-1].ival) + H5Tget_size((yyvsp[-6].hid));
H5Tset_size(dtype_id, new_size);
- H5Tinsert(dtype_id, (yyvsp[(4) - (7)].sval), (yyvsp[(6) - (7)].ival), (yyvsp[(1) - (7)].hid));
+ H5Tinsert(dtype_id, (yyvsp[-3].sval), (yyvsp[-1].ival), (yyvsp[-6].hid));
}
}
- if((yyvsp[(4) - (7)].sval)) {
- free((yyvsp[(4) - (7)].sval));
- (yyvsp[(4) - (7)].sval) = NULL;
+ if((yyvsp[-3].sval)) {
+ free((yyvsp[-3].sval));
+ (yyvsp[-3].sval) = NULL;
}
cmpd_stack[csindex].is_field = 0;
- H5Tclose((yyvsp[(1) - (7)].hid));
-
+ H5Tclose((yyvsp[-6].hid));
+
new_size = H5Tget_size(dtype_id);
}
+#line 1741 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 53:
-/* Line 1792 of yacc.c */
-#line 208 "hl/src/H5LTparse.y"
+#line 208 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
(yyval.sval) = strdup(yylval.sval);
free(yylval.sval);
yylval.sval = NULL;
}
+#line 1751 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 54:
-/* Line 1792 of yacc.c */
-#line 215 "hl/src/H5LTparse.y"
+#line 215 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.ival) = 0; }
+#line 1757 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 55:
-/* Line 1792 of yacc.c */
-#line 217 "hl/src/H5LTparse.y"
+#line 217 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.ival) = yylval.ival; }
+#line 1763 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 57:
-/* Line 1792 of yacc.c */
-#line 221 "hl/src/H5LTparse.y"
+#line 221 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ asindex++; /*pushd onto the stack*/ }
+#line 1769 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 58:
-/* Line 1792 of yacc.c */
-#line 223 "hl/src/H5LTparse.y"
- {
- (yyval.hid) = H5Tarray_create2((yyvsp[(5) - (6)].hid), arr_stack[asindex].ndims, arr_stack[asindex].dims);
+#line 223 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+ {
+ (yyval.hid) = H5Tarray_create2((yyvsp[-1].hid), arr_stack[asindex].ndims, arr_stack[asindex].dims);
arr_stack[asindex].ndims = 0;
asindex--;
- H5Tclose((yyvsp[(5) - (6)].hid));
+ H5Tclose((yyvsp[-1].hid));
}
+#line 1780 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 61:
-/* Line 1792 of yacc.c */
-#line 233 "hl/src/H5LTparse.y"
+#line 233 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ arr_stack[asindex].is_dim = 1; /*notice lexer of dimension size*/ }
+#line 1786 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 62:
-/* Line 1792 of yacc.c */
-#line 234 "hl/src/H5LTparse.y"
+#line 234 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ unsigned ndims = arr_stack[asindex].ndims;
- arr_stack[asindex].dims[ndims] = (hsize_t)yylval.ival;
+ arr_stack[asindex].dims[ndims] = (hsize_t)yylval.ival;
arr_stack[asindex].ndims++;
- arr_stack[asindex].is_dim = 0;
+ arr_stack[asindex].is_dim = 0;
}
+#line 1796 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 65:
-/* Line 1792 of yacc.c */
-#line 245 "hl/src/H5LTparse.y"
- { (yyval.hid) = H5Tvlen_create((yyvsp[(3) - (4)].hid)); H5Tclose((yyvsp[(3) - (4)].hid)); }
+#line 245 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+ { (yyval.hid) = H5Tvlen_create((yyvsp[-1].hid)); H5Tclose((yyvsp[-1].hid)); }
+#line 1802 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 66:
-/* Line 1792 of yacc.c */
-#line 250 "hl/src/H5LTparse.y"
+#line 250 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ is_opq_size = 1; }
+#line 1808 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 67:
-/* Line 1792 of yacc.c */
-#line 251 "hl/src/H5LTparse.y"
- {
+#line 251 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+ {
size_t size = (size_t)yylval.ival;
(yyval.hid) = H5Tcreate(H5T_OPAQUE, size);
- is_opq_size = 0;
+ is_opq_size = 0;
}
+#line 1818 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 68:
-/* Line 1792 of yacc.c */
-#line 256 "hl/src/H5LTparse.y"
+#line 256 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ is_opq_tag = 1; }
+#line 1824 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 69:
-/* Line 1792 of yacc.c */
-#line 257 "hl/src/H5LTparse.y"
- {
- H5Tset_tag((yyvsp[(7) - (13)].hid), yylval.sval);
+#line 257 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+ {
+ H5Tset_tag((yyvsp[-6].hid), yylval.sval);
free(yylval.sval);
yylval.sval = NULL;
is_opq_tag = 0;
}
+#line 1835 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 70:
-/* Line 1792 of yacc.c */
-#line 263 "hl/src/H5LTparse.y"
- { (yyval.hid) = (yyvsp[(7) - (15)].hid); }
+#line 263 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+ { (yyval.hid) = (yyvsp[-8].hid); }
+#line 1841 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 73:
-/* Line 1792 of yacc.c */
-#line 271 "hl/src/H5LTparse.y"
+#line 271 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ is_str_size = 1; }
+#line 1847 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 74:
-/* Line 1792 of yacc.c */
-#line 272 "hl/src/H5LTparse.y"
- {
- if((yyvsp[(5) - (6)].ival) == H5T_VARIABLE_TOKEN)
+#line 272 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+ {
+ if((yyvsp[-1].ival) == H5T_VARIABLE_TOKEN)
is_variable = 1;
- else
+ else
str_size = yylval.ival;
- is_str_size = 0;
+ is_str_size = 0;
}
+#line 1859 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 75:
-/* Line 1792 of yacc.c */
-#line 280 "hl/src/H5LTparse.y"
+#line 280 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
- if((yyvsp[(9) - (10)].ival) == H5T_STR_NULLTERM_TOKEN)
+ if((yyvsp[-1].ival) == H5T_STR_NULLTERM_TOKEN)
str_pad = H5T_STR_NULLTERM;
- else if((yyvsp[(9) - (10)].ival) == H5T_STR_NULLPAD_TOKEN)
+ else if((yyvsp[-1].ival) == H5T_STR_NULLPAD_TOKEN)
str_pad = H5T_STR_NULLPAD;
- else if((yyvsp[(9) - (10)].ival) == H5T_STR_SPACEPAD_TOKEN)
+ else if((yyvsp[-1].ival) == H5T_STR_SPACEPAD_TOKEN)
str_pad = H5T_STR_SPACEPAD;
}
+#line 1872 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 76:
-/* Line 1792 of yacc.c */
-#line 289 "hl/src/H5LTparse.y"
- {
- if((yyvsp[(13) - (14)].ival) == H5T_CSET_ASCII_TOKEN)
+#line 289 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+ {
+ if((yyvsp[-1].ival) == H5T_CSET_ASCII_TOKEN)
str_cset = H5T_CSET_ASCII;
- else if((yyvsp[(13) - (14)].ival) == H5T_CSET_UTF8_TOKEN)
+ else if((yyvsp[-1].ival) == H5T_CSET_UTF8_TOKEN)
str_cset = H5T_CSET_UTF8;
}
+#line 1883 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 77:
-/* Line 1792 of yacc.c */
-#line 296 "hl/src/H5LTparse.y"
+#line 296 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
- if((yyvsp[(17) - (18)].hid) == H5T_C_S1_TOKEN)
+ if((yyvsp[-1].hid) == H5T_C_S1_TOKEN)
(yyval.hid) = H5Tcopy(H5T_C_S1);
- else if((yyvsp[(17) - (18)].hid) == H5T_FORTRAN_S1_TOKEN)
+ else if((yyvsp[-1].hid) == H5T_FORTRAN_S1_TOKEN)
(yyval.hid) = H5Tcopy(H5T_FORTRAN_S1);
}
+#line 1894 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 78:
-/* Line 1792 of yacc.c */
-#line 303 "hl/src/H5LTparse.y"
- {
- hid_t str_id = (yyvsp[(19) - (20)].hid);
+#line 303 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+ {
+ hid_t str_id = (yyvsp[-1].hid);
/*set string size*/
if(is_variable) {
@@ -2085,93 +1926,93 @@ yyreduce:
is_variable = 0;
} else
H5Tset_size(str_id, str_size);
-
+
/*set string padding and character set*/
H5Tset_strpad(str_id, str_pad);
H5Tset_cset(str_id, str_cset);
- (yyval.hid) = str_id;
+ (yyval.hid) = str_id;
}
+#line 1915 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 79:
-/* Line 1792 of yacc.c */
-#line 320 "hl/src/H5LTparse.y"
+#line 320 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.ival) = H5T_VARIABLE_TOKEN;}
+#line 1921 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 81:
-/* Line 1792 of yacc.c */
-#line 323 "hl/src/H5LTparse.y"
+#line 323 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.ival) = H5T_STR_NULLTERM_TOKEN;}
+#line 1927 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 82:
-/* Line 1792 of yacc.c */
-#line 324 "hl/src/H5LTparse.y"
+#line 324 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.ival) = H5T_STR_NULLPAD_TOKEN;}
+#line 1933 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 83:
-/* Line 1792 of yacc.c */
-#line 325 "hl/src/H5LTparse.y"
+#line 325 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.ival) = H5T_STR_SPACEPAD_TOKEN;}
+#line 1939 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 84:
-/* Line 1792 of yacc.c */
-#line 327 "hl/src/H5LTparse.y"
+#line 327 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.ival) = H5T_CSET_ASCII_TOKEN;}
+#line 1945 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 85:
-/* Line 1792 of yacc.c */
-#line 328 "hl/src/H5LTparse.y"
+#line 328 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.ival) = H5T_CSET_UTF8_TOKEN;}
+#line 1951 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 86:
-/* Line 1792 of yacc.c */
-#line 330 "hl/src/H5LTparse.y"
+#line 330 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.hid) = H5T_C_S1_TOKEN;}
+#line 1957 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 87:
-/* Line 1792 of yacc.c */
-#line 331 "hl/src/H5LTparse.y"
+#line 331 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.hid) = H5T_FORTRAN_S1_TOKEN;}
+#line 1963 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 88:
-/* Line 1792 of yacc.c */
-#line 335 "hl/src/H5LTparse.y"
- { is_enum = 1; enum_id = H5Tenum_create((yyvsp[(3) - (4)].hid)); H5Tclose((yyvsp[(3) - (4)].hid)); }
+#line 335 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+ { is_enum = 1; enum_id = H5Tenum_create((yyvsp[-1].hid)); H5Tclose((yyvsp[-1].hid)); }
+#line 1969 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 89:
-/* Line 1792 of yacc.c */
-#line 337 "hl/src/H5LTparse.y"
+#line 337 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ is_enum = 0; /*reset*/ (yyval.hid) = enum_id; }
+#line 1975 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 92:
-/* Line 1792 of yacc.c */
-#line 342 "hl/src/H5LTparse.y"
+#line 342 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
is_enum_memb = 1; /*indicate member of enum*/
#ifdef H5_HAVE_WIN32_API
- enum_memb_symbol = _strdup(yylval.sval);
+ enum_memb_symbol = _strdup(yylval.sval);
#else /* H5_HAVE_WIN32_API */
- enum_memb_symbol = strdup(yylval.sval);
+ enum_memb_symbol = strdup(yylval.sval);
#endif /* H5_HAVE_WIN32_API */
free(yylval.sval);
yylval.sval = NULL;
}
+#line 1990 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 93:
-/* Line 1792 of yacc.c */
-#line 353 "hl/src/H5LTparse.y"
+#line 353 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
char char_val=(char)yylval.ival;
short short_val=(short)yylval.ival;
@@ -2182,43 +2023,43 @@ yyreduce:
hid_t native = H5Tget_native_type(super, H5T_DIR_ASCEND);
H5T_order_t super_order = H5Tget_order(super);
H5T_order_t native_order = H5Tget_order(native);
-
+
if(is_enum && is_enum_memb) { /*if it's an enum member*/
/*To handle machines of different endianness*/
if(H5Tequal(native, H5T_NATIVE_SCHAR) || H5Tequal(native, H5T_NATIVE_UCHAR)) {
if(super_order != native_order)
- H5Tconvert(native, super, 1, &char_val, NULL, H5P_DEFAULT);
+ H5Tconvert(native, super, 1, &char_val, NULL, H5P_DEFAULT);
H5Tenum_insert(enum_id, enum_memb_symbol, &char_val);
} else if(H5Tequal(native, H5T_NATIVE_SHORT) || H5Tequal(native, H5T_NATIVE_USHORT)) {
if(super_order != native_order)
- H5Tconvert(native, super, 1, &short_val, NULL, H5P_DEFAULT);
+ H5Tconvert(native, super, 1, &short_val, NULL, H5P_DEFAULT);
H5Tenum_insert(enum_id, enum_memb_symbol, &short_val);
} else if(H5Tequal(native, H5T_NATIVE_INT) || H5Tequal(native, H5T_NATIVE_UINT)) {
if(super_order != native_order)
- H5Tconvert(native, super, 1, &int_val, NULL, H5P_DEFAULT);
+ H5Tconvert(native, super, 1, &int_val, NULL, H5P_DEFAULT);
H5Tenum_insert(enum_id, enum_memb_symbol, &int_val);
} else if(H5Tequal(native, H5T_NATIVE_LONG) || H5Tequal(native, H5T_NATIVE_ULONG)) {
if(super_order != native_order)
- H5Tconvert(native, super, 1, &long_val, NULL, H5P_DEFAULT);
+ H5Tconvert(native, super, 1, &long_val, NULL, H5P_DEFAULT);
H5Tenum_insert(enum_id, enum_memb_symbol, &long_val);
} else if(H5Tequal(native, H5T_NATIVE_LLONG) || H5Tequal(native, H5T_NATIVE_ULLONG)) {
if(super_order != native_order)
- H5Tconvert(native, super, 1, &llong_val, NULL, H5P_DEFAULT);
+ H5Tconvert(native, super, 1, &llong_val, NULL, H5P_DEFAULT);
H5Tenum_insert(enum_id, enum_memb_symbol, &llong_val);
}
- is_enum_memb = 0;
+ is_enum_memb = 0;
if(enum_memb_symbol) free(enum_memb_symbol);
}
H5Tclose(super);
H5Tclose(native);
}
+#line 2037 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
-/* Line 1792 of yacc.c */
-#line 2200 "hl/src/H5LTparse.c"
+#line 2041 "hl/src/H5LTparse.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -2240,7 +2081,7 @@ yyreduce:
*++yyvsp = yyval;
- /* Now `shift' the result of the reduction. Determine what state
+ /* Now 'shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
@@ -2255,9 +2096,9 @@ yyreduce:
goto yynewstate;
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
yyerrlab:
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
@@ -2308,20 +2149,20 @@ yyerrlab:
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
- error, discard it. */
+ error, discard it. */
if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval);
- yychar = YYEMPTY;
- }
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
}
/* Else will try to reuse lookahead token after shifting the error
@@ -2340,7 +2181,7 @@ yyerrorlab:
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
- /* Do not reclaim the symbols of the rule which action triggered
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
YYPOPSTACK (yylen);
yylen = 0;
@@ -2353,29 +2194,29 @@ yyerrorlab:
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
{
yyn = yypact[yystate];
if (!yypact_value_is_default (yyn))
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
- YYABORT;
+ YYABORT;
yydestruct ("Error: popping",
- yystos[yystate], yyvsp);
+ yystos[yystate], yyvsp);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
@@ -2426,14 +2267,14 @@ yyreturn:
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval);
}
- /* Do not reclaim the symbols of the rule which action triggered
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
YY_STACK_PRINT (yyss, yyssp);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp);
+ yystos[*yyssp], yyvsp);
YYPOPSTACK (1);
}
#ifndef yyoverflow
@@ -2444,8 +2285,5 @@ yyreturn:
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
#endif
- /* Make sure YYID is used. */
- return YYID (yyresult);
+ return yyresult;
}
-
-
diff --git a/hl/src/H5LTparse.h b/hl/src/H5LTparse.h
index 0ecd15d..e38116a 100644
--- a/hl/src/H5LTparse.h
+++ b/hl/src/H5LTparse.h
@@ -1,8 +1,8 @@
-/* A Bison parser, made by GNU Bison 2.7. */
+/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison interface for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@
#ifndef YY_H5LTYY_HL_SRC_H5LTPARSE_H_INCLUDED
# define YY_H5LTYY_HL_SRC_H5LTPARSE_H_INCLUDED
-/* Enabling traces. */
+/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
@@ -40,105 +40,92 @@
extern int H5LTyydebug;
#endif
-/* Tokens. */
+/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- H5T_STD_I8BE_TOKEN = 258,
- H5T_STD_I8LE_TOKEN = 259,
- H5T_STD_I16BE_TOKEN = 260,
- H5T_STD_I16LE_TOKEN = 261,
- H5T_STD_I32BE_TOKEN = 262,
- H5T_STD_I32LE_TOKEN = 263,
- H5T_STD_I64BE_TOKEN = 264,
- H5T_STD_I64LE_TOKEN = 265,
- H5T_STD_U8BE_TOKEN = 266,
- H5T_STD_U8LE_TOKEN = 267,
- H5T_STD_U16BE_TOKEN = 268,
- H5T_STD_U16LE_TOKEN = 269,
- H5T_STD_U32BE_TOKEN = 270,
- H5T_STD_U32LE_TOKEN = 271,
- H5T_STD_U64BE_TOKEN = 272,
- H5T_STD_U64LE_TOKEN = 273,
- H5T_NATIVE_CHAR_TOKEN = 274,
- H5T_NATIVE_SCHAR_TOKEN = 275,
- H5T_NATIVE_UCHAR_TOKEN = 276,
- H5T_NATIVE_SHORT_TOKEN = 277,
- H5T_NATIVE_USHORT_TOKEN = 278,
- H5T_NATIVE_INT_TOKEN = 279,
- H5T_NATIVE_UINT_TOKEN = 280,
- H5T_NATIVE_LONG_TOKEN = 281,
- H5T_NATIVE_ULONG_TOKEN = 282,
- H5T_NATIVE_LLONG_TOKEN = 283,
- H5T_NATIVE_ULLONG_TOKEN = 284,
- H5T_IEEE_F32BE_TOKEN = 285,
- H5T_IEEE_F32LE_TOKEN = 286,
- H5T_IEEE_F64BE_TOKEN = 287,
- H5T_IEEE_F64LE_TOKEN = 288,
- H5T_NATIVE_FLOAT_TOKEN = 289,
- H5T_NATIVE_DOUBLE_TOKEN = 290,
- H5T_NATIVE_LDOUBLE_TOKEN = 291,
- H5T_STRING_TOKEN = 292,
- STRSIZE_TOKEN = 293,
- STRPAD_TOKEN = 294,
- CSET_TOKEN = 295,
- CTYPE_TOKEN = 296,
- H5T_VARIABLE_TOKEN = 297,
- H5T_STR_NULLTERM_TOKEN = 298,
- H5T_STR_NULLPAD_TOKEN = 299,
- H5T_STR_SPACEPAD_TOKEN = 300,
- H5T_CSET_ASCII_TOKEN = 301,
- H5T_CSET_UTF8_TOKEN = 302,
- H5T_C_S1_TOKEN = 303,
- H5T_FORTRAN_S1_TOKEN = 304,
- H5T_OPAQUE_TOKEN = 305,
- OPQ_SIZE_TOKEN = 306,
- OPQ_TAG_TOKEN = 307,
- H5T_COMPOUND_TOKEN = 308,
- H5T_ENUM_TOKEN = 309,
- H5T_ARRAY_TOKEN = 310,
- H5T_VLEN_TOKEN = 311,
- STRING = 312,
- NUMBER = 313
- };
+ enum yytokentype
+ {
+ H5T_STD_I8BE_TOKEN = 258,
+ H5T_STD_I8LE_TOKEN = 259,
+ H5T_STD_I16BE_TOKEN = 260,
+ H5T_STD_I16LE_TOKEN = 261,
+ H5T_STD_I32BE_TOKEN = 262,
+ H5T_STD_I32LE_TOKEN = 263,
+ H5T_STD_I64BE_TOKEN = 264,
+ H5T_STD_I64LE_TOKEN = 265,
+ H5T_STD_U8BE_TOKEN = 266,
+ H5T_STD_U8LE_TOKEN = 267,
+ H5T_STD_U16BE_TOKEN = 268,
+ H5T_STD_U16LE_TOKEN = 269,
+ H5T_STD_U32BE_TOKEN = 270,
+ H5T_STD_U32LE_TOKEN = 271,
+ H5T_STD_U64BE_TOKEN = 272,
+ H5T_STD_U64LE_TOKEN = 273,
+ H5T_NATIVE_CHAR_TOKEN = 274,
+ H5T_NATIVE_SCHAR_TOKEN = 275,
+ H5T_NATIVE_UCHAR_TOKEN = 276,
+ H5T_NATIVE_SHORT_TOKEN = 277,
+ H5T_NATIVE_USHORT_TOKEN = 278,
+ H5T_NATIVE_INT_TOKEN = 279,
+ H5T_NATIVE_UINT_TOKEN = 280,
+ H5T_NATIVE_LONG_TOKEN = 281,
+ H5T_NATIVE_ULONG_TOKEN = 282,
+ H5T_NATIVE_LLONG_TOKEN = 283,
+ H5T_NATIVE_ULLONG_TOKEN = 284,
+ H5T_IEEE_F32BE_TOKEN = 285,
+ H5T_IEEE_F32LE_TOKEN = 286,
+ H5T_IEEE_F64BE_TOKEN = 287,
+ H5T_IEEE_F64LE_TOKEN = 288,
+ H5T_NATIVE_FLOAT_TOKEN = 289,
+ H5T_NATIVE_DOUBLE_TOKEN = 290,
+ H5T_NATIVE_LDOUBLE_TOKEN = 291,
+ H5T_STRING_TOKEN = 292,
+ STRSIZE_TOKEN = 293,
+ STRPAD_TOKEN = 294,
+ CSET_TOKEN = 295,
+ CTYPE_TOKEN = 296,
+ H5T_VARIABLE_TOKEN = 297,
+ H5T_STR_NULLTERM_TOKEN = 298,
+ H5T_STR_NULLPAD_TOKEN = 299,
+ H5T_STR_SPACEPAD_TOKEN = 300,
+ H5T_CSET_ASCII_TOKEN = 301,
+ H5T_CSET_UTF8_TOKEN = 302,
+ H5T_C_S1_TOKEN = 303,
+ H5T_FORTRAN_S1_TOKEN = 304,
+ H5T_OPAQUE_TOKEN = 305,
+ OPQ_SIZE_TOKEN = 306,
+ OPQ_TAG_TOKEN = 307,
+ H5T_COMPOUND_TOKEN = 308,
+ H5T_ENUM_TOKEN = 309,
+ H5T_ARRAY_TOKEN = 310,
+ H5T_VLEN_TOKEN = 311,
+ STRING = 312,
+ NUMBER = 313
+ };
#endif
-
+/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+
+union YYSTYPE
{
-/* Line 2058 of yacc.c */
-#line 72 "hl/src/H5LTparse.y"
+#line 72 "hl/src/H5LTparse.y" /* yacc.c:1909 */
int ival; /*for integer token*/
char *sval; /*for name string*/
hid_t hid; /*for hid_t token*/
+#line 119 "hl/src/H5LTparse.h" /* yacc.c:1909 */
+};
-/* Line 2058 of yacc.c */
-#line 122 "hl/src/H5LTparse.h"
-} YYSTYPE;
+typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
+
extern YYSTYPE H5LTyylval;
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int H5LTyyparse (void *YYPARSE_PARAM);
-#else
-int H5LTyyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
int H5LTyyparse (void);
-#else
-int H5LTyyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
#endif /* !YY_H5LTYY_HL_SRC_H5LTPARSE_H_INCLUDED */
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 9972288..b9641d1 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -656,6 +656,17 @@ Bug Fixes since HDF5-1.10.3 release
Library
-------
+ - Fixed issues CVE-2018-13870 and CVE-2018-13869
+
+ When a buffer overflow occurred because a name length was corrupted
+ and became very large, h5dump crashed on memory access violation.
+
+ A check for reading pass the end of the buffer was added to multiple
+ locations to prevent the crashes and h5dump now simply fails with an
+ error message when this error condition occurs.
+
+ (BMR - 2020/7/22, HDFFV-11120 and HDFFV-11121)
+
- Fixed the segmentation fault when reading attributes with multiple threads
It was reported that the reading of attributes with variable length string
diff --git a/src/H5AC.c b/src/H5AC.c
index f8805b3..402f562 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -138,7 +138,7 @@ static const H5AC_class_t *const H5AC_class_s[] = {
/*-------------------------------------------------------------------------
* Function: H5AC_init
*
- * Purpose: Initialize the interface from some other layer.
+ * Purpose: Initialize the interface from some other layer.
*
* Return: Success: non-negative
* Failure: negative
@@ -918,9 +918,10 @@ H5AC_mark_entry_dirty(void *thing)
done:
/* If currently logging, generate a message */
- if(cache_ptr->log_info->logging)
- if(H5C_log_write_mark_entry_dirty_msg(cache_ptr, entry_ptr, ret_value) < 0)
- HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
+ if(cache_ptr != NULL && cache_ptr->log_info != NULL)
+ if(cache_ptr->log_info->logging)
+ if(H5C_log_write_mark_entry_dirty_msg(cache_ptr, entry_ptr, ret_value) < 0)
+ HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_mark_entry_dirty() */
@@ -971,9 +972,10 @@ H5AC_mark_entry_clean(void *thing)
done:
/* If currently logging, generate a message */
- if(cache_ptr->log_info->logging)
- if(H5C_log_write_mark_entry_clean_msg(cache_ptr, entry_ptr, ret_value) < 0)
- HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
+ if(cache_ptr != NULL && cache_ptr->log_info != NULL)
+ if(cache_ptr->log_info->logging)
+ if(H5C_log_write_mark_entry_clean_msg(cache_ptr, entry_ptr, ret_value) < 0)
+ HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_mark_entry_clean() */
@@ -1013,9 +1015,10 @@ H5AC_mark_entry_unserialized(void *thing)
done:
/* If currently logging, generate a message */
- if(cache_ptr->log_info->logging)
- if(H5C_log_write_mark_unserialized_entry_msg(cache_ptr, entry_ptr, ret_value) < 0)
- HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
+ if(cache_ptr != NULL && cache_ptr->log_info != NULL)
+ if(cache_ptr->log_info->logging)
+ if(H5C_log_write_mark_unserialized_entry_msg(cache_ptr, entry_ptr, ret_value) < 0)
+ HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_mark_entry_unserialized() */
@@ -1054,9 +1057,10 @@ H5AC_mark_entry_serialized(void *thing)
done:
/* If currently logging, generate a message */
- if(cache_ptr->log_info->logging)
- if(H5C_log_write_mark_serialized_entry_msg(cache_ptr, entry_ptr, ret_value) < 0)
- HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
+ if(cache_ptr != NULL && cache_ptr->log_info != NULL)
+ if(cache_ptr->log_info->logging)
+ if(H5C_log_write_mark_serialized_entry_msg(cache_ptr, entry_ptr, ret_value) < 0)
+ HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_mark_entry_serialized() */
@@ -1156,9 +1160,10 @@ H5AC_pin_protected_entry(void *thing)
done:
/* If currently logging, generate a message */
- if(cache_ptr->log_info->logging)
- if(H5C_log_write_pin_entry_msg(cache_ptr, entry_ptr, ret_value) < 0)
- HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
+ if(cache_ptr != NULL && cache_ptr->log_info != NULL)
+ if(cache_ptr->log_info->logging)
+ if(H5C_log_write_pin_entry_msg(cache_ptr, entry_ptr, ret_value) < 0)
+ HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_pin_protected_entry() */
@@ -1238,9 +1243,10 @@ H5AC_create_flush_dependency(void * parent_thing, void * child_thing)
done:
/* If currently logging, generate a message */
- if(cache_ptr->log_info->logging)
- if(H5C_log_write_create_fd_msg(cache_ptr, (H5AC_info_t *)parent_thing, (H5AC_info_t *)child_thing, ret_value) < 0)
- HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
+ if(cache_ptr != NULL && cache_ptr->log_info != NULL)
+ if(cache_ptr->log_info->logging)
+ if(H5C_log_write_create_fd_msg(cache_ptr, (H5AC_info_t *)parent_thing, (H5AC_info_t *)child_thing, ret_value) < 0)
+ HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_create_flush_dependency() */
@@ -1373,9 +1379,10 @@ H5AC_resize_entry(void *thing, size_t new_size)
done:
/* If currently logging, generate a message */
- if(cache_ptr->log_info->logging)
- if(H5C_log_write_resize_entry_msg(cache_ptr, entry_ptr, new_size, ret_value) < 0)
- HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
+ if(cache_ptr != NULL && cache_ptr->log_info != NULL)
+ if(cache_ptr->log_info->logging)
+ if(H5C_log_write_resize_entry_msg(cache_ptr, entry_ptr, new_size, ret_value) < 0)
+ HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_resize_entry() */
@@ -1416,9 +1423,10 @@ H5AC_unpin_entry(void *thing)
done:
/* If currently logging, generate a message */
- if(cache_ptr->log_info->logging)
- if(H5C_log_write_unpin_entry_msg(cache_ptr, entry_ptr, ret_value) < 0)
- HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
+ if(cache_ptr != NULL && cache_ptr->log_info != NULL)
+ if(cache_ptr->log_info->logging)
+ if(H5C_log_write_unpin_entry_msg(cache_ptr, entry_ptr, ret_value) < 0)
+ HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_unpin_entry() */
@@ -1459,9 +1467,10 @@ H5AC_destroy_flush_dependency(void * parent_thing, void * child_thing)
done:
/* If currently logging, generate a message */
- if(cache_ptr->log_info->logging)
- if(H5C_log_write_destroy_fd_msg(cache_ptr, (H5AC_info_t *)parent_thing, (H5AC_info_t *)child_thing, ret_value) < 0)
- HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
+ if(cache_ptr != NULL && cache_ptr->log_info != NULL)
+ if(cache_ptr->log_info->logging)
+ if(H5C_log_write_destroy_fd_msg(cache_ptr, (H5AC_info_t *)parent_thing, (H5AC_info_t *)child_thing, ret_value) < 0)
+ HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_destroy_flush_dependency() */
@@ -2637,9 +2646,10 @@ H5AC_remove_entry(void *_entry)
done:
/* If currently logging, generate a message */
- if(cache->log_info->logging)
- if(H5C_log_write_remove_entry_msg(cache, entry, ret_value) < 0)
- HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
+ if(cache != NULL && cache->log_info != NULL)
+ if(cache->log_info->logging)
+ if(H5C_log_write_remove_entry_msg(cache, entry, ret_value) < 0)
+ HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_remove_entry() */
diff --git a/src/H5Adense.c b/src/H5Adense.c
index a73fcc6..fd92e8f 100644
--- a/src/H5Adense.c
+++ b/src/H5Adense.c
@@ -171,7 +171,6 @@ typedef struct H5A_bt2_ud_rmbi_t {
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 4 2006
*
*-------------------------------------------------------------------------
@@ -290,9 +289,8 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 11 2006
+ * Programmer: Quincey Koziol
+ * Dec 11 2006
*
*-------------------------------------------------------------------------
*/
@@ -351,9 +349,8 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 11 2006
+ * Programmer: Quincey Koziol
+ * Dec 11 2006
*
*-------------------------------------------------------------------------
*/
@@ -440,9 +437,8 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 4 2006
+ * Programmer: Quincey Koziol
+ * Dec 4 2006
*
*-------------------------------------------------------------------------
*/
@@ -598,7 +594,7 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, February 20, 2007
*
*-------------------------------------------------------------------------
@@ -632,7 +628,7 @@ H5A__dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed)
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, December 5, 2006
*
*-------------------------------------------------------------------------
@@ -743,9 +739,8 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 4 2006
+ * Programmer: Quincey Koziol
+ * Dec 4 2006
*
*-------------------------------------------------------------------------
*/
@@ -840,9 +835,8 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 5 2006
+ * Programmer: Quincey Koziol
+ * Dec 5 2006
*
*-------------------------------------------------------------------------
*/
@@ -883,9 +877,8 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Jan 3 2007
+ * Programmer: Quincey Koziol
+ * Jan 3 2007
*
*-------------------------------------------------------------------------
*/
@@ -1065,9 +1058,8 @@ done:
*
* Return: H5_ITER_ERROR/H5_ITER_CONT/H5_ITER_STOP
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 5 2006
+ * Programmer: Quincey Koziol
+ * Dec 5 2006
*
*-------------------------------------------------------------------------
*/
@@ -1161,9 +1153,8 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 5 2006
+ * Programmer: Quincey Koziol
+ * Dec 5 2006
*
*-------------------------------------------------------------------------
*/
@@ -1296,9 +1287,8 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 11 2006
+ * Programmer: Quincey Koziol
+ * Dec 11 2006
*
*-------------------------------------------------------------------------
*/
@@ -1360,9 +1350,8 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 11 2006
+ * Programmer: Quincey Koziol
+ * Dec 11 2006
*
*-------------------------------------------------------------------------
*/
@@ -1448,9 +1437,8 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Feb 14 2007
+ * Programmer: Quincey Koziol
+ * Feb 14 2007
*
*-------------------------------------------------------------------------
*/
@@ -1574,9 +1562,8 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Feb 14 2007
+ * Programmer: Quincey Koziol
+ * Feb 14 2007
*
*-------------------------------------------------------------------------
*/
@@ -1702,9 +1689,8 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 11 2006
+ * Programmer: Quincey Koziol
+ * Dec 11 2006
*
*-------------------------------------------------------------------------
*/
@@ -1788,9 +1774,8 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Jan 3 2007
+ * Programmer: Quincey Koziol
+ * Jan 3 2007
*
*-------------------------------------------------------------------------
*/
@@ -1852,9 +1837,8 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Dec 6 2006
+ * Programmer: Quincey Koziol
+ * Dec 6 2006
*
*-------------------------------------------------------------------------
*/
diff --git a/src/H5Aint.c b/src/H5Aint.c
index cd0ab80..d6ea1f4 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -122,10 +122,10 @@ const unsigned H5O_attr_ver_bounds[] = {
/* Local Variables */
/*******************/
-typedef H5A_t* H5A_t_ptr;
+typedef H5A_t* H5A_t_ptr;
H5FL_SEQ_DEFINE(H5A_t_ptr);
-
+
/*-------------------------------------------------------------------------
* Function: H5A__create
*
@@ -288,16 +288,16 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* H5A__create() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__create_by_name
*
- * Purpose: Create an attribute on object, according to it's name
+ * Purpose: Create an attribute on object, according to it's name
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * December 6, 2017
+ * Programmer: Quincey Koziol
+ * December 6, 2017
*
*-------------------------------------------------------------------------
*/
@@ -306,8 +306,8 @@ H5A__create_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr
const H5T_t *type, const H5S_t *space, hid_t acpl_id)
{
H5G_loc_t obj_loc; /* Location used to open group */
- H5G_name_t obj_path; /* Opened object group hier. path */
- H5O_loc_t obj_oloc; /* Opened object object location */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
H5A_t *attr = NULL; /* Attribute from object header */
H5A_t *ret_value = NULL; /* Return value */
@@ -349,22 +349,21 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A__create_by_name() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__open_common
*
- * Purpose:
- * Finishes initializing an attributes the open
+ * Purpose: Finishes initializing an attributes the open
*
* Usage:
* herr_t H5A__open_common(loc, name)
* const H5G_loc_t *loc; IN: Pointer to group location for object
* H5A_t *attr; IN/OUT: Pointer to attribute to initialize
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * December 18, 2006
+ * Programmer: Quincey Koziol
+ * December 18, 2006
*
*-------------------------------------------------------------------------
*/
@@ -406,7 +405,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A__open_common() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__open
*
@@ -451,13 +450,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A__open() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__open_by_idx
*
* Purpose: Open an attribute according to its index order
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* April 2, 1998
@@ -515,7 +514,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A__open_by_idx() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__open_by_name
*
@@ -579,7 +578,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A__open_by_name() */
-
+
/*--------------------------------------------------------------------------
NAME
H5A__read
@@ -681,12 +680,12 @@ done:
if(tconv_buf)
tconv_buf = H5FL_BLK_FREE(attr_buf, tconv_buf);
if(bkg_buf)
- bkg_buf = H5FL_BLK_FREE(attr_buf, bkg_buf);
+ bkg_buf = H5FL_BLK_FREE(attr_buf, bkg_buf);
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* H5A__read() */
-
+
/*--------------------------------------------------------------------------
NAME
H5A__write
@@ -800,7 +799,7 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* H5A__write() */
-
+
/*--------------------------------------------------------------------------
NAME
H5A__get_name
@@ -821,7 +820,7 @@ ssize_t
H5A__get_name(H5A_t *attr, size_t buf_size, char *buf)
{
size_t copy_len, nbytes;
- ssize_t ret_value = -1; /* Return value */
+ ssize_t ret_value = -1; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -846,7 +845,7 @@ H5A__get_name(H5A_t *attr, size_t buf_size, char *buf)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A__get_name() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A_get_space
*
@@ -883,14 +882,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_get_space() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__get_type
*
* Purpose: Returns an ID for the datatype of an attribute
*
* Return: Success: A valid ID for the datatype of an attribute
- *
* Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
@@ -946,7 +944,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__get_type() */
-
+
/*--------------------------------------------------------------------------
NAME
H5A__get_create_plist
@@ -978,7 +976,7 @@ H5A__get_create_plist(H5A_t* attr)
/* Create the property list object to return */
if((new_plist_id = H5P_copy_plist(plist, TRUE)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy attribute creation properties")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy attribute creation properties")
if(NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_plist_id)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list")
@@ -992,7 +990,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__get_create_plist() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__get_info
*
@@ -1033,14 +1031,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__get_info() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__copy
*
* Purpose: Copies attribute OLD_ATTR.
*
* Return: Success: Pointer to a new copy of the OLD_ATTR argument.
- *
* Failure: NULL
*
* Programmer: Robb Matzke
@@ -1096,7 +1093,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__copy() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__shared_free
*
@@ -1148,7 +1145,7 @@ H5A__shared_free(H5A_t *attr)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__shared_free() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__close_cb
*
@@ -1180,7 +1177,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__close_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__close
*
@@ -1231,7 +1228,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__close() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A_oloc
*
@@ -1263,7 +1260,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_oloc() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A_nameof
*
@@ -1295,7 +1292,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_nameof() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A_type
*
@@ -1325,7 +1322,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__exists_by_name
*
@@ -1371,7 +1368,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A__exists_by_name() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__compact_build_table_cb
*
@@ -1381,7 +1378,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 18 2006
*
* Modification:Raymond Lu
@@ -1432,7 +1428,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__compact_build_table_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__compact_build_table
*
@@ -1444,8 +1440,8 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * Dec 18, 2006
+ * Programmer: Quincey Koziol
+ * Dec 18, 2006
*
*-------------------------------------------------------------------------
*/
@@ -1495,18 +1491,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__compact_build_table() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__dense_build_table_cb
*
* Purpose: Callback routine for building table of attributes from dense
* attribute storage.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 11 2006
*
*-------------------------------------------------------------------------
@@ -1539,7 +1533,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__dense_build_table_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__dense_build_table
*
@@ -1624,21 +1618,20 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__dense_build_table() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__attr_cmp_name_inc
*
- * Purpose: Callback routine for comparing two attribute names, in
+ * Purpose: Callback routine for comparing two attribute names, in
* increasing alphabetic order
*
- * Return: An integer less than, equal to, or greater than zero if the
+ * Return: An integer less than, equal to, or greater than zero if the
* first argument is considered to be respectively less than,
* equal to, or greater than the second. If two members compare
* as equal, their order in the sorted array is undefined.
* (i.e. same as strcmp())
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 11 2006
*
*-------------------------------------------------------------------------
@@ -1652,7 +1645,7 @@ H5A__attr_cmp_name_inc(const void *attr1, const void *attr2)
(*(const H5A_t * const *)attr2)->shared->name))
} /* end H5A__attr_cmp_name_inc() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__attr_cmp_name_dec
*
@@ -1666,7 +1659,6 @@ H5A__attr_cmp_name_inc(const void *attr1, const void *attr2)
* (i.e. opposite of strcmp())
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Feb 8 2007
*
*-------------------------------------------------------------------------
@@ -1680,7 +1672,7 @@ H5A__attr_cmp_name_dec(const void *attr1, const void *attr2)
(*(const H5A_t * const *)attr1)->shared->name))
} /* end H5A__attr_cmp_name_dec() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__attr_cmp_corder_inc
*
@@ -1693,7 +1685,6 @@ H5A__attr_cmp_name_dec(const void *attr1, const void *attr2)
* as equal, their order in the sorted array is undefined.
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Feb 8 2007
*
*-------------------------------------------------------------------------
@@ -1715,21 +1706,20 @@ H5A__attr_cmp_corder_inc(const void *attr1, const void *attr2)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__attr_cmp_corder_inc() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__attr_cmp_corder_dec
*
- * Purpose: Callback routine for comparing two attributes, in
+ * Purpose: Callback routine for comparing two attributes, in
* decreasing creation order
*
- * Return: An integer less than, equal to, or greater than zero if the
+ * Return: An integer less than, equal to, or greater than zero if the
* second argument is considered to be respectively less than,
* equal to, or greater than the first. If two members compare
* as equal, their order in the sorted array is undefined.
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Feb 8 2007
+ * Programmer: Quincey Koziol
+ * Feb 8 2007
*
*-------------------------------------------------------------------------
*/
@@ -1750,17 +1740,16 @@ H5A__attr_cmp_corder_dec(const void *attr1, const void *attr2)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__attr_cmp_corder_dec() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__attr_sort_table
*
* Purpose: Sort table containing a list of attributes for an object
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * Dec 11, 2006
+ * Programmer: Quincey Koziol
+ * Dec 11, 2006
*
*-------------------------------------------------------------------------
*/
@@ -1795,7 +1784,7 @@ H5A__attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5A__attr_sort_table() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__attr_iterate_table
*
@@ -1804,8 +1793,8 @@ H5A__attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type,
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * Dec 18, 2006
+ * Programmer: Quincey Koziol
+ * Dec 18, 2006
*
*-------------------------------------------------------------------------
*/
@@ -1877,7 +1866,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__attr_iterate_table() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__attr_release_table
*
@@ -1885,7 +1874,7 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Dec 11, 2006
*
*-------------------------------------------------------------------------
@@ -1893,7 +1882,7 @@ done:
herr_t
H5A__attr_release_table(H5A_attr_table_t *atable)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1918,18 +1907,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__attr_release_table() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__get_ainfo
*
* Purpose: Retrieves the "attribute info" message for an object. Also
* sets the number of attributes correctly, if it isn't set up yet.
*
- * Return: Success: TRUE/FALSE whether message was found & retrieved
- * Failure: FAIL if error occurred
+ * Return: TRUE/FALSE/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 11 2007
*
*-------------------------------------------------------------------------
@@ -1949,11 +1936,11 @@ H5A__get_ainfo(H5F_t *f, H5O_t *oh, H5O_ainfo_t *ainfo)
/* Check if the "attribute info" message exists */
if((ret_value = H5O_msg_exists_oh(oh, H5O_AINFO_ID)) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "unable to check object header")
+ HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "unable to check object header")
if(ret_value > 0) {
/* Retrieve the "attribute info" structure */
if(NULL == H5O_msg_read_oh(f, oh, H5O_AINFO_ID, ainfo))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't read AINFO message")
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't read AINFO message")
/* Check if we don't know how many attributes there are */
if(ainfo->nattrs == HSIZET_MAX) {
@@ -1982,7 +1969,7 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5A__get_ainfo() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__set_version
*
@@ -1993,7 +1980,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jul 17 2007
*
*-------------------------------------------------------------------------
@@ -2044,7 +2030,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__set_version() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__attr_copy_file
*
@@ -2254,10 +2240,10 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
H5MM_memcpy(buf, attr_src->shared->data, attr_src->shared->data_size);
- /* Allocate background memory */
- if(H5T_path_bkg(tpath_src_mem) || H5T_path_bkg(tpath_mem_dst))
- if(NULL == (bkg_buf = H5FL_BLK_CALLOC(attr_buf, buf_size)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, NULL, "memory allocation failed")
+ /* Allocate background memory */
+ if(H5T_path_bkg(tpath_src_mem) || H5T_path_bkg(tpath_mem_dst))
+ if(NULL == (bkg_buf = H5FL_BLK_CALLOC(attr_buf, buf_size)))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, NULL, "memory allocation failed")
/* Convert from source file to memory */
if(H5T_convert(tpath_src_mem, tid_src, tid_mem, nelmts, (size_t)0, (size_t)0, buf, bkg_buf) < 0)
@@ -2265,9 +2251,9 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
H5MM_memcpy(reclaim_buf, buf, buf_size);
- /* Set background buffer to all zeros */
- if(bkg_buf)
- HDmemset(bkg_buf, 0, buf_size);
+ /* Set background buffer to all zeros */
+ if(bkg_buf)
+ HDmemset(bkg_buf, 0, buf_size);
/* Convert from memory to destination file */
if(H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg_buf) < 0)
@@ -2327,7 +2313,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A__attr_copy_file() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__attr_post_copy_file
*
@@ -2420,7 +2406,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A__attr_post_copy_file() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__dense_post_copy_file_cb
*
@@ -2478,7 +2464,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__dense_post_copy_file_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__dense_post_copy_file_all
*
@@ -2487,7 +2473,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Peter Cao
- * xcao@hdfgroup.org
* July 20, 2007
*
*-------------------------------------------------------------------------
@@ -2525,7 +2510,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A__dense_post_copy_file_all */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__rename_by_name
*
@@ -2533,7 +2518,7 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* February 20, 2007
*
*-------------------------------------------------------------------------
@@ -2543,10 +2528,10 @@ H5A__rename_by_name(H5G_loc_t loc, const char *obj_name, const char *old_attr_na
const char *new_attr_name)
{
H5G_loc_t obj_loc; /* Location used to open group */
- H5G_name_t obj_path; /* Opened object group hier. path */
- H5O_loc_t obj_oloc; /* Opened object object location */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2575,7 +2560,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A__rename_by_name() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__iterate_common
*
@@ -2583,7 +2568,7 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* December 6, 2017
*
*-------------------------------------------------------------------------
@@ -2610,7 +2595,7 @@ H5A__iterate_common(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order,
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A__iterate_common() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__iterate
*
@@ -2675,7 +2660,7 @@ done:
} /* end H5A__iterate() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
-
+
/*-------------------------------------------------------------------------
* Function: H5A__iterate_old
*
@@ -2683,7 +2668,7 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* December 6, 2017
*
*-------------------------------------------------------------------------
@@ -2725,7 +2710,7 @@ H5A__iterate_old(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op,
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* December 6, 2017
*
*-------------------------------------------------------------------------
@@ -2734,8 +2719,8 @@ herr_t
H5A__delete_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr_name)
{
H5G_loc_t obj_loc; /* Location used to open group */
- H5G_name_t obj_path; /* Opened object group hier. path */
- H5O_loc_t obj_oloc; /* Opened object object location */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2763,7 +2748,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5A__delete_by_name() */
-
+
/*-------------------------------------------------------------------------
* Function: H5A__delete_by_idx
*
@@ -2771,7 +2756,7 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* December 6, 2017
*
*-------------------------------------------------------------------------
@@ -2781,8 +2766,8 @@ H5A__delete_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_ty
H5_iter_order_t order, hsize_t n)
{
H5G_loc_t obj_loc; /* Location used to open group */
- H5G_name_t obj_path; /* Opened object group hier. path */
- H5O_loc_t obj_oloc; /* Opened object object location */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5B2.c b/src/H5B2.c
index c9ed303..5c83de2 100644
--- a/src/H5B2.c
+++ b/src/H5B2.c
@@ -15,7 +15,7 @@
*
* Created: H5B2.c
* Jan 31 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Implements a B-tree, with several modifications from
* the "standard" methods.
@@ -129,7 +129,6 @@ H5FL_DEFINE_STATIC(H5B2_t);
* filled in), negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jan 31 2005
*
*-------------------------------------------------------------------------
@@ -200,7 +199,6 @@ done:
* NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 15 2009
*
*-------------------------------------------------------------------------
@@ -264,7 +262,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@@ -307,7 +304,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 23 2015
*
*-------------------------------------------------------------------------
@@ -379,7 +375,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 5 2009
*
*-------------------------------------------------------------------------
@@ -414,7 +409,6 @@ H5B2_get_addr(const H5B2_t *bt2, haddr_t *addr_p)
* Return: Value from callback: non-negative on success, negative on error
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 11 2005
*
*-------------------------------------------------------------------------
@@ -465,7 +459,6 @@ H5B2_iterate(H5B2_t *bt2, H5B2_operator_t op, void *op_data)
* Return: Non-negative (TRUE/FALSE) on success, negative on failure.
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 23 2005
*
*-------------------------------------------------------------------------
@@ -705,7 +698,6 @@ done:
* Return: Non-negative on success, negative on failure.
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 23 2005
*
*-------------------------------------------------------------------------
@@ -894,7 +886,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 25 2005
*
*-------------------------------------------------------------------------
@@ -968,7 +959,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 14 2006
*
*-------------------------------------------------------------------------
@@ -1051,7 +1041,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 25 2005
*
*-------------------------------------------------------------------------
@@ -1092,7 +1081,6 @@ H5B2_get_nrec(const H5B2_t *bt2, hsize_t *nrec)
* Return: Non-negative on success, negative on failure.
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 8 2005
*
*-------------------------------------------------------------------------
@@ -1150,7 +1138,6 @@ done:
* Return: Non-negative on success, negative on failure.
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 10 2005
*
*-------------------------------------------------------------------------
@@ -1384,7 +1371,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 15 2009
*
*-------------------------------------------------------------------------
@@ -1493,7 +1479,6 @@ done:
* Return: Non-negative on success, negative on failure.
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 9 2005
*
*-------------------------------------------------------------------------
diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c
index 68669e8..9ba8235 100644
--- a/src/H5B2hdr.c
+++ b/src/H5B2hdr.c
@@ -15,7 +15,7 @@
*
* Created: H5B2int.c
* Feb 27 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Internal routines for managing v2 B-trees.
*
@@ -101,7 +101,6 @@ H5FL_SEQ_DEFINE(H5B2_node_info_t);
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@@ -230,7 +229,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 27 2009
*
*-------------------------------------------------------------------------
@@ -276,7 +274,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 21 2006
*
*-------------------------------------------------------------------------
@@ -355,7 +352,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 13 2009
*
*-------------------------------------------------------------------------
@@ -391,7 +387,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 13 2009
*
*-------------------------------------------------------------------------
@@ -428,7 +423,6 @@ done:
* Return: SUCCEED (Can't fail)
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 27 2009
*
*-------------------------------------------------------------------------
@@ -456,7 +450,6 @@ H5B2__hdr_fuse_incr(H5B2_hdr_t *hdr)
* Return: The file's reference count after the decrement. (Can't fail)
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 27 2009
*
*-------------------------------------------------------------------------
@@ -485,7 +478,6 @@ H5B2__hdr_fuse_decr(H5B2_hdr_t *hdr)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 13 2009
*
*-------------------------------------------------------------------------
@@ -517,7 +509,6 @@ done:
* Return: Non-NULL pointer to header on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 18 2015
*
*-------------------------------------------------------------------------
diff --git a/src/H5EAdbg.c b/src/H5EAdbg.c
index eb3624b..e5b68be 100644
--- a/src/H5EAdbg.c
+++ b/src/H5EAdbg.c
@@ -174,15 +174,14 @@ END_FUNC(PKG) /* end H5EA__hdr_debug() */
/*-------------------------------------------------------------------------
- * Function: H5EA__iblock_debug
+ * Function: H5EA__iblock_debug
*
- * Purpose: Prints debugging info about a extensible array index block.
+ * Purpose: Prints debugging info about a extensible array index block.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Sep 11 2008
+ * Programmer: Quincey Koziol
+ * Sep 11 2008
*
*-------------------------------------------------------------------------
*/
@@ -214,7 +213,7 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
/* Load the extensible array header */
if(NULL == (hdr = H5EA__hdr_protect(f, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG)))
- H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
+ H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
/* Sanity check */
HDassert(H5F_addr_eq(hdr->idx_blk_addr, addr));
@@ -228,16 +227,16 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
/* Print the values */
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Array class ID:", hdr->cparam.cls->name);
+ "Array class ID:", hdr->cparam.cls->name);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Index Block size:",
- iblock->size);
+ "Index Block size:",
+ iblock->size);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "# of data block addresses in index block:",
- iblock->ndblk_addrs);
+ "# of data block addresses in index block:",
+ iblock->ndblk_addrs);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "# of super block addresses in index block:",
- iblock->nsblk_addrs);
+ "# of super block addresses in index block:",
+ iblock->nsblk_addrs);
/* Check if there are any elements in index block */
if(hdr->cparam.idx_blk_elmts > 0) {
@@ -292,21 +291,20 @@ CATCH
if(iblock && H5EA__iblock_unprotect(iblock, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array index block")
if(hdr && H5EA__hdr_unprotect(hdr, H5AC__NO_FLAGS_SET) < 0)
- H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
+ H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
END_FUNC(PKG) /* end H5EA__iblock_debug() */
/*-------------------------------------------------------------------------
- * Function: H5EA__sblock_debug
+ * Function: H5EA__sblock_debug
*
- * Purpose: Prints debugging info about a extensible array super block.
+ * Purpose: Prints debugging info about a extensible array super block.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Sep 30 2008
+ * Programmer: Quincey Koziol
+ * Sep 30 2008
*
*-------------------------------------------------------------------------
*/
@@ -338,7 +336,7 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
/* Load the extensible array header */
if(NULL == (hdr = H5EA__hdr_protect(f, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG)))
- H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
+ H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
/* Protect super block */
/* (Note: setting parent of super block to 'hdr' for this operation should be OK -QAK) */
@@ -350,16 +348,16 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
/* Print the values */
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Array class ID:", hdr->cparam.cls->name);
+ "Array class ID:", hdr->cparam.cls->name);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Super Block size:",
- sblock->size);
+ "Super Block size:",
+ sblock->size);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "# of data block addresses in super block:",
- sblock->ndblks);
+ "# of data block addresses in super block:",
+ sblock->ndblks);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "# of elements in data blocks from this super block:",
- sblock->dblk_nelmts);
+ "# of elements in data blocks from this super block:",
+ sblock->dblk_nelmts);
/* Check if there are any data block addresses in super block */
if(sblock->ndblks > 0) {
diff --git a/src/H5Eint.c b/src/H5Eint.c
index fe72449..2371a5f 100644
--- a/src/H5Eint.c
+++ b/src/H5Eint.c
@@ -33,7 +33,6 @@
/* Headers */
/***********/
#include "H5private.h" /* Generic Functions */
-#include "H5CXprivate.h" /* API Contexts */
#include "H5Epkg.h" /* Error handling */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
@@ -576,7 +575,7 @@ H5E__walk(const H5E_t *estack, H5E_direction_t direction, const H5E_walk_op_t *o
ret_value = (op->u.func2)((unsigned)(estack->nused - (size_t)(i + 1)), estack->slot + i, client_data);
} /* end else */
- if(ret_value < 0)
+ if(ret_value < 0)
HERROR(H5E_ERROR, H5E_CANTLIST, "can't walk error stack");
} /* end if */
} /* end else */
diff --git a/src/H5F.c b/src/H5F.c
index 3dbd292..9d426ac 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -549,8 +549,8 @@ done:
* Purpose: Returns a pointer to the file handle of the low-level file
* driver.
*
- * Return: SUCCEED/FAIL
- *
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -637,9 +637,7 @@ done:
* the list of file creation and file access properties.
*
* Return: Success: A file ID
- *
* Failure: H5I_INVALID_HID
- *
*-------------------------------------------------------------------------
*/
hid_t
@@ -739,9 +737,7 @@ done:
* See Also: H5Fpublic.h for a list of possible values for FLAGS.
*
* Return: Success: A file ID
- *
* Failure: H5I_INVALID_HID
- *
*-------------------------------------------------------------------------
*/
hid_t
@@ -820,7 +816,8 @@ done:
* not remove them from the cache. The OBJECT_ID can be a file,
* dataset, group, attribute, or named data type.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1008,7 +1005,8 @@ done:
* Purpose: Public API to retrieve the file's 'intent' flags passed
* during H5Fopen()
*
- * Return: Non-negative on success/negative on failure
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1079,9 +1077,7 @@ done:
* Purpose: Retrieves the amount of free space in the file.
*
* Return: Success: Amount of free space for type
- *
* Failure: -1
- *
*-------------------------------------------------------------------------
*/
hssize_t
@@ -1175,9 +1171,7 @@ done:
* this now.
*
* Return: Success: Bytes copied / number of bytes needed
- *
* Failure: -1
- *
*-------------------------------------------------------------------------
*/
ssize_t
@@ -1212,8 +1206,8 @@ done:
* filled in by the caller. This allows us to adapt for
* obsolete versions of the structure.
*
- * Return: SUCCEED/FAIL
- *
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1249,8 +1243,8 @@ done:
* configuration, using the contents of the instance of
* H5AC_cache_config_t pointed to by config_ptr.
*
- * Return: SUCCEED/FAIL
- *
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1283,8 +1277,8 @@ done:
* the hit rate statistics were reset either manually or
* automatically.
*
- * Return: SUCCEED/FAIL
- *
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1320,8 +1314,8 @@ done:
* the ptr parameters are NULL, the associated datum is
* not returned.
*
- * Return: SUCCEED/FAIL
- *
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1360,8 +1354,8 @@ done:
* you are controlling cache size from your program instead
* of using our cache size control code.
*
- * Return: SUCCEED/FAIL
- *
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1402,9 +1396,7 @@ done:
* not the actual name after resolving symlinks, etc.
*
* Return: Success: The length of the file name
- *
* Failure: -1
- *
*-------------------------------------------------------------------------
*/
ssize_t
@@ -1444,8 +1436,8 @@ done:
* in the SOHM table if there is one.
* 3. The amount of free space tracked in the file.
*
- * Return: SUCCEED/FAIL
- *
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1486,8 +1478,8 @@ done:
* Purpose: To retrieve the collection of read retries for metadata
* items with checksum.
*
- * Return: SUCCEED/FAIL
- *
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1525,9 +1517,7 @@ done:
* sections.
*
* Return: Success: The total # of free space sections
- *
* Failure: -1
- *
*-------------------------------------------------------------------------
*/
ssize_t
@@ -1562,8 +1552,8 @@ done:
* provided file, potentially closing any cached files
* unless they are held open from somewhere\ else.
*
- * Return: SUCCEED/FAIL
- *
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1618,8 +1608,8 @@ done:
* set up flush dependency/proxy even for file opened without
* SWMR to resolve issues with opened objects.
*
- * Return: Non-negative on success/negative on failure
- *
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1654,7 +1644,8 @@ done:
* Purpose: Start metadata cache logging operations for a file.
* - Logging must have been set up via the fapl.
*
- * Return: Non-negative on success/Negative on errors
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1686,7 +1677,8 @@ done:
* - Does not close the log file.
* - Logging must have been set up via the fapl.
*
- * Return: Non-negative on success/Negative on errors
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1718,7 +1710,8 @@ done:
* set up via the fapl. is_currently_logging determines if
* log messages are being recorded at this time.
*
- * Return: Non-negative on success/Negative on errors
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1752,7 +1745,8 @@ done:
* H5Fset_latest_format() starting release 1.10.2.
* See explanation for H5Fset_latest_format() in H5Fdeprec.c.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1788,7 +1782,8 @@ done:
* downgrade persistent file space to non-persistent
* for 1.8 library.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1822,7 +1817,8 @@ done:
*
* Purpose: Resets statistics for the page buffer layer.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1852,7 +1848,8 @@ done:
*
* Purpose: Retrieves statistics for the page buffer layer.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1890,7 +1887,8 @@ done:
* image_len: --size of the on disk metadata cache image
* --zero if no cache image
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1918,14 +1916,12 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Fget_eoa
*
- * Purpose: Returns the address of the first byte after the last
+ * Purpose: Gets the address of the first byte after the last
* allocated memory in the file.
* (See H5FDget_eoa() in H5FD.c)
*
- * Return: Success: First byte after allocated memory.
- * Failure: HADDR_UNDEF
- *
- * Non-negative on success/Negative on failure
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1958,7 +1954,8 @@ done:
*
* Purpose: Set the EOA for the file to the maximum of (EOA, EOF) + increment
*
- * Return: Non-negative on success/Negative on errors
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1984,24 +1981,13 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Fget_dset_no_attrs_hint
- *
- * Purpose:
- *
- * Get the file-level setting to create minimized dataset object headers.
- * Result is stored at pointer `minimize`.
- *
- * Return:
+ * Function: H5Fget_dset_no_attrs_hint
*
- * Success: SUCCEED (0) (non-negative value)
- * Failure: FAIL (-1) (negative value)
+ * Purpose: Get the file-level setting to create minimized dataset object headers.
+ * Result is stored at pointer `minimize`.
*
- * Programmer:
- *
- * Jacob Smith
- * 15 August 2018
- *
- * Changes: None.
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -2029,23 +2015,13 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Fset_dset_no_attrs_hint
- *
- * Purpose:
- *
- * Set the file-level setting to create minimized dataset object headers.
+ * Function: H5Fset_dset_no_attrs_hint
*
- * Return:
+ * Purpose: Set the file-level setting to create minimized dataset object
+ * headers.
*
- * Success: SUCCEED (0) (non-negative value)
- * Failure: FAIL (-1) (negative value)
- *
- * Programmer:
- *
- * Jacob Smith
- * 15 August 2018
- *
- * Changes: None.
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5FD.c b/src/H5FD.c
index 2e80c7f..2cd69df 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -1436,7 +1436,7 @@ done:
* constant H5P_DEFAULT). The bytes to be written come from the
* buffer BUF.
*
- * Return: SNon-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
diff --git a/src/H5Gloc.c b/src/H5Gloc.c
index 0243b41..2461c51 100644
--- a/src/H5Gloc.c
+++ b/src/H5Gloc.c
@@ -809,9 +809,9 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_loc_info
+ * Function: H5G_loc_info
*
- * Purpose: Retrieve the data model information for an object from a group location
+ * Purpose: Retrieve the data model information for an object from a group location
* and path to that object
*
* Return: Non-negative on success/Negative on failure
diff --git a/src/H5I.c b/src/H5I.c
index 11209d6..a739c4e 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -33,9 +33,9 @@
#include "H5ACprivate.h" /* Metadata cache */
#include "H5CXprivate.h" /* API Contexts */
#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FLprivate.h" /* Free Lists */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FLprivate.h" /* Free Lists */
#include "H5Gprivate.h" /* Groups */
#include "H5Ipkg.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
@@ -145,7 +145,7 @@ static int H5I__iterate_pub_cb(void *obj, hid_t id, void *udata);
static int H5I__find_id_cb(void *_item, void *_key, void *_udata);
static int H5I__id_dump_cb(void *_item, void *_key, void *_udata);
-
+
/*-------------------------------------------------------------------------
* Function: H5I_term_package
*
@@ -197,7 +197,7 @@ H5I_term_package(void)
FUNC_LEAVE_NOAPI(n)
} /* end H5I_term_package() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iregister_type
*
@@ -278,7 +278,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iregister_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_register_type
*
@@ -339,7 +339,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_register_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Itype_exists
*
@@ -371,7 +371,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Itype_exists() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Inmembers
*
@@ -421,7 +421,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Inmembers() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_nmembers
*
@@ -458,7 +458,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_nmembers() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__unwrap
*
@@ -502,7 +502,7 @@ H5I__unwrap(void *obj_ptr, H5I_type_t type)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__unwrap() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iclear_type
*
@@ -535,7 +535,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iclear_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_clear_type
*
@@ -577,7 +577,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_clear_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__clear_type_cb
*
@@ -643,7 +643,7 @@ H5I__clear_type_cb(void *_id, void H5_ATTR_UNUSED *key, void *_udata)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__clear_type_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Idestroy_type
*
@@ -677,7 +677,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Idestroy_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__destroy_type
*
@@ -729,7 +729,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__destroy_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iregister
*
@@ -757,7 +757,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iregister() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_register
*
@@ -819,7 +819,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_register() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_register_using_existing_id
*
@@ -890,7 +890,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_register_using_existing_id() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_subst
*
@@ -927,7 +927,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_subst() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_object
*
@@ -957,7 +957,7 @@ H5I_object(hid_t id)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_object() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iobject_verify
*
@@ -991,7 +991,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iobject_verify() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_object_verify
*
@@ -1026,7 +1026,7 @@ H5I_object_verify(hid_t id, H5I_type_t id_type)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5I_object_verify() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_get_type
*
@@ -1060,7 +1060,7 @@ H5I_get_type(hid_t id)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_get_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iget_type
*
@@ -1087,13 +1087,13 @@ H5Iget_type(hid_t id)
ret_value = H5I_get_type(id);
if(ret_value <= H5I_BADID || (int)ret_value >= H5I_next_type || NULL == H5I_object(id))
- HGOTO_DONE(H5I_BADID);
+ HGOTO_DONE(H5I_BADID);
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iget_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_is_file_object
*
@@ -1144,7 +1144,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5I_is_file_object() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iremove_verify
*
@@ -1180,7 +1180,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iremove_verify() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__remove_verify
*
@@ -1213,7 +1213,7 @@ H5I__remove_verify(hid_t id, H5I_type_t id_type)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__remove_verify() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__remove_common
*
@@ -1258,7 +1258,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__remove_common() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_remove
*
@@ -1298,7 +1298,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_remove() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Idec_ref
*
@@ -1334,7 +1334,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Idec_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_dec_ref
*
@@ -1404,7 +1404,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_dec_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_dec_app_ref
*
@@ -1452,7 +1452,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_dec_app_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_dec_app_ref_always_close
*
@@ -1494,7 +1494,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_dec_app_ref_always_close() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iinc_ref
*
@@ -1525,7 +1525,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iinc_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_inc_ref
*
@@ -1563,7 +1563,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_inc_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iget_ref
*
@@ -1594,7 +1594,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iget_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_get_ref
*
@@ -1627,7 +1627,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_get_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iinc_type_ref
*
@@ -1660,7 +1660,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iinc_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__inc_type_ref
*
@@ -1694,14 +1694,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__inc_type_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Idec_type_ref
*
* Purpose: Decrements the reference count on an entire type of IDs.
* If the type reference count becomes zero then the type is
* destroyed along with all atoms in that type regardless of
- * their reference counts. Destroying IDs involves calling
+ * their reference counts. Destroying IDs involves calling
* the free-func for each ID's object and then adding the ID
* struct to the ID free list. Public interface to
* H5I_dec_type_ref.
@@ -1736,14 +1736,14 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Idec_type_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_dec_type_ref
*
* Purpose: Decrements the reference count on an entire type of IDs.
* If the type reference count becomes zero then the type is
* destroyed along with all atoms in that type regardless of
- * their reference counts. Destroying IDs involves calling
+ * their reference counts. Destroying IDs involves calling
* the free-func for each ID's object and then adding the ID
* struct to the ID free list.
* Returns the number of references to the type on success; a
@@ -1789,7 +1789,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_dec_type_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iget_type_ref
*
@@ -1822,7 +1822,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iget_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__get_type_ref
*
@@ -1857,7 +1857,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__get_type_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iis_valid
*
@@ -1887,7 +1887,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iis_valid() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__search_cb
*
@@ -1922,7 +1922,7 @@ H5I__search_cb(void *obj, hid_t id, void *_udata)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__search_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Isearch
*
@@ -1973,7 +1973,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Isearch() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__iterate_pub_cb
*
@@ -2013,7 +2013,7 @@ H5I__iterate_pub_cb(void H5_ATTR_UNUSED *obj, hid_t id, void *_udata)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__iterate_pub_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iiterate
*
@@ -2060,7 +2060,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iiterate() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__iterate_cb
*
@@ -2108,7 +2108,7 @@ H5I__iterate_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__iterate_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_iterate
*
@@ -2167,7 +2167,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_iterate() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__find_id
*
@@ -2212,7 +2212,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__find_id() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iget_name
*
@@ -2263,7 +2263,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iget_name() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iget_file_id
*
@@ -2307,7 +2307,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iget_file_id() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__find_id_cb
*
@@ -2345,7 +2345,7 @@ H5I__find_id_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__find_id_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_find_id
*
@@ -2394,7 +2394,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_find_id() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__id_dump_cb
*
@@ -2482,7 +2482,7 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
FUNC_LEAVE_NOAPI(H5_ITER_CONT)
} /* end H5I__id_dump_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_dump_ids_for_type
*
diff --git a/src/H5Ochunk.c b/src/H5Ochunk.c
index 72402e4..cb31cec 100644
--- a/src/H5Ochunk.c
+++ b/src/H5Ochunk.c
@@ -15,7 +15,7 @@
*
* Created: H5Ochunk.c
* Jul 13 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Object header chunk routines.
*
@@ -84,7 +84,6 @@ H5FL_DEFINE(H5O_chunk_proxy_t);
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jul 13 2008
*
*-------------------------------------------------------------------------
@@ -146,14 +145,13 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_chunk_protect
+ * Function: H5O__chunk_protect
*
* Purpose: Protect an object header chunk for modifications
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jul 17 2008
*
*-------------------------------------------------------------------------
@@ -227,7 +225,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jul 17 2008
*
*-------------------------------------------------------------------------
@@ -278,7 +275,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 6 2010
*
*-------------------------------------------------------------------------
@@ -319,7 +315,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jul 13 2008
*
*-------------------------------------------------------------------------
@@ -370,7 +365,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jul 13 2008
*
*-------------------------------------------------------------------------
@@ -415,7 +409,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 13, 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5Ocont.c b/src/H5Ocont.c
index ad54272..68a88e2 100644
--- a/src/H5Ocont.c
+++ b/src/H5Ocont.c
@@ -15,7 +15,7 @@
*
* Created: H5Ocont.c
* Aug 6 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: The object header continuation message. This
* message is only generated and read from within
@@ -83,7 +83,6 @@ H5FL_DEFINE(H5O_cont_t);
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
@@ -127,7 +126,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 7 1997
*
*-------------------------------------------------------------------------
@@ -166,7 +164,6 @@ H5O__cont_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
* Failure: zero
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 6 2005
*
*-------------------------------------------------------------------------
@@ -253,7 +250,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c
index 78e8e19..e2fa4e5 100644
--- a/src/H5Ofsinfo.c
+++ b/src/H5Ofsinfo.c
@@ -110,7 +110,7 @@ H5O_fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
/* Allocate space for message */
if(NULL == (fsinfo = H5FL_CALLOC(H5O_fsinfo_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
for(ptype = H5F_MEM_PAGE_SUPER; ptype < H5F_MEM_PAGE_NTYPES; ptype++)
fsinfo->fs_addr[ptype - 1] = HADDR_UNDEF;
diff --git a/src/H5Olink.c b/src/H5Olink.c
index 1f0c6c7..c27b51f 100644
--- a/src/H5Olink.c
+++ b/src/H5Olink.c
@@ -119,11 +119,12 @@ H5FL_DEFINE_STATIC(H5O_link_t);
static void *
H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
- size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ size_t p_size, const uint8_t *p)
{
H5O_link_t *lnk = NULL; /* Pointer to link message */
size_t len = 0; /* Length of a string in the message */
unsigned char link_flags; /* Flags for encoding link info */
+ const uint8_t *p_end = p + p_size; /* End of the p buffer */
void *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
@@ -199,6 +200,11 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
if(len == 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "invalid name length")
+ /* Make sure that length doesn't exceed buffer size, which could occur
+ when the file is corrupted */
+ if(p + len > p_end)
+ HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "name length causes read past end of buffer")
+
/* Get the link's name */
if(NULL == (lnk->name = (char *)H5MM_malloc(len + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -218,6 +224,12 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
UINT16DECODE(p, len)
if(len == 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "invalid link length")
+
+ /* Make sure that length doesn't exceed buffer size, which could occur
+ when the file is corrupted */
+ if(p + len > p_end)
+ HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "name length causes read past end of buffer")
+
if(NULL == (lnk->u.soft.name = (char *)H5MM_malloc((size_t)len + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
H5MM_memcpy(lnk->u.soft.name, p, len);
@@ -238,6 +250,11 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
lnk->u.ud.size = len;
if(len > 0)
{
+ /* Make sure that length doesn't exceed buffer size, which could
+ occur when the file is corrupted */
+ if(p + len > p_end)
+ HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "name length causes read past end of buffer")
+
if(NULL == (lnk->u.ud.udata = H5MM_malloc((size_t)len)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
H5MM_memcpy(lnk->u.ud.udata, p, len);
diff --git a/src/H5Spoint.c b/src/H5Spoint.c
index be9015f..f53033b 100644
--- a/src/H5Spoint.c
+++ b/src/H5Spoint.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Tuesday, June 16, 1998
*
* Purpose: Point selection dataspace I/O functions.
diff --git a/src/H5TS.c b/src/H5TS.c
index 3643ed5..ee3b219 100644
--- a/src/H5TS.c
+++ b/src/H5TS.c
@@ -678,3 +678,4 @@ H5TS_create_thread(void *(*func)(void *), H5TS_attr_t *attr, void *udata)
} /* H5TS_create_thread */
#endif /* H5_HAVE_THREADSAFE */
+
diff --git a/src/H5Tdbg.c b/src/H5Tdbg.c
index 7af736a..6188138 100644
--- a/src/H5Tdbg.c
+++ b/src/H5Tdbg.c
@@ -13,11 +13,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5Tdbg.c
- * Jul 19 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5Tdbg.c
+ * Jul 19 2007
+ * Quincey Koziol
*
- * Purpose: Dump debugging information about a datatype
+ * Purpose: Dump debugging information about a datatype
*
*-------------------------------------------------------------------------
*/
@@ -72,7 +72,7 @@
/*******************/
-
+
/*-------------------------------------------------------------------------
* Function: H5T__print_stats
*
@@ -137,7 +137,7 @@ H5T__print_stats(H5T_path_t H5_ATTR_UNUSED * path, int H5_ATTR_UNUSED * nprint/*
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5T__print_stats() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_debug
*
diff --git a/src/H5Z.c b/src/H5Z.c
index af5b888..3bd4bcb 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -35,10 +35,10 @@
#ifdef H5Z_DEBUG
typedef struct H5Z_stats_t {
struct {
- hsize_t total; /* total number of bytes processed */
- hsize_t errors; /* bytes of total attributable to errors */
+ hsize_t total; /* total number of bytes processed */
+ hsize_t errors; /* bytes of total attributable to errors */
H5_timevals_t times; /* execution time including errors */
- } stats[2]; /* 0 = output, 1 = input */
+ } stats[2]; /* 0 = output, 1 = input */
} H5Z_stats_t;
#endif /* H5Z_DEBUG */
@@ -132,9 +132,9 @@ H5Z_term_package(void)
if(H5_PKG_INIT_VAR) {
#ifdef H5Z_DEBUG
- char comment[16], bandwidth[32];
- int dir, nprint = 0;
- size_t i;
+ char comment[16], bandwidth[32];
+ int dir, nprint = 0;
+ size_t i;
if(H5DEBUG(Z)) {
for(i = 0; i < H5Z_table_used_g; i++) {
@@ -142,33 +142,34 @@ H5Z_term_package(void)
if(0 == H5Z_stat_table_g[i].stats[dir].total)
continue;
- if(0 == nprint++) {
- /* Print column headers */
- HDfprintf(H5DEBUG(Z), "H5Z: filter statistics "
- "accumulated over life of library:\n");
- HDfprintf(H5DEBUG(Z),
- " %-16s %10s %10s %8s %8s %8s %10s\n",
- "Filter", "Total", "Errors", "User",
- "System", "Elapsed", "Bandwidth");
- HDfprintf(H5DEBUG(Z),
- " %-16s %10s %10s %8s %8s %8s %10s\n",
- "------", "-----", "------", "----",
- "------", "-------", "---------");
- } /* end if */
-
- /* Truncate the comment to fit in the field */
- HDstrncpy(comment, H5Z_table_g[i].name, sizeof comment);
- comment[sizeof(comment) - 1] = '\0';
-
- /*
- * Format bandwidth to have four significant digits and
- * units of `B/s', `kB/s', `MB/s', `GB/s', or `TB/s' or
- * the word `Inf' if the elapsed time is zero.
- */
- H5_bandwidth(bandwidth, (double)(H5Z_stat_table_g[i].stats[dir].total),
+ if(0 == nprint++) {
+ /* Print column headers */
+ HDfprintf(H5DEBUG(Z), "H5Z: filter statistics "
+ "accumulated over life of library:\n");
+ HDfprintf(H5DEBUG(Z),
+ " %-16s %10s %10s %8s %8s %8s %10s\n",
+ "Filter", "Total", "Errors", "User",
+ "System", "Elapsed", "Bandwidth");
+ HDfprintf(H5DEBUG(Z),
+ " %-16s %10s %10s %8s %8s %8s %10s\n",
+ "------", "-----", "------", "----",
+ "------", "-------", "---------");
+ } /* end if */
+
+ /* Truncate the comment to fit in the field */
+ HDstrncpy(comment, H5Z_table_g[i].name, sizeof comment);
+ comment[sizeof(comment) - 1] = '\0';
+
+ /*
+ * Format bandwidth to have four significant digits and
+ * units of `B/s', `kB/s', `MB/s', `GB/s', or `TB/s' or
+ * the word `Inf' if the elapsed time is zero.
+ */
+ H5_bandwidth(bandwidth,
+ (double)(H5Z_stat_table_g[i].stats[dir].total),
H5Z_stat_table_g[i].stats[dir].times.elapsed);
- /* Print the statistics */
+ /* Print the statistics */
HDfprintf(H5DEBUG(Z), " %s%-15s %10Hd %10Hd %8T %8T %8T %10s\n",
(dir ? "<" : ">"), comment,
H5Z_stat_table_g[i].stats[dir].total,
@@ -177,12 +178,12 @@ H5Z_term_package(void)
H5Z_stat_table_g[i].stats[dir].times.system,
H5Z_stat_table_g[i].stats[dir].times.elapsed,
bandwidth);
- } /* end for */
- } /* end for */
- } /* end if */
+ } /* end for */
+ } /* end for */
+ } /* end if */
#endif /* H5Z_DEBUG */
- /* Free the table of filters */
+ /* Free the table of filters */
if(H5Z_table_g) {
H5Z_table_g = (H5Z_class2_t *)H5MM_xfree(H5Z_table_g);
@@ -1256,7 +1257,7 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
int fclass_idx; /* Index of filter class in global table */
H5Z_class2_t *fclass = NULL; /* Filter class pointer */
#ifdef H5Z_DEBUG
- H5Z_stats_t *fstats = NULL; /* Filter stats pointer */
+ H5Z_stats_t *fstats = NULL; /* Filter stats pointer */
H5_timer_t timer; /* Timer for filter operations */
H5_timevals_t times; /* Elapsed time for each operation */
#endif
@@ -1278,12 +1279,12 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
H5_timer_init(&timer);
#endif
if(pline && (flags & H5Z_FLAG_REVERSE)) { /* Read */
- for(i = pline->nused; i > 0; --i) {
- idx = i - 1;
- if(*filter_mask & ((unsigned)1 << idx)) {
- failed |= (unsigned)1 << idx;
- continue; /* filter excluded */
- } /* end if */
+ for(i = pline->nused; i > 0; --i) {
+ idx = i - 1;
+ if(*filter_mask & ((unsigned)1 << idx)) {
+ failed |= (unsigned)1 << idx;
+ continue; /* filter excluded */
+ }
/* If the filter isn't registered and the application doesn't
* indicate no plugin through HDF5_PRELOAD_PLUG (using the symbol "::"),
@@ -1304,7 +1305,7 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
/* Search in the table of registered filters again to find the dynamic filter just loaded and registered */
if((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0)
issue_error = TRUE;
- } /* end if */
+ }
else
issue_error = TRUE;
@@ -1353,24 +1354,25 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
*nbytes = *buf_size;
failed |= (unsigned)1 << idx;
H5E_clear_stack(NULL);
- } /* end if */
+ }
else
*nbytes = new_nbytes;
- } /* end for */
- } else if (pline) { /* Write */
- for(idx = 0; idx < pline->nused; idx++) {
- if(*filter_mask & ((unsigned)1 << idx)) {
- failed |= (unsigned)1 << idx;
- continue; /* filter excluded */
- } /* end if */
- if((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0) {
+ }
+ }
+ else if(pline) { /* Write */
+ for(idx = 0; idx < pline->nused; idx++) {
+ if(*filter_mask & ((unsigned)1 << idx)) {
+ failed |= (unsigned)1 << idx;
+ continue; /* filter excluded */
+ }
+ if((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0) {
/* Check if filter is optional -- If it isn't, then error */
- if((pline->filter[idx].flags & H5Z_FLAG_OPTIONAL) == 0)
- HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "required filter is not registered")
- failed |= (unsigned)1 << idx;
+ if((pline->filter[idx].flags & H5Z_FLAG_OPTIONAL) == 0)
+ HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "required filter is not registered")
+ failed |= (unsigned)1 << idx;
H5E_clear_stack(NULL);
- continue; /* filter excluded */
- } /* end if */
+ continue; /* filter excluded */
+ } /* end if */
fclass = &H5Z_table_g[fclass_idx];
@@ -1390,25 +1392,25 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
fstats->stats[0].times.system += times.system;
fstats->stats[0].times.user += times.user;
- fstats->stats[0].total += MAX(*nbytes, new_nbytes);
+ fstats->stats[0].total += MAX(*nbytes, new_nbytes);
if(0 == new_nbytes)
fstats->stats[0].errors += *nbytes;
#endif
if(0 == new_nbytes) {
if(0 == (pline->filter[idx].flags & H5Z_FLAG_OPTIONAL)) {
- if((cb_struct.func && (H5Z_CB_FAIL==cb_struct.func(pline->filter[idx].id, *buf, *nbytes, cb_struct.op_data)))
+ if((cb_struct.func && (H5Z_CB_FAIL == cb_struct.func(pline->filter[idx].id, *buf, *nbytes, cb_struct.op_data)))
|| !cb_struct.func)
HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "filter returned failure")
*nbytes = *buf_size;
- } /* end if */
+ }
failed |= (unsigned)1 << idx;
H5E_clear_stack(NULL);
- } /* end if */
+ }
else
*nbytes = new_nbytes;
- } /* end for */
+ } /* end for */
}
*filter_mask = failed;
diff --git a/src/H5public.h b/src/H5public.h
index 93cb2ea..d3edd23 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -38,7 +38,7 @@
#include <sys/types.h>
#endif
#ifdef H5_STDC_HEADERS
-# include <limits.h> /*for H5T_NATIVE_CHAR defn in H5Tpublic.h */
+# include <limits.h> /*for H5T_NATIVE_CHAR defn in H5Tpublic.h */
# include <stdarg.h> /*for variadic functions in H5VLpublic.h */
#endif
#ifndef __cplusplus
@@ -183,7 +183,7 @@ typedef long long ssize_t;
*/
#if H5_SIZEOF_LONG_LONG >= 8
H5_GCC_DIAG_OFF(long-long)
-typedef unsigned long long hsize_t;
+typedef unsigned long long hsize_t;
typedef signed long long hssize_t;
H5_GCC_DIAG_ON(long-long)
# define H5_SIZEOF_HSIZE_T H5_SIZEOF_LONG_LONG
@@ -229,7 +229,7 @@ H5_GCC_DIAG_ON(long-long)
#else
# error "nothing appropriate for H5_PRINTF_HADDR_FMT"
#endif
-#define HADDR_MAX (HADDR_UNDEF-1)
+#define HADDR_MAX (HADDR_UNDEF-1)
/* uint32_t type is used for creation order field for messages. It may be
* defined in Posix.1g, otherwise it is defined here.
@@ -297,7 +297,7 @@ typedef enum {
H5_ITER_INC, /* Increasing order */
H5_ITER_DEC, /* Decreasing order */
H5_ITER_NATIVE, /* No particular order, whatever is fastest */
- H5_ITER_N /* Number of iteration orders */
+ H5_ITER_N /* Number of iteration orders */
} H5_iter_order_t;
/* Iteration callback values */
@@ -314,10 +314,10 @@ typedef enum {
* links in groups/attributes on objects.
*/
typedef enum H5_index_t {
- H5_INDEX_UNKNOWN = -1, /* Unknown index type */
- H5_INDEX_NAME, /* Index on names */
- H5_INDEX_CRT_ORDER, /* Index on creation order */
- H5_INDEX_N /* Number of indices defined */
+ H5_INDEX_UNKNOWN = -1, /* Unknown index type */
+ H5_INDEX_NAME, /* Index on names */
+ H5_INDEX_CRT_ORDER, /* Index on creation order */
+ H5_INDEX_N /* Number of indices defined */
} H5_index_t;
/*
diff --git a/src/H5system.c b/src/H5system.c
index b3db39c..24935fd 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -13,11 +13,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5system.c
- * Aug 21 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5system.c
+ * Aug 21 2006
+ * Quincey Koziol
*
- * Purpose: System call wrapper implementations.
+ * Purpose: System call wrapper implementations.
*
*-------------------------------------------------------------------------
*/
diff --git a/src/H5trace.c b/src/H5trace.c
index 91019a4..db33673 100644
--- a/src/H5trace.c
+++ b/src/H5trace.c
@@ -311,7 +311,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'a':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -764,7 +764,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
break;
default:
- HDfprintf (out, "BADTYPE(D%c)", type[1]);
+ HDfprintf(out, "BADTYPE(D%c)", type[1]);
goto error;
} /* end switch */
break;
@@ -1149,7 +1149,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 's':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -1226,7 +1226,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
break;
default:
- HDfprintf (out, "BADTYPE(H%c)", type[1]);
+ HDfprintf(out, "BADTYPE(H%c)", type[1]);
goto error;
} /* end switch */
break;
@@ -1414,7 +1414,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
break;
case H5I_NTYPES:
- HDfprintf (out, "%ld (ntypes - error)", (long)obj);
+ HDfprintf(out, "%ld (ntypes - error)", (long)obj);
break;
default:
@@ -1518,7 +1518,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
else {
int is = HDva_arg(ap, int);
- HDfprintf (out, "%d", is);
+ HDfprintf(out, "%d", is);
asize[argno] = is;
} /* end else */
break;
@@ -1638,7 +1638,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
break;
default:
- HDfprintf (out, "BADTYPE(I%c)", type[1]);
+ HDfprintf(out, "BADTYPE(I%c)", type[1]);
goto error;
} /* end switch */
break;
@@ -1664,7 +1664,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'l':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -1808,7 +1808,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
else {
off_t offset = HDva_arg(ap, off_t);
- HDfprintf (out, "%ld", (long)offset);
+ HDfprintf(out, "%ld", (long)offset);
} /* end else */
break;
@@ -2517,7 +2517,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
break;
default:
- HDfprintf (out, "BADTYPE(T%c)", type[1]);
+ HDfprintf(out, "BADTYPE(T%c)", type[1]);
goto error;
} /* end switch */
break;
@@ -2533,9 +2533,9 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
htri_t tri_var = HDva_arg (ap, htri_t);
if(tri_var>0)
- HDfprintf (out, "TRUE");
+ HDfprintf(out, "TRUE");
else if(!tri_var)
- HDfprintf (out, "FALSE");
+ HDfprintf(out, "FALSE");
else
HDfprintf(out, "FAIL(%d)", (int)tri_var);
} /* end else */
@@ -2592,7 +2592,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
break;
default:
- HDfprintf (out, "BADTYPE(U%c)", type[1]);
+ HDfprintf(out, "BADTYPE(U%c)", type[1]);
goto error;
} /* end switch */
break;
@@ -2602,7 +2602,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'a':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -2638,7 +2638,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'A':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -2656,7 +2656,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'b':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -2686,7 +2686,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'B':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -2716,7 +2716,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'C':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -2733,7 +2733,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'c':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -2769,7 +2769,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'd':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -2796,7 +2796,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'e':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -2820,7 +2820,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'f':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -2844,7 +2844,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'g':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -2886,7 +2886,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'h':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -2925,7 +2925,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'i':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -2949,7 +2949,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'j':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -2973,7 +2973,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'k':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -3000,7 +3000,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'l':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -3027,7 +3027,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'L':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -3051,7 +3051,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'm':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -3078,7 +3078,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'n':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -3108,7 +3108,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'o':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -3144,7 +3144,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'r':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -3171,7 +3171,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 's':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -3194,7 +3194,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'S':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -3251,7 +3251,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 't':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -3299,7 +3299,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'u':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -3317,7 +3317,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'v':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -3422,7 +3422,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'w':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -3448,7 +3448,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'x':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -3466,7 +3466,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'y':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -3502,7 +3502,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'z':
if(ptr) {
if(vp)
- HDfprintf (out, "0x%p", vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
@@ -3712,7 +3712,7 @@ error:
HDfprintf(out, ";\n");
else {
last_call_depth = current_depth++;
- HDfprintf (out, ")");
+ HDfprintf(out, ")");
} /* end else */
HDfflush(out);
diff --git a/test/H5srcdir.h b/test/H5srcdir.h
index b02d432..019cfda 100644
--- a/test/H5srcdir.h
+++ b/test/H5srcdir.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Wednesday, March 17, 2010
*
* Purpose: srcdir querying support.
@@ -20,8 +20,6 @@
#ifndef _H5SRCDIR_H
#define _H5SRCDIR_H
-/* Include the header file with the correct relative path for the srcdir string */
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/test/chunk_info.c b/test/chunk_info.c
index 0afff66..3ed1d56 100644
--- a/test/chunk_info.c
+++ b/test/chunk_info.c
@@ -685,7 +685,7 @@ test_get_chunk_info_highest_v18(hid_t fapl)
/* Verify that the number of chunks is NUM_CHUNKS */
if(H5Dget_num_chunks(dset, dspace, &nchunks) < 0) TEST_ERROR
- VERIFY(nchunks, NUM_CHUNKS, "H5Dget_num_chunks, number of chunks");
+ if(nchunks != NUM_CHUNKS) TEST_ERROR
/* Attempt to get info of a chunk from an empty dataset, verify the
returned address and size in the case of H5D_ALLOC_TIME_EARLY */
@@ -693,11 +693,12 @@ test_get_chunk_info_highest_v18(hid_t fapl)
reinit_vars(&read_flt_msk, &addr, &size);
ret = H5Dget_chunk_info(dset, dspace, chk_index, out_offset, &read_flt_msk, &addr, &size);
if(ret < 0) TEST_ERROR
+
/* Because of H5D_ALLOC_TIME_EARLY, addr cannot be HADDR_UNDEF and size not 0 */
if(addr == HADDR_UNDEF)
- FAIL_PUTS_ERROR(MSG_CHK_ADDR);
+ TEST_ERROR
if(size == EMPTY_CHK_SIZE)
- FAIL_PUTS_ERROR(MSG_CHK_SIZE);
+ TEST_ERROR
chk_index = 10;
reinit_vars(&read_flt_msk, &addr, &size);
@@ -705,9 +706,9 @@ test_get_chunk_info_highest_v18(hid_t fapl)
if(ret < 0) TEST_ERROR
/* Because of H5D_ALLOC_TIME_EARLY, addr cannot be HADDR_UNDEF and size not 0 */
if(addr == HADDR_UNDEF)
- FAIL_PUTS_ERROR(MSG_CHK_ADDR);
+ TEST_ERROR
if(size == EMPTY_CHK_SIZE)
- FAIL_PUTS_ERROR(MSG_CHK_SIZE);
+ TEST_ERROR
/* Attempt to get info of a chunk given its coords from an empty dataset,
verify the returned address and size */
@@ -717,9 +718,9 @@ test_get_chunk_info_highest_v18(hid_t fapl)
TEST_ERROR
/* Because of H5D_ALLOC_TIME_EARLY, addr cannot be HADDR_UNDEF and size not 0 */
if(addr == HADDR_UNDEF)
- FAIL_PUTS_ERROR(MSG_CHK_ADDR);
+ TEST_ERROR
if(size == 0)
- FAIL_PUTS_ERROR(MSG_CHK_SIZE);
+ TEST_ERROR
if(H5Dclose(dset) < 0) TEST_ERROR
@@ -819,7 +820,7 @@ test_chunk_info_single_chunk(const char *filename, hid_t fapl)
/* Get the number of chunks and verify that no chunk has been written */
if(H5Dget_num_chunks(dset, dspace, &nchunks) < 0) TEST_ERROR
- VERIFY(nchunks, NO_CHUNK_WRITTEN, "H5Dget_num_chunks, number of chunks");
+ if(nchunks != NO_CHUNK_WRITTEN) TEST_ERROR
/* Initialize the array of chunk data for the single chunk */
for(ii = 0; ii < NX; ii++)
@@ -832,7 +833,7 @@ test_chunk_info_single_chunk(const char *filename, hid_t fapl)
/* Get and verify that one chunk had been written */
if(H5Dget_num_chunks(dset, dspace, &nchunks) < 0) TEST_ERROR
- VERIFY(nchunks, ONE_CHUNK_WRITTEN, "H5Dget_num_chunks, number of chunks");
+ if(nchunks != ONE_CHUNK_WRITTEN) TEST_ERROR
/* Offset of the only chunk */
offset[0] = 0;
@@ -1937,8 +1938,7 @@ error:
*
* Purpose: Tests functions related to chunk information
*
- * Return: Success: SUCCEED
- * Failure: FAIL
+ * Return: EXIT_SUCCESS/EXIT_FAILURE
*
* Programmer: Binh-Minh Ribler
* November 5, 2018
@@ -1969,19 +1969,19 @@ main(void)
nerrors += test_flt_msk_with_skip_compress(fapl) < 0 ? 1 : 0;
if(nerrors)
- TEST_ERROR
+ goto error;
HDprintf("All chunk query tests passed.\n");
h5_cleanup(FILENAME, fapl);
- return SUCCEED;
+ return EXIT_SUCCESS;
error:
nerrors = MAX(1, nerrors);
HDprintf("***** %d QUERY CHUNK INFO TEST%s FAILED! *****\n",
nerrors, 1 == nerrors ? "" : "S");
- return FAIL;
+ return EXIT_FAILURE;
}
/****************************************************************************
diff --git a/test/dtypes.c b/test/dtypes.c
index 0f95830..6dfc47d 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -134,10 +134,8 @@ typedef enum {
static int num_opaque_conversions_g = 0;
static int opaque_check(int tag_it);
-static herr_t convert_opaque(hid_t st, hid_t dt,
- H5T_cdata_t *cdata,
- size_t nelmts, size_t buf_stride,
- size_t bkg_stride, void *_buf,
+static herr_t convert_opaque(hid_t st, hid_t dt, H5T_cdata_t *cdata,
+ size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf,
void *bkg, hid_t dset_xfer_plid);
static int opaque_long(void);
static int opaque_funcs(void);
@@ -146,16 +144,13 @@ static int opaque_funcs(void);
/*-------------------------------------------------------------------------
* Function: reset_hdf5
*
- * Purpose: Reset the hdf5 library. This causes statistics to be printed
- * and counters to be reset.
+ * Purpose: Reset the hdf5 library. This causes statistics to be printed
+ * and counters to be reset.
*
- * Return: void
+ * Return: void
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, November 16, 1998
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void
@@ -189,14 +184,10 @@ reset_hdf5(void)
* Purpose: Test type classes
*
* Return: Success: 0
- *
* Failure: number of errors
*
* Programmer: Robb Matzke
* Tuesday, December 9, 1997
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -290,20 +281,16 @@ test_classes(void)
* Purpose: Are we able to copy a datatype?
*
* Return: Success: 0
- *
* Failure: number of errors
*
* Programmer: Robb Matzke
* Tuesday, December 9, 1997
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
test_copy(void)
{
- hid_t a_copy;
+ hid_t a_copy;
herr_t status;
TESTING("H5Tcopy()");
@@ -313,12 +300,12 @@ test_copy(void)
/* We should not be able to close a built-in byte */
H5E_BEGIN_TRY {
- status = H5Tclose (H5T_NATIVE_SCHAR);
+ status = H5Tclose (H5T_NATIVE_SCHAR);
} H5E_END_TRY;
if (status>=0) {
- H5_FAILED();
- HDputs (" Should not be able to close a predefined type!");
- goto error;
+ H5_FAILED();
+ HDputs (" Should not be able to close a predefined type!");
+ goto error;
}
PASSED();
@@ -336,7 +323,6 @@ test_copy(void)
* in nested types)
*
* Return: Success: 0
- *
* Failure: number of errors
*
* Programmer: Quincey Koziol
@@ -512,14 +498,10 @@ error:
* Purpose: Tests various things about compound datatypes.
*
* Return: Success: 0
- *
* Failure: number of errors
*
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -673,38 +655,34 @@ error:
/*-------------------------------------------------------------------------
* Function: test_compound_2
*
- * Purpose: Tests a compound type conversion where the source and
- * destination are the same except for the order of the
- * elements.
- *
- * Return: Success: 0
+ * Purpose: Tests a compound type conversion where the source and
+ * destination are the same except for the order of the
+ * elements.
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, June 17, 1999
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
test_compound_2(void)
{
struct st {
- int a, b, c[4], d, e;
+ int a, b, c[4], d, e;
} *s_ptr;
struct dt {
- int e, d, c[4], b, a;
+ int e, d, c[4], b, a;
} *d_ptr;
const size_t nelmts = NTESTELEM;
- const hsize_t four = 4;
- unsigned char *buf=NULL, *orig=NULL, *bkg=NULL;
- hid_t st=-1, dt=-1;
- hid_t array_dt;
- int64_t nmembs;
- int i;
+ const hsize_t four = 4;
+ unsigned char *buf=NULL, *orig=NULL, *bkg=NULL;
+ hid_t st=-1, dt=-1;
+ hid_t array_dt;
+ int64_t nmembs;
+ int i;
TESTING("compound element reordering");
@@ -716,15 +694,15 @@ test_compound_2(void)
bkg = (unsigned char*)HDmalloc(nelmts * sizeof(struct dt));
orig = (unsigned char*)HDmalloc(nelmts * sizeof(struct st));
for (i=0; i<(int)nelmts; i++) {
- s_ptr = ((struct st*)((void *)orig)) + i;
- s_ptr->a = i*8+0;
- s_ptr->b = i*8+1;
- s_ptr->c[0] = i*8+2;
- s_ptr->c[1] = i*8+3;
- s_ptr->c[2] = i*8+4;
- s_ptr->c[3] = i*8+5;
- s_ptr->d = i*8+6;
- s_ptr->e = i*8+7;
+ s_ptr = ((struct st*)((void *)orig)) + i;
+ s_ptr->a = i*8+0;
+ s_ptr->b = i*8+1;
+ s_ptr->c[0] = i*8+2;
+ s_ptr->c[1] = i*8+3;
+ s_ptr->c[2] = i*8+4;
+ s_ptr->c[3] = i*8+5;
+ s_ptr->d = i*8+6;
+ s_ptr->e = i*8+7;
}
HDmemcpy(buf, orig, nelmts*sizeof(struct st));
@@ -754,26 +732,26 @@ test_compound_2(void)
/* Compare results */
for (i=0; i<(int)nelmts; i++) {
- s_ptr = ((struct st*)((void *)orig)) + i;
- d_ptr = ((struct dt*)((void *)buf)) + i;
- if (s_ptr->a != d_ptr->a ||
- s_ptr->b != d_ptr->b ||
- s_ptr->c[0] != d_ptr->c[0] ||
- s_ptr->c[1] != d_ptr->c[1] ||
- s_ptr->c[2] != d_ptr->c[2] ||
- s_ptr->c[3] != d_ptr->c[3] ||
- s_ptr->d != d_ptr->d ||
- s_ptr->e != d_ptr->e) {
- H5_FAILED();
- HDprintf(" i=%d\n", i);
- HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n",
- s_ptr->a, s_ptr->b, s_ptr->c[0], s_ptr->c[1], s_ptr->c[2],
- s_ptr->c[3], s_ptr->d, s_ptr->e);
- HDprintf(" dst={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n",
- d_ptr->a, d_ptr->b, d_ptr->c[0], d_ptr->c[1], d_ptr->c[2],
- d_ptr->c[3], d_ptr->d, d_ptr->e);
- goto error;
- }
+ s_ptr = ((struct st*)((void *)orig)) + i;
+ d_ptr = ((struct dt*)((void *)buf)) + i;
+ if (s_ptr->a != d_ptr->a ||
+ s_ptr->b != d_ptr->b ||
+ s_ptr->c[0] != d_ptr->c[0] ||
+ s_ptr->c[1] != d_ptr->c[1] ||
+ s_ptr->c[2] != d_ptr->c[2] ||
+ s_ptr->c[3] != d_ptr->c[3] ||
+ s_ptr->d != d_ptr->d ||
+ s_ptr->e != d_ptr->e) {
+ H5_FAILED();
+ HDprintf(" i=%d\n", i);
+ HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n",
+ s_ptr->a, s_ptr->b, s_ptr->c[0], s_ptr->c[1], s_ptr->c[2],
+ s_ptr->c[3], s_ptr->d, s_ptr->e);
+ HDprintf(" dst={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n",
+ d_ptr->a, d_ptr->b, d_ptr->c[0], d_ptr->c[1], d_ptr->c[2],
+ d_ptr->c[3], d_ptr->d, d_ptr->e);
+ goto error;
+ }
}
/* Release resources */
@@ -804,29 +782,25 @@ error:
/*-------------------------------------------------------------------------
* Function: test_compound_3
*
- * Purpose: Tests compound conversions where the source and destination
- * are the same except the destination is missing a couple
- * members which appear in the source.
+ * Purpose: Tests compound conversions where the source and destination
+ * are the same except the destination is missing a couple
+ * members which appear in the source.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, June 17, 1999
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
test_compound_3(void)
{
struct st {
- int a, b, c[4], d, e;
+ int a, b, c[4], d, e;
} *s_ptr;
- struct dt {
- int a, c[4], e;
+ struct dt {
+ int a, c[4], e;
} *d_ptr;
const size_t nelmts = NTESTELEM;
@@ -884,24 +858,24 @@ test_compound_3(void)
/* Compare results */
for (i=0; i<(int)nelmts; i++) {
- s_ptr = ((struct st*)((void *)orig)) + i;
- d_ptr = ((struct dt*)((void *)buf)) + i;
- if (s_ptr->a != d_ptr->a ||
- s_ptr->c[0] != d_ptr->c[0] ||
- s_ptr->c[1] != d_ptr->c[1] ||
- s_ptr->c[2] != d_ptr->c[2] ||
- s_ptr->c[3] != d_ptr->c[3] ||
- s_ptr->e != d_ptr->e) {
- H5_FAILED();
- HDprintf(" i=%d\n", i);
- HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n",
- s_ptr->a, s_ptr->b, s_ptr->c[0], s_ptr->c[1], s_ptr->c[2],
- s_ptr->c[3], s_ptr->d, s_ptr->e);
- HDprintf(" dst={a=%d, c=[%d,%d,%d,%d], e=%d\n",
- d_ptr->a, d_ptr->c[0], d_ptr->c[1], d_ptr->c[2],
- d_ptr->c[3], d_ptr->e);
- goto error;
- }
+ s_ptr = ((struct st*)((void *)orig)) + i;
+ d_ptr = ((struct dt*)((void *)buf)) + i;
+ if (s_ptr->a != d_ptr->a ||
+ s_ptr->c[0] != d_ptr->c[0] ||
+ s_ptr->c[1] != d_ptr->c[1] ||
+ s_ptr->c[2] != d_ptr->c[2] ||
+ s_ptr->c[3] != d_ptr->c[3] ||
+ s_ptr->e != d_ptr->e) {
+ H5_FAILED();
+ HDprintf(" i=%d\n", i);
+ HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n",
+ s_ptr->a, s_ptr->b, s_ptr->c[0], s_ptr->c[1], s_ptr->c[2],
+ s_ptr->c[3], s_ptr->d, s_ptr->e);
+ HDprintf(" dst={a=%d, c=[%d,%d,%d,%d], e=%d\n",
+ d_ptr->a, d_ptr->c[0], d_ptr->c[1], d_ptr->c[2],
+ d_ptr->c[3], d_ptr->e);
+ goto error;
+ }
}
/* Release resources */
@@ -931,19 +905,15 @@ error:
/*-------------------------------------------------------------------------
* Function: test_compound_4
*
- * Purpose: Tests compound conversions when the destination has the same
- * fields as the source but one or more of the fields are
- * smaller.
+ * Purpose: Tests compound conversions when the destination has the same
+ * fields as the source but one or more of the fields are
+ * smaller.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, June 17, 1999
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -951,13 +921,13 @@ test_compound_4(void)
{
struct st {
- int a, b, c[4], d, e;
+ int a, b, c[4], d, e;
} *s_ptr;
struct dt {
- short b;
- int a, c[4];
- short d;
- int e;
+ short b;
+ int a, c[4];
+ short d;
+ int e;
} *d_ptr;
const size_t nelmts = NTESTELEM;
@@ -1017,26 +987,26 @@ test_compound_4(void)
/* Compare results */
for (i=0; i<(int)nelmts; i++) {
- s_ptr = ((struct st*)((void *)orig)) + i;
- d_ptr = ((struct dt*)((void *)buf)) + i;
- if (s_ptr->a != d_ptr->a ||
- s_ptr->b != d_ptr->b ||
- s_ptr->c[0] != d_ptr->c[0] ||
- s_ptr->c[1] != d_ptr->c[1] ||
- s_ptr->c[2] != d_ptr->c[2] ||
- s_ptr->c[3] != d_ptr->c[3] ||
- s_ptr->d != d_ptr->d ||
- s_ptr->e != d_ptr->e) {
- H5_FAILED();
- HDprintf(" i=%d\n", i);
- HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n",
- s_ptr->a, s_ptr->b, s_ptr->c[0], s_ptr->c[1], s_ptr->c[2],
- s_ptr->c[3], s_ptr->d, s_ptr->e);
- HDprintf(" dst={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n",
- d_ptr->a, d_ptr->b, d_ptr->c[0], d_ptr->c[1], d_ptr->c[2],
- d_ptr->c[3], d_ptr->d, d_ptr->e);
- goto error;
- }
+ s_ptr = ((struct st*)((void *)orig)) + i;
+ d_ptr = ((struct dt*)((void *)buf)) + i;
+ if (s_ptr->a != d_ptr->a ||
+ s_ptr->b != d_ptr->b ||
+ s_ptr->c[0] != d_ptr->c[0] ||
+ s_ptr->c[1] != d_ptr->c[1] ||
+ s_ptr->c[2] != d_ptr->c[2] ||
+ s_ptr->c[3] != d_ptr->c[3] ||
+ s_ptr->d != d_ptr->d ||
+ s_ptr->e != d_ptr->e) {
+ H5_FAILED();
+ HDprintf(" i=%d\n", i);
+ HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n",
+ s_ptr->a, s_ptr->b, s_ptr->c[0], s_ptr->c[1], s_ptr->c[2],
+ s_ptr->c[3], s_ptr->d, s_ptr->e);
+ HDprintf(" dst={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n",
+ d_ptr->a, d_ptr->b, d_ptr->c[0], d_ptr->c[1], d_ptr->c[2],
+ d_ptr->c[3], d_ptr->d, d_ptr->e);
+ goto error;
+ }
}
/* Release resources */
@@ -1066,20 +1036,16 @@ error:
/*-------------------------------------------------------------------------
* Function: test_compound_5
*
- * Purpose: Many versions of HDF5 have a bug in the optimized compound
+ * Purpose: Many versions of HDF5 have a bug in the optimized compound
* datatype conversion function, H5T_conv_struct_opt(), which
* is triggered when the top-level type contains a struct
* which must undergo a conversion.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, June 17, 1999
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -1156,7 +1122,8 @@ test_compound_5(void)
src[1].coll_ids[2]!=dst[1].coll_ids[2] ||
src[1].coll_ids[3]!=dst[1].coll_ids[3]) {
H5_FAILED();
- } else {
+ }
+ else {
PASSED();
retval = 0;
}
@@ -1171,19 +1138,15 @@ test_compound_5(void)
/*-------------------------------------------------------------------------
* Function: test_compound_6
*
- * Purpose: Tests compound conversions when the destination has the same
- * fields as the source but one or more of the fields are
- * larger.
+ * Purpose: Tests compound conversions when the destination has the same
+ * fields as the source but one or more of the fields are
+ * larger.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, December 13, 2000
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -1244,18 +1207,18 @@ test_compound_6(void)
/* Compare results */
for (i=0; i<(int)nelmts; i++) {
- s_ptr = ((struct st*)((void *)orig)) + i;
- d_ptr = ((struct dt*)((void *)buf)) + i;
- if (s_ptr->b != d_ptr->b ||
- s_ptr->d != d_ptr->d) {
- H5_FAILED();
- HDprintf(" i=%d\n", i);
- HDprintf(" src={b=%d, d=%d\n",
- (int)s_ptr->b, (int)s_ptr->d);
- HDprintf(" dst={b=%ld, d=%ld\n",
- d_ptr->b, d_ptr->d);
- goto error;
- }
+ s_ptr = ((struct st*)((void *)orig)) + i;
+ d_ptr = ((struct dt*)((void *)buf)) + i;
+ if (s_ptr->b != d_ptr->b ||
+ s_ptr->d != d_ptr->d) {
+ H5_FAILED();
+ HDprintf(" i=%d\n", i);
+ HDprintf(" src={b=%d, d=%d\n",
+ (int)s_ptr->b, (int)s_ptr->d);
+ HDprintf(" dst={b=%ld, d=%ld\n",
+ d_ptr->b, d_ptr->d);
+ goto error;
+ }
}
/* Release resources */
@@ -1284,15 +1247,14 @@ error:
/*-------------------------------------------------------------------------
* Function: test_compound_7
*
- * Purpose: Tests inserting fields into compound datatypes when the field
+ * Purpose: Tests inserting fields into compound datatypes when the field
* overlaps the end of the compound datatype. Also, tests
* increasing compound type size.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, December 18, 2001
*
* Modifications:
@@ -1686,9 +1648,6 @@ test_compound_8(void)
*
* Programmer: Raymond Lu
* Wednesday, June 9, 2004
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -4758,17 +4717,13 @@ test_conv_enum_2(void)
/*-------------------------------------------------------------------------
* Function: test_conv_bitfield
*
- * Purpose: Test bitfield conversions.
- *
- * Return: Success: 0
+ * Purpose: Test bitfield conversions.
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, May 20, 1999
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -4790,10 +4745,9 @@ test_conv_bitfield(void)
buf[2] = buf[3] = 0x55; /*irrelevant*/
if (H5Tconvert(st, dt, (size_t)1, buf, NULL, H5P_DEFAULT) < 0) goto error;
if (buf[0]!=0xAA || buf[1]!=0xAA || buf[2]!=0 || buf[3]!=0) {
- H5_FAILED();
- printf(" s=0xaaaa, d=0x%02x%02x%02x%02x (test 1)\n",
- buf[3], buf[2], buf[1], buf[0]);
- goto error;
+ H5_FAILED();
+ HDprintf(" s=0xaaaa, d=0x%02x%02x%02x%02x (test 1)\n", buf[3], buf[2], buf[1], buf[0]);
+ goto error;
}
/*
@@ -4809,10 +4763,9 @@ test_conv_bitfield(void)
buf[0] = 0xA8; buf[1] = 0x2A; buf[2] = buf[3] = 0;
if (H5Tconvert(st, dt, (size_t)1, buf, NULL, H5P_DEFAULT) < 0) goto error;
if (buf[0]!=0 || buf[1]!=0xA8 || buf[2]!=0x2A || buf[3]!=0) {
- H5_FAILED();
- printf(" s=0x2AA8 d=0x%02x%02x%02x%02x (test 2)\n",
- buf[3], buf[2], buf[1], buf[0]);
- goto error;
+ H5_FAILED();
+ HDprintf(" s=0x2AA8 d=0x%02x%02x%02x%02x (test 2)\n", buf[3], buf[2], buf[1], buf[0]);
+ goto error;
}
/*
@@ -4823,10 +4776,9 @@ test_conv_bitfield(void)
buf[0] = 0xA8; buf[1] = 0x2A; buf[2] = buf[3] = 0;
if (H5Tconvert(st, dt, (size_t)1, buf, NULL, H5P_DEFAULT) < 0) goto error;
if (buf[0]!=0xff || buf[1]!=0xAB || buf[2]!=0xEA || buf[3]!=0xff) {
- H5_FAILED();
- printf(" s=0x2AA8 d=0x%02x%02x%02x%02x (test 3)\n",
- buf[3], buf[2], buf[1], buf[0]);
- goto error;
+ H5_FAILED();
+ HDprintf(" s=0x2AA8 d=0x%02x%02x%02x%02x (test 3)\n", buf[3], buf[2], buf[1], buf[0]);
+ goto error;
}
H5Tclose(st);
@@ -4855,18 +4807,14 @@ error:
/*-------------------------------------------------------------------------
* Function: test_bitfield_funcs
*
- * Purpose: Test some datatype functions that are and aren't supposed
+ * Purpose: Test some datatype functions that are and aren't supposed
* work for bitfield type.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Wednesday, April 5, 2006
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -4984,17 +4932,13 @@ error:
/*-------------------------------------------------------------------------
* Function: convert_opaque
*
- * Purpose: A fake opaque conversion functions
- *
- * Return: Success: 0
+ * Purpose: A fake opaque conversion functions
*
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, June 4, 1999
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -5003,7 +4947,8 @@ convert_opaque(hid_t H5_ATTR_UNUSED st, hid_t H5_ATTR_UNUSED dt, H5T_cdata_t *cd
size_t H5_ATTR_UNUSED bkg_stride, void H5_ATTR_UNUSED *_buf,
void H5_ATTR_UNUSED *bkg, hid_t H5_ATTR_UNUSED dset_xfer_plid)
{
- if (H5T_CONV_CONV==cdata->command) num_opaque_conversions_g++;
+ if (H5T_CONV_CONV==cdata->command)
+ num_opaque_conversions_g++;
return 0;
}
@@ -5011,17 +4956,13 @@ convert_opaque(hid_t H5_ATTR_UNUSED st, hid_t H5_ATTR_UNUSED dt, H5T_cdata_t *cd
/*-------------------------------------------------------------------------
* Function: test_opaque
*
- * Purpose: Driver function to test opaque datatypes
- *
- * Return: Success: 0
+ * Purpose: Driver function to test opaque datatypes
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* June 2, 2004
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -5054,25 +4995,23 @@ test_opaque(void)
/*-------------------------------------------------------------------------
* Function: opaque_check
*
- * Purpose: Test opaque datatypes
- *
- * Return: Success: 0
+ * Purpose: Test opaque datatypes
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, May 20, 1999
- *
*-------------------------------------------------------------------------
*/
static int
opaque_check(int tag_it)
{
#define OPAQUE_NELMTS 1000
- hid_t st=-1, dt=-1;
+ hid_t st=-1, dt=-1;
herr_t status;
- char buf[1]; /*not really used*/
- int saved;
+ char buf[1]; /*not really used*/
+ int saved;
saved = num_opaque_conversions_g = 0;
@@ -5088,29 +5027,29 @@ opaque_check(int tag_it)
/* Make sure that we can't convert between the types yet */
H5E_BEGIN_TRY {
- status = H5Tconvert(st, dt, (size_t)OPAQUE_NELMTS, buf, NULL, H5P_DEFAULT);
+ status = H5Tconvert(st, dt, (size_t)OPAQUE_NELMTS, buf, NULL, H5P_DEFAULT);
} H5E_END_TRY;
if (status>=0) {
- H5_FAILED();
- printf(" opaque conversion should have failed but succeeded\n");
- goto error;
+ H5_FAILED();
+ HDprintf(" opaque conversion should have failed but succeeded\n");
+ goto error;
}
/* Register a conversion function */
if (H5Tregister(H5T_PERS_HARD, "o_test", st, dt, convert_opaque) < 0)
- goto error;
+ goto error;
/* Try the conversion again, this time it should work */
if (H5Tconvert(st, dt, (size_t)OPAQUE_NELMTS, buf, NULL, H5P_DEFAULT) < 0) goto error;
if (saved+1 != num_opaque_conversions_g) {
- H5_FAILED();
- printf(" unexpected number of opaque conversions\n");
- goto error;
+ H5_FAILED();
+ HDprintf(" unexpected number of opaque conversions\n");
+ goto error;
}
/* Unregister conversion function */
if (H5Tunregister(H5T_PERS_HARD, "o_test", st, dt, convert_opaque) < 0)
- goto error;
+ goto error;
H5Tclose(st);
H5Tclose(dt);
@@ -5127,12 +5066,12 @@ opaque_check(int tag_it)
/*-------------------------------------------------------------------------
* Function: opaque_long
*
- * Purpose: Test named (committed) opaque datatypes w/very long tags
+ * Purpose: Test named (committed) opaque datatypes w/very long tags
*
- * Return: Success: 0
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 14, 2005
*
*-------------------------------------------------------------------------
@@ -5142,7 +5081,7 @@ opaque_long(void)
{
char *long_tag = NULL;
hid_t dt = -1;
- herr_t ret;
+ herr_t ret;
/* Build opaque type */
if((dt=H5Tcreate(H5T_OPAQUE, (size_t)4)) < 0) TEST_ERROR
@@ -5154,7 +5093,7 @@ opaque_long(void)
/* Set opaque type's tag */
H5E_BEGIN_TRY {
- ret = H5Tset_tag(dt, long_tag);
+ ret = H5Tset_tag(dt, long_tag);
} H5E_END_TRY;
if(ret != FAIL) TEST_ERROR
@@ -5179,24 +5118,20 @@ error:
/*-------------------------------------------------------------------------
* Function: opaque_funcs
*
- * Purpose: Test some type functions that are and aren't supposed to
+ * Purpose: Test some type functions that are and aren't supposed to
* work with opaque type.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Wednesday, April 5, 2006
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
opaque_funcs(void)
{
- hid_t type = -1, super=-1;
+ hid_t type = -1, super=-1;
size_t size;
H5T_pad_t inpad;
H5T_cset_t cset;
@@ -5803,7 +5738,7 @@ test_encode(void)
}
H5E_BEGIN_TRY {
- ret = H5Tclose(decoded_tid3);
+ ret = H5Tclose(decoded_tid3);
} H5E_END_TRY;
if(ret!=FAIL) {
H5_FAILED();
@@ -6102,14 +6037,13 @@ static int
test_int_float_except(void)
{
#if H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4
- float buf[CONVERT_SIZE] = {(float)INT_MIN - 172.0f, (float)INT_MAX - 32.0f,
- (float)INT_MAX - 68.0f, (float)4.5f};
- int buf_int[CONVERT_SIZE] = {INT_MIN, INT_MAX, INT_MAX-127, 4};
+ float buf[CONVERT_SIZE] = {(float)INT_MIN - 172.0f, (float)INT_MAX - 32.0f, (float)INT_MAX - 68.0f, (float)4.5f};
+ int buf_int[CONVERT_SIZE] = {INT_MIN, INT_MAX, INT_MAX-127, 4};
float buf_float[CONVERT_SIZE] = {(float)INT_MIN, (float)INT_MAX + 1.0f, (float)INT_MAX - 127.0f, 4};
- int *intp; /* Pointer to buffer, as integers */
- int buf2[CONVERT_SIZE] = {INT_MIN, INT_MAX, INT_MAX - 72, 0};
+ int *intp; /* Pointer to buffer, as integers */
+ int buf2[CONVERT_SIZE] = {INT_MIN, INT_MAX, INT_MAX - 72, 0};
float buf2_float[CONVERT_SIZE] = {(float)INT_MIN, (float)INT_MAX, (float)INT_MAX - 127.0f, (float)0.0f};
- int buf2_int[CONVERT_SIZE] = {INT_MIN, INT_MAX, INT_MAX - 127, 0};
+ int buf2_int[CONVERT_SIZE] = {INT_MIN, INT_MAX, INT_MAX - 127, 0};
float *floatp; /* Pointer to buffer #2, as floats */
hid_t dxpl; /* Dataset transfer property list */
except_info_t e; /* Exception information */
@@ -6165,8 +6099,8 @@ test_int_float_except(void)
/* Convert second buffer */
HDmemset(&e, 0, sizeof(except_info_t));
- if(H5Tconvert(H5T_NATIVE_INT, H5T_NATIVE_FLOAT, (size_t)CONVERT_SIZE,
- buf2, NULL, dxpl) < 0) TEST_ERROR
+ if(H5Tconvert(H5T_NATIVE_INT, H5T_NATIVE_FLOAT, (size_t)CONVERT_SIZE, buf2, NULL, dxpl) < 0)
+ TEST_ERROR
/* Check the buffer after conversion, as floats */
for(u = 0; u < CONVERT_SIZE; u++) {
@@ -6183,8 +6117,8 @@ test_int_float_except(void)
/* Convert buffer */
HDmemset(&e, 0, sizeof(except_info_t));
- if(H5Tconvert(H5T_NATIVE_FLOAT, H5T_NATIVE_INT, (size_t)CONVERT_SIZE,
- buf2, NULL, dxpl) < 0) TEST_ERROR
+ if(H5Tconvert(H5T_NATIVE_FLOAT, H5T_NATIVE_INT, (size_t)CONVERT_SIZE, buf2, NULL, dxpl) < 0)
+ TEST_ERROR
/* Check the buffer after conversion, as integers */
for(u = 0; u < CONVERT_SIZE; u++) {
@@ -6415,7 +6349,7 @@ test_set_order_compound(hid_t fapl)
hid_t cmpd = -1, memb_cmpd = -1, memb_array1 = -1, memb_array2 = -1, cmpd_array = -1;
hid_t vl_id = -1;
hsize_t dims[2] = {3, 4}; /* Array dimenstions */
- char filename[1024];
+ char filename[1024];
herr_t ret; /* Generic return value */
TESTING("H5Tset/get_order for compound type");
@@ -6521,18 +6455,14 @@ error:
/*-------------------------------------------------------------------------
* Function: test_named_indirect_reopen
*
- * Purpose: Tests that open named datatypes can be reopened indirectly
+ * Purpose: Tests that open named datatypes can be reopened indirectly
* through H5Dget_type without causing problems.
*
- * Return: Success: 0
- *
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Neil Fortner
+ * Programmer: Neil Fortner
* Thursday, June 4, 2009
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -6540,11 +6470,11 @@ test_named_indirect_reopen(hid_t fapl)
{
hid_t file=-1, type=-1, reopened_type=-1, strtype=-1, dset=-1, space=-1;
static hsize_t dims[1] = {3};
- size_t dt_size;
- int enum_value;
- const char *tag = "opaque_tag";
- char *tag_ret = NULL;
- char filename[1024];
+ size_t dt_size;
+ int enum_value;
+ const char *tag = "opaque_tag";
+ char *tag_ret = NULL;
+ char filename[1024];
TESTING("indirectly reopening committed datatypes");
@@ -6708,11 +6638,11 @@ test_named_indirect_reopen(hid_t fapl)
error:
H5E_BEGIN_TRY {
- H5Tclose(type);
- H5Tclose(strtype);
- H5Tclose(reopened_type);
- H5Sclose(space);
- H5Dclose(dset);
+ H5Tclose(type);
+ H5Tclose(strtype);
+ H5Tclose(reopened_type);
+ H5Sclose(space);
+ H5Dclose(dset);
H5Fclose(file);
} H5E_END_TRY;
if(tag_ret)
@@ -6912,12 +6842,12 @@ test_delete_obj_named(hid_t fapl)
error:
H5E_BEGIN_TRY {
- H5Tclose(attr);
- H5Dclose(dset);
- H5Pclose(fapl2);
- H5Fclose(filea1);
- H5Fclose(filea2);
- H5Fclose(fileb);
+ H5Tclose(attr);
+ H5Dclose(dset);
+ H5Pclose(fapl2);
+ H5Fclose(filea1);
+ H5Fclose(filea2);
+ H5Fclose(fileb);
} H5E_END_TRY;
return 1;
} /* end test_delete_obj_named() */
@@ -7075,15 +7005,15 @@ test_delete_obj_named_fileid(hid_t fapl)
error:
H5E_BEGIN_TRY {
- H5Aclose(attr);
- H5Tclose(type);
- H5Dclose(dset);
- H5Pclose(fapl2);
- H5Fclose(filea1);
- H5Fclose(filea2);
- H5Fclose(fileb);
- H5Fclose(attr_fid);
- H5Fclose(type_fid);
+ H5Aclose(attr);
+ H5Tclose(type);
+ H5Dclose(dset);
+ H5Pclose(fapl2);
+ H5Fclose(filea1);
+ H5Fclose(filea2);
+ H5Fclose(fileb);
+ H5Fclose(attr_fid);
+ H5Fclose(type_fid);
} H5E_END_TRY;
return 1;
} /* end test_delete_obj_named_fileid() */
@@ -7092,12 +7022,12 @@ error:
/*-------------------------------------------------------------------------
* Function: test_deprec
*
- * Purpose: Tests deprecated API routines for datatypes.
+ * Purpose: Tests deprecated API routines for datatypes.
*
- * Return: Success: 0
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, September 27, 2007
*
*-------------------------------------------------------------------------
@@ -7167,31 +7097,31 @@ test_deprec(hid_t fapl)
/* Predefined types cannot be committed */
H5E_BEGIN_TRY {
- status = H5Tcommit1(file, "test_named_1 (should not exist)", H5T_NATIVE_INT);
+ status = H5Tcommit1(file, "test_named_1 (should not exist)", H5T_NATIVE_INT);
} H5E_END_TRY;
if(status >= 0)
- FAIL_PUTS_ERROR(" Predefined types should not be committable!")
+ FAIL_PUTS_ERROR(" Predefined types should not be committable!")
/* Copy a predefined datatype and commit the copy */
if((type = H5Tcopy(H5T_NATIVE_INT)) < 0) FAIL_STACK_ERROR
if(H5Tcommit1(file, "native-int", type) < 0) FAIL_STACK_ERROR
if((status = H5Tcommitted(type)) < 0) FAIL_STACK_ERROR
if(0 == status)
- FAIL_PUTS_ERROR(" H5Tcommitted() returned false!")
+ FAIL_PUTS_ERROR(" H5Tcommitted() returned false!")
/* We should not be able to modify a type after it has been committed. */
H5E_BEGIN_TRY {
- status = H5Tset_precision(type, (size_t)256);
+ status = H5Tset_precision(type, (size_t)256);
} H5E_END_TRY;
if(status >= 0)
- FAIL_PUTS_ERROR(" Committed type is not constant!")
+ FAIL_PUTS_ERROR(" Committed type is not constant!")
/* We should not be able to re-commit a committed type */
H5E_BEGIN_TRY {
- status = H5Tcommit1(file, "test_named_2 (should not exist)", type);
+ status = H5Tcommit1(file, "test_named_2 (should not exist)", type);
} H5E_END_TRY;
if(status >= 0)
- FAIL_PUTS_ERROR(" Committed types should not be recommitted!")
+ FAIL_PUTS_ERROR(" Committed types should not be recommitted!")
/*
* Close the committed type and reopen it. It should return a named type.
@@ -7200,7 +7130,7 @@ test_deprec(hid_t fapl)
if((type = H5Topen1(file, "native-int")) < 0) FAIL_STACK_ERROR
if((status = H5Tcommitted(type)) < 0) FAIL_STACK_ERROR
if(!status)
- FAIL_PUTS_ERROR(" Opened named types should be named types!")
+ FAIL_PUTS_ERROR(" Opened named types should be named types!")
/* Close */
if(H5Tclose(type) < 0) FAIL_STACK_ERROR
@@ -7230,8 +7160,8 @@ test_deprec(hid_t fapl)
error:
H5E_BEGIN_TRY {
- H5Tclose(type);
- H5Fclose(file);
+ H5Tclose(type);
+ H5Fclose(file);
} H5E_END_TRY;
return 1;
} /* end test_deprec() */
@@ -7241,13 +7171,13 @@ error:
/*-------------------------------------------------------------------------
* Function: test_utf_ascii_conv
*
- * Purpose: Make sure the library doesn't conversion strings between
+ * Purpose: Make sure the library doesn't conversion strings between
* ASCII and UTF8.
*
- * Return: Success: 0
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: number of errors
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* 10 November 2011
*-------------------------------------------------------------------------
*/
@@ -7437,13 +7367,13 @@ test_utf_ascii_conv(void)
error:
H5E_BEGIN_TRY {
- H5Tclose(utf8_vtid);
- H5Tclose(ascii_vtid);
- H5Tclose(utf8_tid);
- H5Tclose(ascii_tid);
- H5Dclose(did);
- H5Sclose(sid);
- H5Fclose(fid);
+ H5Tclose(utf8_vtid);
+ H5Tclose(ascii_vtid);
+ H5Tclose(utf8_tid);
+ H5Tclose(ascii_tid);
+ H5Dclose(did);
+ H5Sclose(sid);
+ H5Fclose(fid);
} H5E_END_TRY;
return 1;
}
@@ -7827,16 +7757,13 @@ error:
*
* Programmer: Robb Matzke
* Tuesday, December 9, 1997
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
main(void)
{
long nerrors = 0;
- hid_t fapl = -1;
+ hid_t fapl = H5I_INVALID_HID;
/* Set the random # seed */
HDsrandom((unsigned)HDtime(NULL));
@@ -7845,7 +7772,7 @@ main(void)
fapl = h5_fileaccess();
if(ALIGNMENT)
- printf("Testing non-aligned conversions (ALIGNMENT=%d)....\n", ALIGNMENT);
+ HDprintf("Testing non-aligned conversions (ALIGNMENT=%d)....\n", ALIGNMENT);
/* Do the tests */
nerrors += test_classes();
@@ -7900,8 +7827,7 @@ main(void)
nerrors += test_versionbounds();
if(nerrors) {
- HDprintf("***** %lu FAILURE%s! *****\n",
- nerrors, 1==nerrors?"":"S");
+ HDprintf("***** %lu FAILURE%s! *****\n", nerrors, 1==nerrors?"":"S");
HDexit(EXIT_FAILURE);
}
diff --git a/test/gen_bogus.c b/test/gen_bogus.c
index 1ab18a4..ab2620f 100644
--- a/test/gen_bogus.c
+++ b/test/gen_bogus.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Apr 17, 2007
*
* Purpose: This program is run to generate an HDF5 data file with several
diff --git a/test/gen_new_super.c b/test/gen_new_super.c
index ed43a39..d371f5f 100644
--- a/test/gen_new_super.c
+++ b/test/gen_new_super.c
@@ -23,26 +23,22 @@
* put into the 'test' directory in the 1.4+ branch of the library.
*/
-#include <assert.h>
-#include "testhdf5.h"
+#include "h5test.h"
#define TESTFILE "tsupern.h5"
#define ISTORE_IK 64
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
- * Purpose: Create a file with a new version (>0) of the superblock
+ * Purpose: Create a file with a new version (>0) of the superblock
*
- * Return: Success:
- * Failure:
+ * Return: EXIT_SUCCESS
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, July 15, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
@@ -54,27 +50,27 @@ main(void)
/* Create a file creation property list */
fcpl = H5Pcreate(H5P_FILE_CREATE);
- assert(fcpl>=0);
+ HDassert(fcpl >= 0);
- ret=H5Pset_istore_k(fcpl,ISTORE_IK);
- assert(ret>=0);
+ ret = H5Pset_istore_k(fcpl,ISTORE_IK);
+ HDassert(ret >= 0);
/* Creating a file with the non-default file creation property list should
* create a version 1 superblock
*/
/* Create file with custom file creation property list */
- file= H5Fcreate(TESTFILE, H5F_ACC_TRUNC , fcpl, H5P_DEFAULT);
- assert(file>=0);
+ file = H5Fcreate(TESTFILE, H5F_ACC_TRUNC , fcpl, H5P_DEFAULT);
+ HDassert(file >= 0);
/* Close FCPL */
- ret=H5Pclose(fcpl);
- assert(ret>=0);
+ ret = H5Pclose(fcpl);
+ HDassert(ret >= 0);
/* Close file */
- ret=H5Fclose(file);
- assert(ret>=0);
+ ret = H5Fclose(file);
+ HDassert(ret >= 0);
- return 0;
+ return EXIT_SUCCESS;
}
diff --git a/test/gen_nullspace.c b/test/gen_nullspace.c
index e4e75ac..26df3f1 100644
--- a/test/gen_nullspace.c
+++ b/test/gen_nullspace.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Saturday, April 17, 2004
*
* Purpose: Create a dataset with a null dataspace and an attribute
@@ -24,8 +24,7 @@
* put into the 'test' directory in the 1.6.x branch of the library.
*/
-#include <assert.h>
-#include "testhdf5.h"
+#include "h5test.h"
#define NULLFILE "tnullspace.h5"
#define NULLDATASET "null_dataset"
@@ -43,44 +42,44 @@ main(void)
/* Create the file */
fid = H5Fcreate(NULLFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- assert(fid>0);
+ HDassert(fid > 0);
sid = H5Screate(H5S_NULL);
- assert(sid>0);
+ HDassert(sid > 0);
/* Create dataset */
did = H5Dcreate2(fid, NULLDATASET, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- assert(did>0);
+ HDassert(did > 0);
/* Close the dataset */
ret = H5Dclose(did);
- assert(ret>=0);
+ HDassert(ret >= 0);
/* Open the root group */
gid = H5Gopen2(fid, "/", H5P_DEFAULT);
- assert(gid > 0);
+ HDassert(gid > 0);
/* Create an attribute for the group */
attr = H5Acreate2(gid, NULLATTR, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
- assert(attr > 0);
+ HDassert(attr > 0);
/* Close attribute */
ret = H5Aclose(attr);
- assert(ret>=0);
+ HDassert(ret >= 0);
/* Close the group */
ret = H5Gclose(gid);
- assert(ret>=0);
+ HDassert(ret >= 0);
/* Close the dataspace */
ret = H5Sclose(sid);
- assert(ret>=0);
+ HDassert(ret >= 0);
/* Close the file */
ret = H5Fclose(fid);
- assert(ret>=0);
+ HDassert(ret >= 0);
- return 0;
+ return EXIT_SUCCESS;
}
diff --git a/test/gen_specmetaread.c b/test/gen_specmetaread.c
index fd484d1..f2625a7 100644
--- a/test/gen_specmetaread.c
+++ b/test/gen_specmetaread.c
@@ -23,9 +23,8 @@
* the library on the trunk as of when this file is checked in.
*/
-#include <assert.h>
-#include "testhdf5.h"
+#include "h5test.h"
#define FILENAME "specmetaread.h5"
#define DIM 10
diff --git a/test/h5test.c b/test/h5test.c
index 1b445dd..28513b9 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -2097,8 +2097,14 @@ h5_compare_file_bytes(char *f1name, char *f2name)
HDrewind(f1ptr);
HDrewind(f2ptr);
for (ii = 0; ii < f1size; ii++) {
- HDfread(&f1char, 1, 1, f1ptr);
- HDfread(&f2char, 1, 1, f2ptr);
+ if(HDfread(&f1char, 1, 1, f1ptr) != 1) {
+ ret_value = -1;
+ goto done;
+ }
+ if(HDfread(&f2char, 1, 1, f2ptr) != 1) {
+ ret_value = -1;
+ goto done;
+ }
if (f1char != f2char) {
HDfprintf(stderr, "Mismatch @ 0x%llX: 0x%X != 0x%X\n", ii, f1char, f2char);
ret_value = -1;
@@ -2107,13 +2113,11 @@ h5_compare_file_bytes(char *f1name, char *f2name)
}
done:
- if (f1ptr) {
+ if (f1ptr)
HDfclose(f1ptr);
- }
- if (f2ptr) {
+ if (f2ptr)
HDfclose(f2ptr);
- }
- return(ret_value);
+ return ret_value;
} /* end h5_compare_file_bytes() */
/*-------------------------------------------------------------------------
@@ -2220,7 +2224,10 @@ h5_duplicate_file_by_bytes(const char *orig, const char *dest)
}
while (read_size > 0) {
- HDfread(dup_buf, read_size, 1, orig_ptr); /* warning: no error-check */
+ if(HDfread(dup_buf, read_size, 1, orig_ptr) != 1) {
+ ret_value = -1;
+ goto done;
+ }
HDfwrite(dup_buf, read_size, 1, dest_ptr);
fsize -= read_size;
read_size = MIN(fsize, max_buf);
diff --git a/test/links.c b/test/links.c
index 60d3152..cd9f05c 100644
--- a/test/links.c
+++ b/test/links.c
@@ -9037,15 +9037,15 @@ error:
static int
external_link_query(hid_t fapl, hbool_t new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group IDs */
- const char *file_name; /* Name of the file the external link points to */
- const char *object_name; /* Name of the object the external link points to */
- H5O_info2_t oi; /* Object information */
- H5L_info2_t li; /* Link information */
- char filename1[NAME_BUF_SIZE],
- filename2[NAME_BUF_SIZE], /* Names of files to externally link across */
- query_buf[NAME_BUF_SIZE]; /* Buffer to hold query result */
+ hid_t fid = -1; /* File ID */
+ hid_t gid = -1; /* Group IDs */
+ const char *file_name; /* Name of the file the external link points to */
+ const char *object_name; /* Name of the object the external link points to */
+ H5O_info2_t oi; /* Object information */
+ H5L_info2_t li; /* Link information */
+ char filename1[NAME_BUF_SIZE],
+ filename2[NAME_BUF_SIZE], /* Names of files to externally link across */
+ query_buf[NAME_BUF_SIZE]; /* Buffer to hold query result */
if(new_format)
TESTING("query aspects of external link (w/new group format)")
@@ -18286,7 +18286,6 @@ main(void)
nerrors += test_deprec(my_fapl, new_format);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
/* tests for external link */
/* Test external file cache first, so it sees the default efc setting on the fapl
*/
diff --git a/test/th5o.c b/test/th5o.c
index ab4a8de..4bc2096 100644
--- a/test/th5o.c
+++ b/test/th5o.c
@@ -243,17 +243,17 @@ test_h5o_close(void)
static void
test_h5o_open_by_addr(void)
{
- hid_t fid; /* HDF5 File ID */
- hid_t grp, dset, dtype, dspace; /* Object identifiers */
- H5L_info2_t li; /* Buffer for H5Lget_info */
- haddr_t grp_addr; /* Addresses for objects */
- haddr_t dset_addr;
- haddr_t dtype_addr;
- hsize_t dims[RANK];
- H5I_type_t id_type; /* Type of IDs returned from H5Oopen */
- H5G_info_t ginfo; /* Group info struct */
- H5T_class_t type_class; /* Class of the datatype */
- herr_t ret; /* Value returned from API calls */
+ hid_t fid; /* HDF5 File ID */
+ hid_t grp, dset, dtype, dspace; /* Object identifiers */
+ H5L_info2_t li; /* Buffer for H5Lget_info2 */
+ haddr_t grp_addr; /* Addresses for objects */
+ haddr_t dset_addr;
+ haddr_t dtype_addr;
+ hsize_t dims[RANK];
+ H5I_type_t id_type; /* Type of IDs returned from H5Oopen */
+ H5G_info_t ginfo; /* Group info struct */
+ H5T_class_t type_class; /* Class of the datatype */
+ herr_t ret; /* Value returned from API calls */
/* Create a new HDF5 file */
fid = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
diff --git a/test/trefer.c b/test/trefer.c
index f9a6863..b90ec45 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -97,12 +97,12 @@ test_reference_params(void)
hid_t aapl_id; /* Attribute access property list */
hid_t dapl_id; /* Dataset access property list */
hsize_t dims1[] = {SPACE1_DIM1};
- H5R_ref_t *wbuf, /* buffer to write to disk */
+ H5R_ref_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf; /* temp. buffer read from disk */
unsigned *obuf;
H5R_type_t type; /* Reference type */
- unsigned int i; /* Counters */
+ unsigned int i; /* Counters */
const char *write_comment = "Foo!"; /* Comments for group */
hid_t ret_id; /* Generic hid_t return value */
ssize_t name_size; /* Size of reference name */
@@ -330,10 +330,10 @@ test_reference_obj(void)
hid_t tid1; /* Datatype ID */
hsize_t dims1[] = {SPACE1_DIM1};
hid_t dapl_id; /* Dataset access property list */
- H5R_ref_t *wbuf, /* buffer to write to disk */
+ H5R_ref_t *wbuf, /* buffer to write to disk */
*rbuf; /* buffer read from disk */
unsigned *ibuf, *obuf;
- unsigned i, j; /* Counters */
+ unsigned i, j; /* Counters */
H5O_type_t obj_type; /* Object type */
herr_t ret; /* Generic return value */
diff --git a/test/vds_swmr.h b/test/vds_swmr.h
index edb01bc..0a194ff 100644
--- a/test/vds_swmr.h
+++ b/test/vds_swmr.h
@@ -95,7 +95,5 @@ H5TEST_DLLVAR char VDS_FILE_NAME[NAME_LEN];
/* Dataset names */
H5TEST_DLLVAR char SOURCE_DSET_PATH[NAME_LEN];
H5TEST_DLLVAR char VDS_DSET_NAME[NAME_LEN];
-
-/* Fill values */
#endif /* VDS_SWMR_H */
diff --git a/test/vfd.c b/test/vfd.c
index 038c967..09ef106 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -2258,46 +2258,51 @@ static int
compare_splitter_config_info(hid_t fapl_id, H5FD_splitter_vfd_config_t *info)
{
int ret_value = 0;
- H5FD_splitter_vfd_config_t fetched_info;
+ H5FD_splitter_vfd_config_t *fetched_info = NULL;
- fetched_info.magic = H5FD_SPLITTER_MAGIC;
- fetched_info.version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
- fetched_info.rw_fapl_id = H5I_INVALID_HID;
- fetched_info.wo_fapl_id = H5I_INVALID_HID;
+ if (NULL == (fetched_info = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t))))
+ SPLITTER_TEST_FAULT("memory allocation for fetched_info struct failed");
- if (H5Pget_fapl_splitter(fapl_id, &fetched_info) < 0) {
- SPLITTER_TEST_FAULT("can't get splitter info\n");
+ fetched_info->magic = H5FD_SPLITTER_MAGIC;
+ fetched_info->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
+ fetched_info->rw_fapl_id = H5I_INVALID_HID;
+ fetched_info->wo_fapl_id = H5I_INVALID_HID;
+
+ if (H5Pget_fapl_splitter(fapl_id, fetched_info) < 0) {
+ SPLITTER_TEST_FAULT("can't get splitter info");
}
if (info->rw_fapl_id == H5P_DEFAULT) {
- if (H5Pget_driver(fetched_info.rw_fapl_id) != H5Pget_driver(H5P_FILE_ACCESS_DEFAULT)) {
+ if (H5Pget_driver(fetched_info->rw_fapl_id) != H5Pget_driver(H5P_FILE_ACCESS_DEFAULT)) {
SPLITTER_TEST_FAULT("Read-Write driver mismatch (default)\n");
}
}
else {
- if (H5Pget_driver(fetched_info.rw_fapl_id) != H5Pget_driver(info->rw_fapl_id)) {
+ if (H5Pget_driver(fetched_info->rw_fapl_id) != H5Pget_driver(info->rw_fapl_id)) {
SPLITTER_TEST_FAULT("Read-Write driver mismatch\n");
}
}
if (info->wo_fapl_id == H5P_DEFAULT) {
- if (H5Pget_driver(fetched_info.wo_fapl_id) != H5Pget_driver(H5P_FILE_ACCESS_DEFAULT)) {
+ if (H5Pget_driver(fetched_info->wo_fapl_id) != H5Pget_driver(H5P_FILE_ACCESS_DEFAULT)) {
SPLITTER_TEST_FAULT("Write-Only driver mismatch (default)\n");
}
}
else {
- if (H5Pget_driver(fetched_info.wo_fapl_id) != H5Pget_driver(info->wo_fapl_id)) {
+ if (H5Pget_driver(fetched_info->wo_fapl_id) != H5Pget_driver(info->wo_fapl_id)) {
SPLITTER_TEST_FAULT("Write-Only driver mismatch\n");
}
}
- if ( (HDstrlen(info->wo_path) != HDstrlen(fetched_info.wo_path)) ||
- HDstrncmp(info->wo_path, fetched_info.wo_path, H5FD_SPLITTER_PATH_MAX))
+ if ( (HDstrlen(info->wo_path) != HDstrlen(fetched_info->wo_path)) ||
+ HDstrncmp(info->wo_path, fetched_info->wo_path, H5FD_SPLITTER_PATH_MAX))
{
- HDfprintf(stderr, "MISMATCH: '%s' :: '%s'\n", info->wo_path, fetched_info.wo_path);
+ HDfprintf(stderr, "MISMATCH: '%s' :: '%s'\n", info->wo_path, fetched_info->wo_path);
HEXPRINT(H5FD_SPLITTER_PATH_MAX, info->wo_path);
- HEXPRINT(H5FD_SPLITTER_PATH_MAX, fetched_info.wo_path);
+ HEXPRINT(H5FD_SPLITTER_PATH_MAX, fetched_info->wo_path);
SPLITTER_TEST_FAULT("Write-Only file path mismatch\n");
}
done:
+ HDfree(fetched_info);
+
return ret_value;
} /* end compare_splitter_config_info() */
@@ -2331,37 +2336,42 @@ run_splitter_test(const struct splitter_dataset_def *data,
hid_t space_id = H5I_INVALID_HID;
hid_t fapl_id_out = H5I_INVALID_HID;
hid_t fapl_id_cpy = H5I_INVALID_HID;
- H5FD_splitter_vfd_config_t vfd_config;
- char filename_rw[H5FD_SPLITTER_PATH_MAX + 1];
+ H5FD_splitter_vfd_config_t *vfd_config = NULL;
+ char *filename_rw = NULL;
FILE *logfile = NULL;
int ret_value = 0;
- vfd_config.magic = H5FD_SPLITTER_MAGIC;
- vfd_config.version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
- vfd_config.ignore_wo_errs = ignore_wo_errors;
- vfd_config.rw_fapl_id = sub_fapl_ids[0];
- vfd_config.wo_fapl_id = sub_fapl_ids[1];
+ if (NULL == (vfd_config = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t))))
+ SPLITTER_TEST_FAULT("memory allocation for vfd_config struct failed");
+ if (NULL == (filename_rw = HDcalloc(H5FD_SPLITTER_PATH_MAX + 1, sizeof(char))))
+ SPLITTER_TEST_FAULT("memory allocation for filename_rw string failed");
+
+ vfd_config->magic = H5FD_SPLITTER_MAGIC;
+ vfd_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
+ vfd_config->ignore_wo_errs = ignore_wo_errors;
+ vfd_config->rw_fapl_id = sub_fapl_ids[0];
+ vfd_config->wo_fapl_id = sub_fapl_ids[1];
- if (splitter_prepare_file_paths(&vfd_config, filename_rw) < 0) {
+ if (splitter_prepare_file_paths(vfd_config, filename_rw) < 0) {
SPLITTER_TEST_FAULT("can't prepare file paths\n");
}
if (provide_logfile_path == FALSE) {
- *vfd_config.log_file_path = '\0'; /* reset as empty string */
+ vfd_config->log_file_path[0] = '\0'; /* reset as empty string */
}
/* Create a new fapl to use the SPLITTER file driver */
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) == H5I_INVALID_HID) {
SPLITTER_TEST_FAULT("can't create FAPL ID\n");
}
- if (H5Pset_fapl_splitter(fapl_id, &vfd_config) < 0) {
+ if (H5Pset_fapl_splitter(fapl_id, vfd_config) < 0) {
SPLITTER_TEST_FAULT("can't set splitter FAPL\n");
}
if (H5Pget_driver(fapl_id) != H5FD_SPLITTER) {
SPLITTER_TEST_FAULT("set FAPL not SPLITTER\n");
}
- if (compare_splitter_config_info(fapl_id, &vfd_config) < 0) {
+ if (compare_splitter_config_info(fapl_id, vfd_config) < 0) {
SPLITTER_TEST_FAULT("information mismatch\n");
}
@@ -2374,7 +2384,7 @@ run_splitter_test(const struct splitter_dataset_def *data,
if (H5I_INVALID_HID == fapl_id_cpy) {
SPLITTER_TEST_FAULT("can't copy FAPL\n");
}
- if (compare_splitter_config_info(fapl_id_cpy, &vfd_config) < 0) {
+ if (compare_splitter_config_info(fapl_id_cpy, vfd_config) < 0) {
SPLITTER_TEST_FAULT("information mismatch\n");
}
if (H5Pclose(fapl_id_cpy) < 0) {
@@ -2401,7 +2411,7 @@ run_splitter_test(const struct splitter_dataset_def *data,
if (H5Pget_driver(fapl_id_out) != H5FD_SPLITTER) {
SPLITTER_TEST_FAULT("wrong file FAPL driver\n");
}
- if (compare_splitter_config_info(fapl_id_out, &vfd_config) < 0) {
+ if (compare_splitter_config_info(fapl_id_out, vfd_config) < 0) {
SPLITTER_TEST_FAULT("information mismatch\n");
}
if (H5Pclose(fapl_id_out) < 0) {
@@ -2439,12 +2449,12 @@ run_splitter_test(const struct splitter_dataset_def *data,
}
/* Verify that the R/W and W/O files are identical */
- if (h5_compare_file_bytes(filename_rw, vfd_config.wo_path) < 0) {
+ if (h5_compare_file_bytes(filename_rw, vfd_config->wo_path) < 0) {
SPLITTER_TEST_FAULT("files are not byte-for-byte equivalent\n");
}
/* Verify existence of logfile iff appropriate */
- logfile = fopen(vfd_config.log_file_path, "r");
+ logfile = fopen(vfd_config->log_file_path, "r");
if ( (TRUE == provide_logfile_path && NULL == logfile) ||
(FALSE == provide_logfile_path && NULL != logfile) )
{
@@ -2454,19 +2464,22 @@ run_splitter_test(const struct splitter_dataset_def *data,
done:
if (ret_value < 0) {
H5E_BEGIN_TRY {
- (void)H5Dclose(dset_id);
- (void)H5Sclose(space_id);
- (void)H5Pclose(fapl_id_out);
- (void)H5Pclose(fapl_id_cpy);
- (void)H5Pclose(fapl_id);
- (void)H5Fclose(file_id);
+ H5Dclose(dset_id);
+ H5Sclose(space_id);
+ H5Pclose(fapl_id_out);
+ H5Pclose(fapl_id_cpy);
+ H5Pclose(fapl_id);
+ H5Fclose(file_id);
} H5E_END_TRY;
}
- if (logfile != NULL) {
+
+ if (logfile != NULL)
fclose(logfile);
- }
- return ret_value;
+ HDfree(vfd_config);
+ HDfree(filename_rw);
+
+ return ret_value;
} /* end run_splitter_test() */
@@ -2488,25 +2501,28 @@ done:
static int
driver_is_splitter_compatible(hid_t fapl_id)
{
- H5FD_splitter_vfd_config_t vfd_config;
+ H5FD_splitter_vfd_config_t *vfd_config = NULL;
hid_t split_fapl_id = H5I_INVALID_HID;
herr_t ret = SUCCEED;
int ret_value = 0;
- split_fapl_id = H5Pcreate(H5P_FILE_ACCESS);
- if (H5I_INVALID_HID == split_fapl_id) {
+ if (NULL == (vfd_config = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t)))) {
+ FAIL_PUTS_ERROR("memory allocation for vfd_config struct failed");
+ }
+
+ if(H5I_INVALID_HID == (split_fapl_id = H5Pcreate(H5P_FILE_ACCESS))) {
FAIL_PUTS_ERROR("Can't create contained FAPL");
}
- vfd_config.magic = H5FD_SPLITTER_MAGIC;
- vfd_config.version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
- vfd_config.ignore_wo_errs = FALSE;
- vfd_config.rw_fapl_id = H5P_DEFAULT;
- vfd_config.wo_fapl_id = fapl_id;
- HDstrncpy(vfd_config.wo_path, "nonesuch", H5FD_SPLITTER_PATH_MAX);
- *vfd_config.log_file_path = '\0';
+ vfd_config->magic = H5FD_SPLITTER_MAGIC;
+ vfd_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
+ vfd_config->ignore_wo_errs = FALSE;
+ vfd_config->rw_fapl_id = H5P_DEFAULT;
+ vfd_config->wo_fapl_id = fapl_id;
+ HDstrncpy(vfd_config->wo_path, "nonesuch", H5FD_SPLITTER_PATH_MAX);
+ vfd_config->log_file_path[0] = '\0';
H5E_BEGIN_TRY {
- ret = H5Pset_fapl_splitter(split_fapl_id, &vfd_config);
+ ret = H5Pset_fapl_splitter(split_fapl_id, vfd_config);
} H5E_END_TRY;
if (SUCCEED == ret) {
ret_value = -1;
@@ -2517,12 +2533,17 @@ driver_is_splitter_compatible(hid_t fapl_id)
}
split_fapl_id = H5I_INVALID_HID;
+ HDfree(vfd_config);
+
return ret_value;
error:
H5E_BEGIN_TRY {
- (void)H5Pclose(split_fapl_id);
+ H5Pclose(split_fapl_id);
} H5E_END_TRY;
+
+ HDfree(vfd_config);
+
return -1;
} /* end driver_is_splitter_compatible() */
@@ -2545,19 +2566,24 @@ splitter_RO_test(
const struct splitter_dataset_def *data,
hid_t child_fapl_id)
{
- char filename_rw[H5FD_SPLITTER_PATH_MAX + 1];
- H5FD_splitter_vfd_config_t vfd_config;
+ char *filename_rw = NULL;
+ H5FD_splitter_vfd_config_t *vfd_config = NULL;
hid_t fapl_id = H5I_INVALID_HID;
- int ret_value = 0;
hid_t file_id = H5I_INVALID_HID;
+ int ret_value = 0;
+
+ if (NULL == (vfd_config = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t))))
+ SPLITTER_TEST_FAULT("memory allocation for vfd_config struct failed");
+ if (NULL == (filename_rw = HDcalloc(H5FD_SPLITTER_PATH_MAX + 1, sizeof(char))))
+ SPLITTER_TEST_FAULT("memory allocation for filename_rw string failed");
- vfd_config.magic = H5FD_SPLITTER_MAGIC;
- vfd_config.version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
- vfd_config.ignore_wo_errs = FALSE;
- vfd_config.rw_fapl_id = child_fapl_id;
- vfd_config.wo_fapl_id = child_fapl_id;
+ vfd_config->magic = H5FD_SPLITTER_MAGIC;
+ vfd_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
+ vfd_config->ignore_wo_errs = FALSE;
+ vfd_config->rw_fapl_id = child_fapl_id;
+ vfd_config->wo_fapl_id = child_fapl_id;
- if (splitter_prepare_file_paths(&vfd_config, filename_rw) < 0) {
+ if (splitter_prepare_file_paths(vfd_config, filename_rw) < 0) {
SPLITTER_TEST_FAULT("can't prepare splitter file paths\n");
}
@@ -2566,7 +2592,7 @@ splitter_RO_test(
if (H5I_INVALID_HID == fapl_id) {
SPLITTER_TEST_FAULT("can't create FAPL ID\n");
}
- if (H5Pset_fapl_splitter(fapl_id, &vfd_config) < 0) {
+ if (H5Pset_fapl_splitter(fapl_id, vfd_config) < 0) {
SPLITTER_TEST_FAULT("can't set splitter FAPL\n");
}
if (H5Pget_driver(fapl_id) != H5FD_SPLITTER) {
@@ -2588,7 +2614,7 @@ splitter_RO_test(
* Should fail.
*/
- if (splitter_create_single_file_at(vfd_config.wo_path, vfd_config.wo_fapl_id, data) < 0) {
+ if (splitter_create_single_file_at(vfd_config->wo_path, vfd_config->wo_fapl_id, data) < 0) {
SPLITTER_TEST_FAULT("can't write W/O file\n");
}
H5E_BEGIN_TRY {
@@ -2597,13 +2623,13 @@ splitter_RO_test(
if (file_id >= 0) {
SPLITTER_TEST_FAULT("R/O open with extant W/O file unexpectedly successful\n");
}
- HDremove(vfd_config.wo_path);
+ HDremove(vfd_config->wo_path);
/* Attempt R/O open when only R/W file exists
* Should fail.
*/
- if (splitter_create_single_file_at(filename_rw, vfd_config.rw_fapl_id, data) < 0) {
+ if (splitter_create_single_file_at(filename_rw, vfd_config->rw_fapl_id, data) < 0) {
SPLITTER_TEST_FAULT("can't create R/W file\n");
}
H5E_BEGIN_TRY {
@@ -2616,7 +2642,7 @@ splitter_RO_test(
/* Attempt R/O open when both R/W and W/O files exist
*/
- if (splitter_create_single_file_at(vfd_config.wo_path, vfd_config.wo_fapl_id, data) < 0) {
+ if (splitter_create_single_file_at(vfd_config->wo_path, vfd_config->wo_fapl_id, data) < 0) {
SPLITTER_TEST_FAULT("can't create W/O file\n");
}
file_id = H5Fopen(filename_rw, H5F_ACC_RDONLY, fapl_id);
@@ -2642,10 +2668,14 @@ splitter_RO_test(
done:
if (ret_value < 0) {
H5E_BEGIN_TRY {
- (void)H5Pclose(fapl_id);
- (void)H5Fclose(file_id);
+ H5Pclose(fapl_id);
+ H5Fclose(file_id);
} H5E_END_TRY;
- } /* end if error */
+ }
+
+ HDfree(vfd_config);
+ HDfree(filename_rw);
+
return ret_value;
} /* end splitter_RO_test() */
@@ -2784,9 +2814,9 @@ splitter_create_single_file_at(
done:
if (ret_value < 0) {
H5E_BEGIN_TRY {
- (void)H5Dclose(dset_id);
- (void)H5Sclose(space_id);
- (void)H5Fclose(file_id);
+ H5Dclose(dset_id);
+ H5Sclose(space_id);
+ H5Fclose(file_id);
} H5E_END_TRY;
} /* end if error */
return ret_value;
@@ -2847,7 +2877,7 @@ splitter_compare_expected_data(hid_t file_id,
done:
if (ret_value < 0) {
H5E_BEGIN_TRY {
- (void)H5Dclose(dset_id);
+ H5Dclose(dset_id);
} H5E_END_TRY;
}
return ret_value;
@@ -2880,9 +2910,9 @@ done:
static int
splitter_tentative_open_test(hid_t child_fapl_id)
{
- const char filename_tmp[H5FD_SPLITTER_PATH_MAX + 1] = "splitter_tmp.h5";
- char filename_rw[H5FD_SPLITTER_PATH_MAX + 1];
- H5FD_splitter_vfd_config_t vfd_config;
+ const char *filename_tmp = "splitter_tmp.h5";
+ char *filename_rw = NULL;
+ H5FD_splitter_vfd_config_t *vfd_config = NULL;
hid_t fapl_id = H5I_INVALID_HID;
hid_t file_id = H5I_INVALID_HID;
int buf[SPLITTER_SIZE][SPLITTER_SIZE]; /* for comparison */
@@ -2892,6 +2922,11 @@ splitter_tentative_open_test(hid_t child_fapl_id)
struct splitter_dataset_def data; /* for comparison */
int ret_value = 0;
+ if (NULL == (vfd_config = HDcalloc(1, sizeof(H5FD_splitter_vfd_config_t))))
+ SPLITTER_TEST_FAULT("memory allocation for vfd_config struct failed");
+ if (NULL == (filename_rw = HDcalloc(H5FD_SPLITTER_PATH_MAX + 1, sizeof(char))))
+ SPLITTER_TEST_FAULT("memory allocation for filename_rw string failed");
+
/* pre-fill data buffer to write */
for (i=0; i < SPLITTER_SIZE; i++) {
for (j=0; j < SPLITTER_SIZE; j++) {
@@ -2906,13 +2941,13 @@ splitter_tentative_open_test(hid_t child_fapl_id)
data.n_dims = 2;
data.dset_name = SPLITTER_DATASET_NAME;
- vfd_config.magic = H5FD_SPLITTER_MAGIC;
- vfd_config.version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
- vfd_config.ignore_wo_errs = FALSE;
- vfd_config.rw_fapl_id = child_fapl_id;
- vfd_config.wo_fapl_id = child_fapl_id;
+ vfd_config->magic = H5FD_SPLITTER_MAGIC;
+ vfd_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
+ vfd_config->ignore_wo_errs = FALSE;
+ vfd_config->rw_fapl_id = child_fapl_id;
+ vfd_config->wo_fapl_id = child_fapl_id;
- if (splitter_prepare_file_paths(&vfd_config, filename_rw) < 0) {
+ if (splitter_prepare_file_paths(vfd_config, filename_rw) < 0) {
SPLITTER_TEST_FAULT("can't prepare splitter file paths\n");
}
@@ -2920,7 +2955,7 @@ splitter_tentative_open_test(hid_t child_fapl_id)
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) == H5I_INVALID_HID) {
SPLITTER_TEST_FAULT("can't create FAPL ID\n");
}
- if (H5Pset_fapl_splitter(fapl_id, &vfd_config) < 0) {
+ if (H5Pset_fapl_splitter(fapl_id, vfd_config) < 0) {
SPLITTER_TEST_FAULT("can't set splitter FAPL\n");
}
if (H5Pget_driver(fapl_id) != H5FD_SPLITTER) {
@@ -2950,7 +2985,7 @@ splitter_tentative_open_test(hid_t child_fapl_id)
if (file_exists(filename_rw, child_fapl_id)) {
SPLITTER_TEST_FAULT("R/W file unexpectedly created\n");
}
- if (file_exists(vfd_config.wo_path, child_fapl_id)) {
+ if (file_exists(vfd_config->wo_path, child_fapl_id)) {
SPLITTER_TEST_FAULT("W/O file unexpectedly created\n");
}
@@ -2960,7 +2995,7 @@ splitter_tentative_open_test(hid_t child_fapl_id)
* Should fail.
*/
- if (h5_duplicate_file_by_bytes(filename_tmp, vfd_config.wo_path) < 0) {
+ if (h5_duplicate_file_by_bytes(filename_tmp, vfd_config->wo_path) < 0) {
SPLITTER_TEST_FAULT("Can't create W/O file copy.\n");
}
H5E_BEGIN_TRY {
@@ -2972,11 +3007,11 @@ splitter_tentative_open_test(hid_t child_fapl_id)
if (file_exists(filename_rw, child_fapl_id)) {
SPLITTER_TEST_FAULT("R/W file unexpectedly created\n");
}
- if (!file_exists(vfd_config.wo_path, child_fapl_id)) {
+ if (!file_exists(vfd_config->wo_path, child_fapl_id)) {
SPLITTER_TEST_FAULT("W/O file mysteriously disappeared\n");
}
- HDremove(vfd_config.wo_path);
- if (file_exists(vfd_config.wo_path, child_fapl_id)) {
+ HDremove(vfd_config->wo_path);
+ if (file_exists(vfd_config->wo_path, child_fapl_id)) {
SPLITTER_TEST_FAULT("failed to remove W/O file\n");
}
@@ -2998,7 +3033,7 @@ splitter_tentative_open_test(hid_t child_fapl_id)
if (!file_exists(filename_rw, child_fapl_id)) {
SPLITTER_TEST_FAULT("R/W file mysteriously disappeared\n");
}
- if (file_exists(vfd_config.wo_path, child_fapl_id)) {
+ if (file_exists(vfd_config->wo_path, child_fapl_id)) {
SPLITTER_TEST_FAULT("W/O file unexpectedly created\n");
}
@@ -3007,7 +3042,7 @@ splitter_tentative_open_test(hid_t child_fapl_id)
* Both files present.
*/
- if (h5_duplicate_file_by_bytes(filename_tmp, vfd_config.wo_path) < 0) {
+ if (h5_duplicate_file_by_bytes(filename_tmp, vfd_config->wo_path) < 0) {
SPLITTER_TEST_FAULT("Can't create W/O file copy.\n");
}
file_id = H5Fopen(filename_rw, H5F_ACC_RDWR, fapl_id);
@@ -3021,7 +3056,7 @@ splitter_tentative_open_test(hid_t child_fapl_id)
if (!file_exists(filename_rw, child_fapl_id)) {
SPLITTER_TEST_FAULT("R/W file mysteriously disappared\n");
}
- if (!file_exists(vfd_config.wo_path, child_fapl_id)) {
+ if (!file_exists(vfd_config->wo_path, child_fapl_id)) {
SPLITTER_TEST_FAULT("W/O file mysteriously disappeared\n");
}
@@ -3041,14 +3076,14 @@ splitter_tentative_open_test(hid_t child_fapl_id)
if (!file_exists(filename_rw, child_fapl_id)) {
SPLITTER_TEST_FAULT("R/W file mysteriously disappared\n");
}
- if (!file_exists(vfd_config.wo_path, child_fapl_id)) {
+ if (!file_exists(vfd_config->wo_path, child_fapl_id)) {
SPLITTER_TEST_FAULT("W/O file mysteriously disappeared\n");
}
- if (h5_compare_file_bytes(filename_rw, vfd_config.wo_path) < 0) {
+ if (h5_compare_file_bytes(filename_rw, vfd_config->wo_path) < 0) {
SPLITTER_TEST_FAULT("files are not byte-for-byte equivalent\n");
}
HDremove(filename_rw);
- HDremove(vfd_config.wo_path);
+ HDremove(vfd_config->wo_path);
/*
* H5Fcreate() with TRUNC access.
@@ -3058,7 +3093,7 @@ splitter_tentative_open_test(hid_t child_fapl_id)
if (h5_duplicate_file_by_bytes(filename_tmp, filename_rw) < 0) {
SPLITTER_TEST_FAULT("Can't create R/W file copy.\n");
}
- if (file_exists(vfd_config.wo_path, child_fapl_id)) {
+ if (file_exists(vfd_config->wo_path, child_fapl_id)) {
SPLITTER_TEST_FAULT("failed to remove W/O file\n");
}
file_id = H5Fcreate(filename_rw, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
@@ -3072,21 +3107,21 @@ splitter_tentative_open_test(hid_t child_fapl_id)
if (!file_exists(filename_rw, child_fapl_id)) {
SPLITTER_TEST_FAULT("R/W file mysteriously disappared\n");
}
- if (!file_exists(vfd_config.wo_path, child_fapl_id)) {
+ if (!file_exists(vfd_config->wo_path, child_fapl_id)) {
SPLITTER_TEST_FAULT("W/O file mysteriously disappeared\n");
}
- if (h5_compare_file_bytes(filename_rw, vfd_config.wo_path) < 0) {
+ if (h5_compare_file_bytes(filename_rw, vfd_config->wo_path) < 0) {
SPLITTER_TEST_FAULT("files are not byte-for-byte equivalent\n");
}
HDremove(filename_rw);
- HDremove(vfd_config.wo_path);
+ HDremove(vfd_config->wo_path);
/*
* H5Fcreate() with TRUNC access.
* Only W/O present.
*/
- if (h5_duplicate_file_by_bytes(filename_tmp, vfd_config.wo_path) < 0) {
+ if (h5_duplicate_file_by_bytes(filename_tmp, vfd_config->wo_path) < 0) {
SPLITTER_TEST_FAULT("Can't create W/O file copy.\n");
}
if (file_exists(filename_rw, child_fapl_id)) {
@@ -3103,14 +3138,14 @@ splitter_tentative_open_test(hid_t child_fapl_id)
if (!file_exists(filename_rw, child_fapl_id)) {
SPLITTER_TEST_FAULT("R/W file mysteriously disappared\n");
}
- if (!file_exists(vfd_config.wo_path, child_fapl_id)) {
+ if (!file_exists(vfd_config->wo_path, child_fapl_id)) {
SPLITTER_TEST_FAULT("W/O file mysteriously disappeared\n");
}
- if (h5_compare_file_bytes(filename_rw, vfd_config.wo_path) < 0) {
+ if (h5_compare_file_bytes(filename_rw, vfd_config->wo_path) < 0) {
SPLITTER_TEST_FAULT("files are not byte-for-byte equivalent\n");
}
HDremove(filename_rw);
- HDremove(vfd_config.wo_path);
+ HDremove(vfd_config->wo_path);
/* H5Fcreate with both files absent is tested elsewhere */
@@ -3125,10 +3160,14 @@ splitter_tentative_open_test(hid_t child_fapl_id)
done:
if (ret_value < 0) {
H5E_BEGIN_TRY {
- (void)H5Pclose(fapl_id);
- (void)H5Fclose(file_id);
+ H5Pclose(fapl_id);
+ H5Fclose(file_id);
} H5E_END_TRY;
- } /* end if error */
+ }
+
+ HDfree(vfd_config);
+ HDfree(filename_rw);
+
return ret_value;
} /* end splitter_tentative_open_test() */
@@ -3165,7 +3204,7 @@ file_exists(const char *filename, hid_t fapl_id)
error:
H5E_BEGIN_TRY {
- (void)H5Fclose(file_id);
+ H5Fclose(file_id);
} H5E_END_TRY;
return ret_value;
} /* end file_exists() */
@@ -3272,9 +3311,9 @@ test_splitter(void)
return 0;
error:
- if (child_fapl_id != H5I_INVALID_HID) {
- (void)H5Pclose(child_fapl_id);
- }
+ if (child_fapl_id != H5I_INVALID_HID)
+ H5Pclose(child_fapl_id);
+
return -1;
} /* end test_splitter() */
@@ -3286,8 +3325,7 @@ error:
*
* Purpose: Tests the basic features of Virtual File Drivers
*
- * Return: Success: 0
- * Failure: 1
+ * Return: EXIT_SUCCESS/EXIT_FAILURE
*
*-------------------------------------------------------------------------
*/
@@ -3317,11 +3355,11 @@ main(void)
if(nerrors) {
HDprintf("***** %d Virtual File Driver TEST%s FAILED! *****\n",
nerrors, nerrors > 1 ? "S" : "");
- return 1;
- } /* end if */
+ return EXIT_FAILURE;
+ }
HDprintf("All Virtual File Driver tests passed.\n");
- return 0;
+ return EXIT_SUCCESS;
} /* end main() */
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 96c2d32..87a3b11 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -234,7 +234,7 @@ done:
* 0 - not excluded path
*------------------------------------------------------------------------*/
static int
-is_exclude_attr (char *path, h5trav_type_t type, diff_opt_t *opts)
+is_exclude_attr (const char *path, h5trav_type_t type, diff_opt_t *opts)
{
struct exclude_path_list *exclude_ptr;
int ret_cmp;
diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h
index c3c111f..f44f653 100644
--- a/tools/lib/h5diff.h
+++ b/tools/lib/h5diff.h
@@ -57,6 +57,7 @@ typedef struct {
int mode_list_not_cmp; /* list not comparable messages */
int print_header; /* print header */
int print_percentage; /* print percentage */
+ int print_dims; /* print dimension index */
int delta_bool; /* delta, absolute value to compare */
double delta; /* delta value */
int use_system_epsilon; /* flag to use system epsilon (1 or 0) */
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 9b680ec..1a4c727 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -134,7 +134,7 @@ typedef struct mcomp_t {
*/
static hbool_t all_zero(const void *_mem, size_t size);
static int ull2float(unsigned long long ull_value, float *f_value);
-static hsize_t character_compare(char *mem1, char *mem2, hsize_t elemtno, ssize_t u, diff_opt_t *opts);
+static hsize_t character_compare(char *mem1, char *mem2, hsize_t elemtno, size_t u, diff_opt_t *opts);
static hsize_t character_compare_opt(unsigned char *mem1, unsigned char *mem2, hsize_t elemtno, diff_opt_t *opts);
static hbool_t equal_float(float value, float expected, diff_opt_t *opts);
static hbool_t equal_double(double value, double expected, diff_opt_t *opts);
@@ -143,7 +143,7 @@ static hbool_t equal_ldouble(long double value, long double expected, diff_opt_t
#endif
static int print_data(diff_opt_t *opts);
-static void print_pos(diff_opt_t *opts, hsize_t elemtno, ssize_t u);
+static void print_pos(diff_opt_t *opts, hsize_t elemtno, size_t u);
static void h5diff_print_char(char ch);
static hsize_t diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t region2_id, diff_opt_t *opts);
@@ -210,7 +210,6 @@ diff_array(void *_mem1, void *_mem2, diff_opt_t *opts, hid_t container1_id, hid_
unsigned char *mem1 = (unsigned char*) _mem1;
unsigned char *mem2 = (unsigned char*) _mem2;
hsize_t i;
- int j;
mcomp_t members;
H5T_class_t type_class;
@@ -680,7 +679,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co
*/
nfound += 1;
opts->print_percentage = 0;
- print_pos(opts, elemtno, -1);
+ print_pos(opts, elemtno, 0);
if (print_data(opts)) {
parallel_print(S_FORMAT, enum_name1, enum_name2);
}
@@ -690,7 +689,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co
if (HDstrcmp(enum_name1, enum_name2) != 0) {
nfound = 1;
opts->print_percentage = 0;
- print_pos(opts, elemtno, -1);
+ print_pos(opts, elemtno, 0);
if (print_data(opts)) {
parallel_print(S_FORMAT, enum_name1, enum_name2);
}
@@ -1528,7 +1527,7 @@ done:
*-------------------------------------------------------------------------
*/
-static hsize_t character_compare(char *mem1, char *mem2, hsize_t elemtno, ssize_t u, diff_opt_t *opts)
+static hsize_t character_compare(char *mem1, char *mem2, hsize_t elemtno, size_t u, diff_opt_t *opts)
{
hsize_t nfound = 0; /* differences found */
char temp1_uchar;
@@ -1541,6 +1540,7 @@ static hsize_t character_compare(char *mem1, char *mem2, hsize_t elemtno, ssize_
if (temp1_uchar != temp2_uchar) {
if (print_data(opts)) {
opts->print_percentage = 0;
+ opts->print_dims = 1;
print_pos(opts, elemtno, u);
parallel_print(" ");
h5diff_print_char(temp1_uchar);
@@ -1580,7 +1580,7 @@ static hsize_t character_compare_opt(unsigned char *mem1, unsigned char *mem2, h
if (opts->delta_bool && !opts->percent_bool) {
if (PDIFF(temp1_uchar,temp2_uchar) > opts->delta) {
opts->print_percentage = 0;
- print_pos(opts, elemtno, -1);
+ print_pos(opts, elemtno, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar));
}
@@ -1592,7 +1592,7 @@ static hsize_t character_compare_opt(unsigned char *mem1, unsigned char *mem2, h
PER_UNSIGN(signed char, temp1_uchar, temp2_uchar);
if (per > opts->percent) {
opts->print_percentage = 1;
- print_pos(opts, elemtno, -1);
+ print_pos(opts, elemtno, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per);
}
@@ -1604,7 +1604,7 @@ static hsize_t character_compare_opt(unsigned char *mem1, unsigned char *mem2, h
PER_UNSIGN(signed char, temp1_uchar, temp2_uchar);
if (per > opts->percent && PDIFF(temp1_uchar,temp2_uchar) > opts->delta) {
opts->print_percentage = 1;
- print_pos(opts, elemtno, -1);
+ print_pos(opts, elemtno, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per);
}
@@ -1613,7 +1613,7 @@ static hsize_t character_compare_opt(unsigned char *mem1, unsigned char *mem2, h
}
else if (temp1_uchar != temp2_uchar) {
opts->print_percentage = 0;
- print_pos(opts, elemtno, -1);
+ print_pos(opts, elemtno, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar));
}
@@ -1668,7 +1668,7 @@ static hsize_t diff_float_element(unsigned char *mem1, unsigned char *mem2, hsiz
if (!isnan1 && !isnan2) {
if ((double) ABS(temp1_float - temp2_float) > opts->delta) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float));
}
@@ -1678,7 +1678,7 @@ static hsize_t diff_float_element(unsigned char *mem1, unsigned char *mem2, hsiz
/* only one is NaN, assume difference */
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float));
}
@@ -1704,7 +1704,7 @@ static hsize_t diff_float_element(unsigned char *mem1, unsigned char *mem2, hsiz
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(F_FORMAT_P_NOTCOMP, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float));
}
@@ -1712,7 +1712,7 @@ static hsize_t diff_float_element(unsigned char *mem1, unsigned char *mem2, hsiz
}
else if (per > opts->percent) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(F_FORMAT_P, (double) temp1_float, (double) temp2_float,
(double) ABS(temp1_float - temp2_float), (double) ABS(1 - temp2_float / temp1_float));
@@ -1723,7 +1723,7 @@ static hsize_t diff_float_element(unsigned char *mem1, unsigned char *mem2, hsiz
/* only one is NaN, assume difference */
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float));
}
@@ -1750,7 +1750,7 @@ static hsize_t diff_float_element(unsigned char *mem1, unsigned char *mem2, hsiz
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(F_FORMAT_P_NOTCOMP, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float));
}
@@ -1758,7 +1758,7 @@ static hsize_t diff_float_element(unsigned char *mem1, unsigned char *mem2, hsiz
}
else if (per > opts->percent && (double) ABS(temp1_float - temp2_float) > opts->delta) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(F_FORMAT_P, (double) temp1_float, (double) temp2_float,
(double) ABS(temp1_float - temp2_float), (double) ABS(1 - temp2_float / temp1_float));
@@ -1769,7 +1769,7 @@ static hsize_t diff_float_element(unsigned char *mem1, unsigned char *mem2, hsiz
/* only one is NaN, assume difference */
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float));
}
@@ -1783,7 +1783,7 @@ static hsize_t diff_float_element(unsigned char *mem1, unsigned char *mem2, hsiz
else {
if (equal_float(temp1_float, temp2_float, opts) == FALSE) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(F_FORMAT, (double) temp1_float, (double) temp2_float, (double) ABS(temp1_float - temp2_float));
}
@@ -1836,7 +1836,7 @@ static hsize_t diff_double_element(unsigned char *mem1, unsigned char *mem2, hsi
if (!isnan1 && !isnan2) {
if (ABS(temp1_double-temp2_double) > opts->delta) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -1846,7 +1846,7 @@ static hsize_t diff_double_element(unsigned char *mem1, unsigned char *mem2, hsi
/* only one is NaN, assume difference */
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -1873,7 +1873,7 @@ static hsize_t diff_double_element(unsigned char *mem1, unsigned char *mem2, hsi
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(F_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -1881,7 +1881,7 @@ static hsize_t diff_double_element(unsigned char *mem1, unsigned char *mem2, hsi
}
else if (per > opts->percent) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(F_FORMAT_P, temp1_double, temp2_double,
ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double));
@@ -1892,7 +1892,7 @@ static hsize_t diff_double_element(unsigned char *mem1, unsigned char *mem2, hsi
/* only one is NaN, assume difference */
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -1919,7 +1919,7 @@ static hsize_t diff_double_element(unsigned char *mem1, unsigned char *mem2, hsi
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(F_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -1927,7 +1927,7 @@ static hsize_t diff_double_element(unsigned char *mem1, unsigned char *mem2, hsi
}
else if (per > opts->percent && ABS(temp1_double-temp2_double) > opts->delta) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(F_FORMAT_P, temp1_double, temp2_double,
ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double));
@@ -1938,7 +1938,7 @@ static hsize_t diff_double_element(unsigned char *mem1, unsigned char *mem2, hsi
/* only one is NaN, assume difference */
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -1952,7 +1952,7 @@ static hsize_t diff_double_element(unsigned char *mem1, unsigned char *mem2, hsi
else {
if (equal_double(temp1_double, temp2_double, opts) == FALSE) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -2009,7 +2009,7 @@ static hsize_t diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hs
if (!isnan1 && !isnan2) {
if (ABS(temp1_double-temp2_double) > opts->delta) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(LD_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -2019,7 +2019,7 @@ static hsize_t diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hs
/* only one is NaN, assume difference */
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -2046,7 +2046,7 @@ static hsize_t diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hs
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(LD_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -2054,7 +2054,7 @@ static hsize_t diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hs
}
else if (per > opts->percent) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(LD_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double));
}
@@ -2064,7 +2064,7 @@ static hsize_t diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hs
/* only one is NaN, assume difference */
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -2091,7 +2091,7 @@ static hsize_t diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hs
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(LD_FORMAT_P_NOTCOMP, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -2099,7 +2099,7 @@ static hsize_t diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hs
}
else if (per > opts->percent && ABS(temp1_double-temp2_double) > opts->delta) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(LD_FORMAT_P, temp1_double, temp2_double, ABS(temp1_double - temp2_double), ABS(1 - temp2_double / temp1_double));
}
@@ -2109,7 +2109,7 @@ static hsize_t diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hs
/* only one is NaN, assume difference */
else if ((isnan1 && !isnan2) || (!isnan1 && isnan2)) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(F_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -2122,7 +2122,7 @@ static hsize_t diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hs
*/
else if (equal_ldouble(temp1_double, temp2_double, opts) == FALSE) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(LD_FORMAT, temp1_double, temp2_double, ABS(temp1_double - temp2_double));
}
@@ -2159,7 +2159,7 @@ static hsize_t diff_schar_element(unsigned char *mem1, unsigned char *mem2, hsiz
if (opts->delta_bool && !opts->percent_bool) {
if (ABS(temp1_char-temp2_char) > opts->delta) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT, temp1_char, temp2_char, ABS(temp1_char - temp2_char));
}
@@ -2172,7 +2172,7 @@ static hsize_t diff_schar_element(unsigned char *mem1, unsigned char *mem2, hsiz
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P_NOTCOMP, temp1_char, temp2_char, ABS(temp1_char - temp2_char));
}
@@ -2180,7 +2180,7 @@ static hsize_t diff_schar_element(unsigned char *mem1, unsigned char *mem2, hsiz
}
else if (per > opts->percent) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P, temp1_char, temp2_char, ABS(temp1_char - temp2_char), per);
}
@@ -2193,7 +2193,7 @@ static hsize_t diff_schar_element(unsigned char *mem1, unsigned char *mem2, hsiz
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P_NOTCOMP, temp1_char, temp2_char, ABS(temp1_char - temp2_char));
}
@@ -2201,7 +2201,7 @@ static hsize_t diff_schar_element(unsigned char *mem1, unsigned char *mem2, hsiz
}
else if (per > opts->percent && ABS(temp1_char - temp2_char) > opts->delta) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P, temp1_char, temp2_char, ABS(temp1_char - temp2_char), per);
}
@@ -2210,7 +2210,7 @@ static hsize_t diff_schar_element(unsigned char *mem1, unsigned char *mem2, hsiz
}
else if (temp1_char != temp2_char) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT, temp1_char, temp2_char, ABS(temp1_char - temp2_char));
}
@@ -2246,7 +2246,7 @@ static hsize_t diff_uchar_element(unsigned char *mem1, unsigned char *mem2, hsiz
if (opts->delta_bool && !opts->percent_bool) {
if (PDIFF(temp1_uchar, temp2_uchar) > opts->delta) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar));
}
@@ -2259,7 +2259,7 @@ static hsize_t diff_uchar_element(unsigned char *mem1, unsigned char *mem2, hsiz
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P_NOTCOMP, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar));
}
@@ -2267,7 +2267,7 @@ static hsize_t diff_uchar_element(unsigned char *mem1, unsigned char *mem2, hsiz
}
else if (per > opts->percent) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per);
}
@@ -2280,7 +2280,7 @@ static hsize_t diff_uchar_element(unsigned char *mem1, unsigned char *mem2, hsiz
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P_NOTCOMP, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar));
}
@@ -2288,7 +2288,7 @@ static hsize_t diff_uchar_element(unsigned char *mem1, unsigned char *mem2, hsiz
}
else if (per > opts->percent && PDIFF(temp1_uchar, temp2_uchar) > opts->delta) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar), per);
}
@@ -2297,7 +2297,7 @@ static hsize_t diff_uchar_element(unsigned char *mem1, unsigned char *mem2, hsiz
}
else if (temp1_uchar != temp2_uchar) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT, temp1_uchar, temp2_uchar, PDIFF(temp1_uchar, temp2_uchar));
}
@@ -2333,7 +2333,7 @@ static hsize_t diff_short_element(unsigned char *mem1, unsigned char *mem2, hsiz
if (opts->delta_bool && !opts->percent_bool) {
if (ABS(temp1_short - temp2_short) > opts->delta) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT, temp1_short, temp2_short, ABS(temp1_short - temp2_short));
}
@@ -2346,7 +2346,7 @@ static hsize_t diff_short_element(unsigned char *mem1, unsigned char *mem2, hsiz
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P_NOTCOMP, temp1_short, temp2_short, ABS(temp1_short - temp2_short));
}
@@ -2354,7 +2354,7 @@ static hsize_t diff_short_element(unsigned char *mem1, unsigned char *mem2, hsiz
}
else if (per > opts->percent) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P, temp1_short, temp2_short, ABS(temp1_short - temp2_short), per);
}
@@ -2367,7 +2367,7 @@ static hsize_t diff_short_element(unsigned char *mem1, unsigned char *mem2, hsiz
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P_NOTCOMP, temp1_short, temp2_short, ABS(temp1_short - temp2_short));
}
@@ -2375,7 +2375,7 @@ static hsize_t diff_short_element(unsigned char *mem1, unsigned char *mem2, hsiz
}
else if (per > opts->percent && ABS(temp1_short - temp2_short) > opts->delta) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P, temp1_short, temp2_short, ABS(temp1_short - temp2_short), per);
}
@@ -2384,7 +2384,7 @@ static hsize_t diff_short_element(unsigned char *mem1, unsigned char *mem2, hsiz
}
else if (temp1_short != temp2_short) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT, temp1_short, temp2_short, ABS(temp1_short - temp2_short));
}
@@ -2420,7 +2420,7 @@ static hsize_t diff_ushort_element(unsigned char *mem1, unsigned char *mem2, hsi
if (opts->delta_bool && !opts->percent_bool) {
if (PDIFF(temp1_ushort, temp2_ushort) > opts->delta) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort));
}
@@ -2433,7 +2433,7 @@ static hsize_t diff_ushort_element(unsigned char *mem1, unsigned char *mem2, hsi
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P_NOTCOMP, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort));
}
@@ -2441,7 +2441,7 @@ static hsize_t diff_ushort_element(unsigned char *mem1, unsigned char *mem2, hsi
}
else if (per > opts->percent) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort), per);
}
@@ -2454,7 +2454,7 @@ static hsize_t diff_ushort_element(unsigned char *mem1, unsigned char *mem2, hsi
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P_NOTCOMP, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort));
}
@@ -2462,7 +2462,7 @@ static hsize_t diff_ushort_element(unsigned char *mem1, unsigned char *mem2, hsi
}
else if (per > opts->percent && PDIFF(temp1_ushort, temp2_ushort) > opts->delta) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort), per);
}
@@ -2471,7 +2471,7 @@ static hsize_t diff_ushort_element(unsigned char *mem1, unsigned char *mem2, hsi
}
else if (temp1_ushort != temp2_ushort) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT, temp1_ushort, temp2_ushort, PDIFF(temp1_ushort, temp2_ushort));
}
@@ -2507,7 +2507,7 @@ static hsize_t diff_int_element(unsigned char *mem1, unsigned char *mem2, hsize_
if (opts->delta_bool && !opts->percent_bool) {
if (ABS(temp1_int-temp2_int) > opts->delta) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT, temp1_int, temp2_int, ABS(temp1_int - temp2_int));
}
@@ -2520,7 +2520,7 @@ static hsize_t diff_int_element(unsigned char *mem1, unsigned char *mem2, hsize_
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P_NOTCOMP, temp1_int, temp2_int, ABS(temp1_int - temp2_int));
}
@@ -2528,7 +2528,7 @@ static hsize_t diff_int_element(unsigned char *mem1, unsigned char *mem2, hsize_
}
else if (per > opts->percent) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P, temp1_int, temp2_int, ABS(temp1_int - temp2_int), per);
}
@@ -2541,7 +2541,7 @@ static hsize_t diff_int_element(unsigned char *mem1, unsigned char *mem2, hsize_
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P_NOTCOMP, temp1_int, temp2_int, ABS(temp1_int - temp2_int));
}
@@ -2549,7 +2549,7 @@ static hsize_t diff_int_element(unsigned char *mem1, unsigned char *mem2, hsize_
}
else if (per > opts->percent && ABS(temp1_int - temp2_int) > opts->delta) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT_P, temp1_int, temp2_int, ABS(temp1_int - temp2_int), per);
}
@@ -2558,7 +2558,7 @@ static hsize_t diff_int_element(unsigned char *mem1, unsigned char *mem2, hsize_
}
else if (temp1_int != temp2_int) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(I_FORMAT, temp1_int, temp2_int, ABS(temp1_int - temp2_int));
}
@@ -2594,7 +2594,7 @@ static hsize_t diff_uint_element(unsigned char *mem1, unsigned char *mem2, hsize
if (opts->delta_bool && !opts->percent_bool) {
if (PDIFF(temp1_uint, temp2_uint) > opts->delta) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(UI_FORMAT, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint));
}
@@ -2607,7 +2607,7 @@ static hsize_t diff_uint_element(unsigned char *mem1, unsigned char *mem2, hsize
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(UI_FORMAT_P_NOTCOMP, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint));
}
@@ -2615,7 +2615,7 @@ static hsize_t diff_uint_element(unsigned char *mem1, unsigned char *mem2, hsize
}
else if (per > opts->percent) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(UI_FORMAT_P, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint), per);
}
@@ -2628,7 +2628,7 @@ static hsize_t diff_uint_element(unsigned char *mem1, unsigned char *mem2, hsize
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(UI_FORMAT_P_NOTCOMP, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint));
}
@@ -2636,7 +2636,7 @@ static hsize_t diff_uint_element(unsigned char *mem1, unsigned char *mem2, hsize
}
else if (per > opts->percent && PDIFF(temp1_uint,temp2_uint) > opts->delta) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(UI_FORMAT_P, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint), per);
}
@@ -2645,7 +2645,7 @@ static hsize_t diff_uint_element(unsigned char *mem1, unsigned char *mem2, hsize
}
else if (temp1_uint != temp2_uint) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(UI_FORMAT, temp1_uint, temp2_uint, PDIFF(temp1_uint, temp2_uint));
}
@@ -2681,7 +2681,7 @@ static hsize_t diff_long_element(unsigned char *mem1, unsigned char *mem2, hsize
if (opts->delta_bool && !opts->percent_bool) {
if (ABS(temp1_long-temp2_long) > opts->delta) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(LI_FORMAT, temp1_long, temp2_long, ABS(temp1_long - temp2_long));
}
@@ -2694,7 +2694,7 @@ static hsize_t diff_long_element(unsigned char *mem1, unsigned char *mem2, hsize
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(LI_FORMAT_P_NOTCOMP, temp1_long, temp2_long, ABS(temp1_long - temp2_long));
}
@@ -2702,7 +2702,7 @@ static hsize_t diff_long_element(unsigned char *mem1, unsigned char *mem2, hsize
}
else if (per > opts->percent) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(LI_FORMAT_P, temp1_long, temp2_long, ABS(temp1_long - temp2_long), per);
}
@@ -2715,7 +2715,7 @@ static hsize_t diff_long_element(unsigned char *mem1, unsigned char *mem2, hsize
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(LI_FORMAT_P_NOTCOMP, temp1_long, temp2_long, ABS(temp1_long - temp2_long));
}
@@ -2723,7 +2723,7 @@ static hsize_t diff_long_element(unsigned char *mem1, unsigned char *mem2, hsize
}
else if (per > opts->percent && ABS(temp1_long-temp2_long) > opts->delta) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(LI_FORMAT_P, temp1_long, temp2_long, ABS(temp1_long - temp2_long), per);
}
@@ -2732,7 +2732,7 @@ static hsize_t diff_long_element(unsigned char *mem1, unsigned char *mem2, hsize
}
else if (temp1_long != temp2_long) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(LI_FORMAT, temp1_long, temp2_long, ABS(temp1_long - temp2_long));
}
@@ -2768,7 +2768,7 @@ static hsize_t diff_ulong_element(unsigned char *mem1, unsigned char *mem2, hsiz
if (opts->delta_bool && !opts->percent_bool) {
if (PDIFF(temp1_ulong, temp2_ulong) > opts->delta) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(ULI_FORMAT, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong));
}
@@ -2781,7 +2781,7 @@ static hsize_t diff_ulong_element(unsigned char *mem1, unsigned char *mem2, hsiz
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(ULI_FORMAT_P_NOTCOMP, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong));
}
@@ -2789,7 +2789,7 @@ static hsize_t diff_ulong_element(unsigned char *mem1, unsigned char *mem2, hsiz
}
else if (per > opts->percent) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(ULI_FORMAT_P, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong), per);
}
@@ -2802,7 +2802,7 @@ static hsize_t diff_ulong_element(unsigned char *mem1, unsigned char *mem2, hsiz
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(ULI_FORMAT_P_NOTCOMP, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong));
}
@@ -2810,7 +2810,7 @@ static hsize_t diff_ulong_element(unsigned char *mem1, unsigned char *mem2, hsiz
}
else if (per > opts->percent && PDIFF(temp1_ulong,temp2_ulong) > opts->delta) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(ULI_FORMAT_P, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong), per);
}
@@ -2819,7 +2819,7 @@ static hsize_t diff_ulong_element(unsigned char *mem1, unsigned char *mem2, hsiz
}
else if (temp1_ulong != temp2_ulong) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(ULI_FORMAT, temp1_ulong, temp2_ulong, PDIFF(temp1_ulong, temp2_ulong));
}
@@ -2856,7 +2856,7 @@ static hsize_t diff_llong_element(unsigned char *mem1, unsigned char *mem2, hsiz
if (opts->delta_bool && !opts->percent_bool) {
if (ABS( temp1_llong-temp2_llong) > opts->delta) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(LLI_FORMAT, temp1_llong, temp2_llong, ABS(temp1_llong - temp2_llong));
}
@@ -2869,7 +2869,7 @@ static hsize_t diff_llong_element(unsigned char *mem1, unsigned char *mem2, hsiz
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(LLI_FORMAT_P_NOTCOMP, temp1_llong, temp2_llong, ABS(temp1_llong - temp2_llong));
}
@@ -2877,7 +2877,7 @@ static hsize_t diff_llong_element(unsigned char *mem1, unsigned char *mem2, hsiz
}
else if (per > opts->percent) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(LLI_FORMAT_P, temp1_llong, temp2_llong, ABS(temp1_llong - temp2_llong),per);
}
@@ -2890,7 +2890,7 @@ static hsize_t diff_llong_element(unsigned char *mem1, unsigned char *mem2, hsiz
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(LLI_FORMAT_P_NOTCOMP, temp1_llong, temp2_llong, ABS(temp1_llong - temp2_llong));
}
@@ -2898,7 +2898,7 @@ static hsize_t diff_llong_element(unsigned char *mem1, unsigned char *mem2, hsiz
}
else if (per > opts->percent && ABS(temp1_llong-temp2_llong) > opts->delta) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(LLI_FORMAT_P, temp1_llong, temp2_llong, ABS(temp1_llong - temp2_llong),per);
}
@@ -2908,7 +2908,7 @@ static hsize_t diff_llong_element(unsigned char *mem1, unsigned char *mem2, hsiz
else {
if (temp1_llong != temp2_llong) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(LLI_FORMAT, temp1_llong, temp2_llong, ABS(temp1_llong - temp2_llong));
}
@@ -2947,7 +2947,7 @@ static hsize_t diff_ullong_element(unsigned char *mem1, unsigned char *mem2, hsi
if (opts->delta_bool && !opts->percent_bool) {
if (PDIFF(temp1_ullong,temp2_ullong) > (unsigned long long) opts->delta) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(ULLI_FORMAT, temp1_ullong, temp2_ullong, PDIFF(temp1_ullong, temp2_ullong));
}
@@ -2962,7 +2962,7 @@ static hsize_t diff_ullong_element(unsigned char *mem1, unsigned char *mem2, hsi
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(ULLI_FORMAT_P_NOTCOMP, temp1_ullong, temp2_ullong, PDIFF(temp1_ullong, temp2_ullong));
}
@@ -2970,7 +2970,7 @@ static hsize_t diff_ullong_element(unsigned char *mem1, unsigned char *mem2, hsi
}
else if (per > opts->percent) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(ULLI_FORMAT_P, temp1_ullong, temp2_ullong, PDIFF(temp1_ullong,temp2_ullong), per);
}
@@ -2985,7 +2985,7 @@ static hsize_t diff_ullong_element(unsigned char *mem1, unsigned char *mem2, hsi
if (not_comparable && !both_zero) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(ULLI_FORMAT_P_NOTCOMP, temp1_ullong, temp2_ullong, PDIFF(temp1_ullong, temp2_ullong));
}
@@ -2993,7 +2993,7 @@ static hsize_t diff_ullong_element(unsigned char *mem1, unsigned char *mem2, hsi
}
else if (per > opts->percent && PDIFF(temp1_ullong,temp2_ullong) > (unsigned long long) opts->delta) {
opts->print_percentage = 1;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(ULLI_FORMAT_P, temp1_ullong, temp2_ullong, PDIFF(temp1_ullong, temp2_ullong), per);
}
@@ -3003,7 +3003,7 @@ static hsize_t diff_ullong_element(unsigned char *mem1, unsigned char *mem2, hsi
else {
if (temp1_ullong != temp2_ullong) {
opts->print_percentage = 0;
- print_pos(opts, elem_idx, -1);
+ print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
parallel_print(ULLI_FORMAT, temp1_ullong, temp2_ullong, PDIFF(temp1_ullong, temp2_ullong));
}
@@ -3254,7 +3254,7 @@ void print_header(diff_opt_t *opts)
*-------------------------------------------------------------------------
*/
static
-void print_pos(diff_opt_t *opts, hsize_t idx, ssize_t u)
+void print_pos(diff_opt_t *opts, hsize_t idx, size_t u)
{
int i,j;
@@ -3317,7 +3317,7 @@ void print_pos(diff_opt_t *opts, hsize_t idx, ssize_t u)
* Calculate the number of elements represented by a unit change in a
* certain index position.
*/
- calc_acc_pos(opts->rank, curr_pos, opts->acc, opts->pos);
+ calc_acc_pos((unsigned)opts->rank, curr_pos, opts->acc, opts->pos);
for (i = 0; i < opts->rank; i++) {
H5TOOLS_DEBUG("pos loop:%d with opts->pos=%ld opts->sm_pos=%ld", i, opts->pos[i], opts->sm_pos[i]);
@@ -3329,10 +3329,11 @@ void print_pos(diff_opt_t *opts, hsize_t idx, ssize_t u)
parallel_print("]");
}
else {
- if (u >= 0) {
+ if (opts->print_dims) {
parallel_print("[ ");
parallel_print("%zu", u);
parallel_print("]");
+ opts->print_dims = 0;
}
else
parallel_print(" ");
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 774859b..48663e2 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -333,7 +333,7 @@ hsize_t diff_attr_data(hid_t attr1_id, hid_t attr2_id,
hsize_t dims1[H5S_MAX_RANK]; /* dimensions of dataset */
hsize_t dims2[H5S_MAX_RANK]; /* dimensions of dataset */
hsize_t nfound = 0;
- int j;
+ size_t sz;
diff_err_t ret_value = opts->err_stat;
H5TOOLS_START_DEBUG(" - errstat:%d", opts->err_stat);
@@ -384,21 +384,19 @@ hsize_t diff_attr_data(hid_t attr1_id, hid_t attr2_id,
H5TOOLS_DEBUG("attr_names: %s - %s", name1, name2);
if (name1) {
- j = (int)HDstrlen(name1);
- H5TOOLS_DEBUG("attr1_name: %s - %d", name1, j);
- if (j > 0) {
- opts->obj_name[0] = (char *)HDcalloc((size_t)j + 1, sizeof(char));
- HDstrncpy(opts->obj_name[0], name1, (size_t)j);
- opts->obj_name[0][j] = '\0';
+ sz = HDstrlen(name1);
+ H5TOOLS_DEBUG("attr1_name: %s - %d", name1, sz);
+ if (sz > 0) {
+ opts->obj_name[0] = (char *)HDmalloc(sz + 1);
+ HDstrncpy(opts->obj_name[0], name1, sz + 1);
}
}
if (name2) {
- j = (int)HDstrlen(name2);
- H5TOOLS_DEBUG("attr2_name: %s - %d", name2, j);
- if (j > 0) {
- opts->obj_name[1] = (char *)HDcalloc((size_t)j + 1, sizeof(char));
- HDstrncpy(opts->obj_name[1], name2, (size_t)j);
- opts->obj_name[1][j] = '\0';
+ sz = HDstrlen(name2);
+ H5TOOLS_DEBUG("attr2_name: %s - %d", name2, sz);
+ if (sz > 0) {
+ opts->obj_name[1] = (char *)HDmalloc(sz + 1);
+ HDstrncpy(opts->obj_name[1], name2, sz + 1);
}
}
H5TOOLS_DEBUG("attr_names: %s - %s", opts->obj_name[0], opts->obj_name[1]);
@@ -406,6 +404,9 @@ hsize_t diff_attr_data(hid_t attr1_id, hid_t attr2_id,
/* pass dims1 and dims2 for maxdims as well since attribute's maxdims
* are always same */
if(diff_can_type(ftype1_id, ftype2_id, rank1, rank2, dims1, dims2, dims1, dims2, opts, 0) == 1) {
+
+ int j;
+
/*-----------------------------------------------------------------
* "upgrade" the smaller memory size
*------------------------------------------------------------------
@@ -424,7 +425,7 @@ hsize_t diff_attr_data(hid_t attr1_id, hid_t attr2_id,
opts->nelmts *= dims1[j];
}
opts->rank = rank1;
- init_acc_pos(opts->rank, opts->dims, opts->acc, opts->pos, opts->p_min_idx);
+ init_acc_pos((unsigned)opts->rank, opts->dims, opts->acc, opts->pos, opts->p_min_idx);
/*---------------------------------------------------------------------
* read
@@ -463,22 +464,18 @@ hsize_t diff_attr_data(hid_t attr1_id, hid_t attr2_id,
H5TOOLS_DEBUG("attr_names: %s - %s : %s - %s", name1, name2, path1, path2);
if (name1) {
- j = (int)HDstrlen(name1) + (int)HDstrlen(path1) + 7;
- H5TOOLS_DEBUG("attr1_name: %s - %d", name1, j);
- if (j > 0) {
- opts->obj_name[0] = (char *)HDcalloc((size_t)j + 1, sizeof(char));
- HDsnprintf(opts->obj_name[0], j, "%s of <%s>", name1, path1);
- opts->obj_name[0][j] = '\0';
- }
+ sz = HDstrlen(name1) + HDstrlen(path1) + 7;
+ H5TOOLS_DEBUG("attr1_name: %s - %d", name1, sz);
+ opts->obj_name[0] = (char *)HDcalloc(sz + 1, sizeof(char));
+ HDsnprintf(opts->obj_name[0], sz, "%s of <%s>", name1, path1);
+ opts->obj_name[0][sz] = '\0';
}
if (name2) {
- j = (int)HDstrlen(name2) + (int)HDstrlen(path2) + 7;
- H5TOOLS_DEBUG("attr2_name: %s - %d", name2, j);
- if (j > 0) {
- opts->obj_name[1] = (char *)HDcalloc((size_t)j + 1, sizeof(char));
- HDsnprintf(opts->obj_name[1], j, "%s of <%s>", name2, path2);
- opts->obj_name[1][j] = '\0';
- }
+ sz = HDstrlen(name2) + HDstrlen(path2) + 7;
+ H5TOOLS_DEBUG("attr2_name: %s - %d", name2, sz);
+ opts->obj_name[1] = (char *)HDcalloc(sz + 1, sizeof(char));
+ HDsnprintf(opts->obj_name[1], sz, "%s of <%s>", name2, path2);
+ opts->obj_name[1][sz] = '\0';
}
/*---------------------------------------------------------------------
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c
index 602255e..944440e 100644
--- a/tools/lib/h5diff_dset.c
+++ b/tools/lib/h5diff_dset.c
@@ -277,9 +277,8 @@ diff_datasetid(hid_t did1, hid_t did2, const char *obj1_name, const char *obj2_n
j = (int)HDstrlen(obj1_name);
H5TOOLS_DEBUG("obj1_name: %s - %d", obj1_name, j);
if (j > 0) {
- opts->obj_name[0] = (char *)HDcalloc((size_t)j + 1, sizeof(char));
- HDstrncpy(opts->obj_name[0], obj1_name, (size_t)j );
- opts->obj_name[0][j] = '\0';
+ opts->obj_name[0] = (char *)HDmalloc((size_t)j + 1);
+ HDstrncpy(opts->obj_name[0], obj1_name, (size_t)j + 1);
}
}
@@ -289,9 +288,8 @@ diff_datasetid(hid_t did1, hid_t did2, const char *obj1_name, const char *obj2_n
j = (int)HDstrlen(obj2_name);
H5TOOLS_DEBUG("obj2_name: %s - %d", obj2_name, j);
if (j > 0) {
- opts->obj_name[1] = (char *)HDcalloc((size_t)j + 1, sizeof(char));
- HDstrncpy(opts->obj_name[1], obj2_name, (size_t)j);
- opts->obj_name[1][j] = '\0';
+ opts->obj_name[1] = (char *)HDmalloc((size_t)j + 1);
+ HDstrncpy(opts->obj_name[1], obj2_name, (size_t)j + 1);
}
}
@@ -451,7 +449,7 @@ diff_datasetid(hid_t did1, hid_t did2, const char *obj1_name, const char *obj2_n
} /* end if */
/* Assume entire data space to be printed */
- init_acc_pos(opts->rank, opts->dims, opts->acc, opts->pos, opts->p_min_idx);
+ init_acc_pos((unsigned)opts->rank, opts->dims, opts->acc, opts->pos, opts->p_min_idx);
for(i = 0; i < opts->rank; i++) {
opts->p_max_idx[i] = opts->dims[i];
@@ -792,7 +790,7 @@ diff_datasetid(hid_t did1, hid_t did2, const char *obj1_name, const char *obj2_n
opts->sm_pos[j] = low[j];
/* Assume entire data space to be printed */
- init_acc_pos(opts->rank, opts->dims, opts->acc, opts->pos, opts->p_min_idx);
+ init_acc_pos((unsigned)opts->rank, opts->dims, opts->acc, opts->pos, opts->p_min_idx);
/* get array differences. in the case of hyperslab read, increment the number of differences
found in each hyperslab and pass the position at the beginning for printing */
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index d9c6715..55c69a7 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -1670,7 +1670,7 @@ calc_acc_pos(unsigned ndims, hsize_t elmtno, hsize_t *acc, hsize_t *pos)
H5TOOLS_START_DEBUG("");
if(ndims > 0) {
- for(i = 0; i < (size_t) ndims; i++) {
+ for(i = 0; i < (int)ndims; i++) {
if(curr_pos > 0) {
H5TOOLS_DEBUG("curr_pos=%ld - ctx->acc[%d]=%ld", curr_pos, i, acc[i]);
pos[i] = curr_pos / acc[i];
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 187ba18..b1be577 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -1252,7 +1252,6 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
size_t j; /* counters */
hsize_t zero[1] = {0}; /* vector of zeros */
unsigned int flags; /* buffer extent flags */
- hsize_t elmtno; /* elemnt index */
hsize_t low[H5S_MAX_RANK]; /* low bound of hyperslab */
hsize_t high[H5S_MAX_RANK]; /* higher bound of hyperslab */
size_t p_type_nbytes; /* size of memory type */
@@ -1565,9 +1564,8 @@ static herr_t
h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t dset, hid_t p_type)
{
int sndims;
- hid_t f_space = H5I_INVALID_HID; /* file data space */
- size_t i; /* counters */
- hsize_t total_size[H5S_MAX_RANK];/* total size of dataset*/
+ hid_t f_space = H5I_INVALID_HID; /* file data space */
+ hsize_t total_size[H5S_MAX_RANK]; /* total size of dataset*/
hbool_t past_catch = FALSE;
herr_t ret_value = SUCCEED;
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index d612fbd..1c573a7 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -286,17 +286,14 @@ h5tools_str_prefix(h5tools_str_t *str/*in,out*/, const h5tool_format_t *info, hs
h5tools_context_t *ctx)
{
size_t i = 0;
- hsize_t curr_pos = elmtno;
H5TOOLS_START_DEBUG("");
H5TOOLS_DEBUG("elmtno=%ld, ctx->ndims=%d", elmtno, ctx->ndims);
h5tools_str_reset(str);
- curr_pos = calc_acc_pos(ctx->ndims, elmtno, ctx->acc, ctx->pos);
+ calc_acc_pos(ctx->ndims, elmtno, ctx->acc, ctx->pos);
if(ctx->ndims > 0) {
- HDassert(curr_pos == 0);
-
/* Print the index values */
for(i = 0; i < (size_t) ctx->ndims; i++) {
if (i)
@@ -329,17 +326,14 @@ h5tools_str_region_prefix(h5tools_str_t *str/*in,out*/, const h5tool_format_t *i
hsize_t *ptdata, h5tools_context_t *ctx)
{
size_t i = 0;
- hsize_t curr_pos = elmtno;
H5TOOLS_START_DEBUG("");
H5TOOLS_DEBUG("elmtno=%ld, ctx->ndims=%d", elmtno, ctx->ndims);
h5tools_str_reset(str);
- curr_pos = calc_acc_pos(ctx->ndims, elmtno, ctx->acc, ctx->pos);
+ calc_acc_pos(ctx->ndims, elmtno, ctx->acc, ctx->pos);
if(ctx->ndims > 0) {
- HDassert(curr_pos == 0);
-
/* Print the index values */
for(i = 0; i < (size_t) ctx->ndims; i++) {
ctx->pos[i] += (unsigned long) ptdata[ctx->sm_pos+i];
@@ -678,6 +672,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
if(info->raw) {
size_t i;
+ H5TOOLS_DEBUG("info->raw");
if(1 == nsize)
h5tools_str_append(str, OPT(info->fmt_raw, "0x%02x"), ucp_vp[0]);
else
@@ -688,8 +683,11 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
}
}
else {
- if((type_class = H5Tget_class(type)) < 0)
+ H5TOOLS_DEBUG("H5Tget_class(type)");
+ if((type_class = H5Tget_class(type)) < 0) {
+ H5TOOLS_ENDDEBUG(" with %s", "NULL");
return NULL;
+ }
switch (type_class) {
case H5T_FLOAT:
H5TOOLS_DEBUG("H5T_FLOAT");
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c
index a02ad5a..a4fe3bb 100644
--- a/tools/src/h5diff/h5diff_common.c
+++ b/tools/src/h5diff/h5diff_common.c
@@ -90,6 +90,7 @@ static void check_options(diff_opt_t* opts)
* Return: <none>
*-------------------------------------------------------------------------
*/
+#if 0
static void
parse_hsize_list(const char *h_list, subset_d *d)
{
@@ -139,6 +140,7 @@ parse_hsize_list(const char *h_list, subset_d *d)
d->len = size_count;
H5TOOLS_ENDDEBUG("");
}
+#endif
/*-------------------------------------------------------------------------
* Function: parse_subset_params
@@ -149,6 +151,7 @@ parse_hsize_list(const char *h_list, subset_d *d)
* Failure: NULL
*-------------------------------------------------------------------------
*/
+#if 0
static struct subset_t *
parse_subset_params(const char *dset)
{
@@ -190,7 +193,7 @@ parse_subset_params(const char *dset)
return s;
}
-
+#endif
/*-------------------------------------------------------------------------
* Function: parse_command_line
diff --git a/tools/src/h5format_convert/h5format_convert.c b/tools/src/h5format_convert/h5format_convert.c
index d63f36f..e60097b 100644
--- a/tools/src/h5format_convert/h5format_convert.c
+++ b/tools/src/h5format_convert/h5format_convert.c
@@ -64,7 +64,7 @@ static struct long_options l_opts[] = {
{ NULL, 0, '\0' }
};
-
+
/*-------------------------------------------------------------------------
* Function: usage
*
@@ -185,7 +185,7 @@ error:
return(-1); ;
} /* parse_command_line() */
-
+
/*-------------------------------------------------------------------------
* Function: leave
*
@@ -387,7 +387,7 @@ error:
return -1;
} /* end convert_dsets_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: main
*
diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c
index b11fe7f..4a642e0 100644
--- a/tools/src/h5import/h5import.c
+++ b/tools/src/h5import/h5import.c
@@ -3735,8 +3735,8 @@ static int getExternalFilename(struct Input *in, FILE *strm)
return (-1);
}
- in->externFilename = (char *) HDmalloc ((size_t) (HDstrlen(temp)) * sizeof(char));
- (void) HDstrcpy(in->externFilename, temp);
+ in->externFilename = (char *) HDmalloc ((size_t) (HDstrlen(temp) + 1) * sizeof(char));
+ (void) HDstrncpy(in->externFilename, temp, HDstrlen(temp) + 1);
return (0);
}
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index fef7aa9..e239cbc 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -1313,7 +1313,6 @@ dump_dataset_values(hid_t dset)
hid_t space = H5I_INVALID_HID;
hsize_t total_size[H5S_MAX_RANK];
int ndims;
- size_t i;
char string_prefix[64];
static char fmt_double[16];
static char fmt_float[16];
@@ -1481,7 +1480,6 @@ dump_attribute_values(hid_t attr)
hid_t space = H5I_INVALID_HID;
hsize_t total_size[H5S_MAX_RANK];
int ndims;
- size_t i;
char string_prefix[64];
static char fmt_double[16];
static char fmt_float[16];
diff --git a/tools/src/misc/h5mkgrp.c b/tools/src/misc/h5mkgrp.c
index 4d2d2b8..ad3b7b8 100644
--- a/tools/src/misc/h5mkgrp.c
+++ b/tools/src/misc/h5mkgrp.c
@@ -49,7 +49,7 @@ typedef struct mkgrp_opt_t {
mkgrp_opt_t params_g; /* Command line parameter settings */
-
+
/*-------------------------------------------------------------------------
* Function: leave
*
@@ -81,7 +81,7 @@ leave(int ret)
HDexit(ret);
} /* end leave() */
-
+
/*-------------------------------------------------------------------------
* Function: usage
*
@@ -113,7 +113,7 @@ usage(const char *prog)
PRINTVALSTREAM(rawoutstream, "\n");
} /* end usage() */
-
+
/*-------------------------------------------------------------------------
* Function: parse_command_line
*
@@ -248,7 +248,7 @@ parse_command_line(int argc, const char *argv[], mkgrp_opt_t *options)
return 0;
} /* parse_command_line() */
-
+
/*-------------------------------------------------------------------------
* Function: main
*
diff --git a/tools/test/h5copy/testh5copy.sh.in b/tools/test/h5copy/testh5copy.sh.in
index 2440ca4..84e3b65 100644
--- a/tools/test/h5copy/testh5copy.sh.in
+++ b/tools/test/h5copy/testh5copy.sh.in
@@ -200,6 +200,7 @@ TOOLTEST()
fi
runh5diff=no
fi
+
if [ "$3" = -o ]; then
outputfile=$4
else
@@ -219,6 +220,7 @@ TOOLTEST()
$RUNSERIAL $H5COPY_BIN $@
) > $actualout 2> $actualerr
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -268,6 +270,7 @@ TOOLTEST_PREFILL()
$RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $grp_name -d $grp_name2
) > $actualout 2> $actualerr
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -282,6 +285,7 @@ TOOLTEST_PREFILL()
$RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $obj_name -d $obj_name2
) > $actualout 2> $actualerr
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -313,6 +317,7 @@ TOOLTEST_SAME()
else
runh5diff=no
fi
+
if [ "$3" = -o ]; then
outputfile=$4
else
@@ -330,6 +335,7 @@ TOOLTEST_SAME()
$RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $grp_name -d $grp_name
) > $actualout 2> $actualerr
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -344,6 +350,7 @@ TOOLTEST_SAME()
$RUNSERIAL $H5COPY_BIN -i $outputfile -o $outputfile -v -s $grp_name -d $grp_name2
) > $actualout 2> $actualerr
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -406,6 +413,7 @@ TOOLTEST_FAIL()
if [ "$1" = -i ]; then
inputfile=$2
fi
+
if [ "$3" = -o ]; then
outputfile=$4
fi
@@ -417,8 +425,8 @@ TOOLTEST_FAIL()
#echo "#############################"
$RUNSERIAL $H5COPY_BIN $@
) > $actualout 2> $actualerr
-
RET=$?
+
# save actualout and actualerr in case they are needed later.
cp $actualout $actualout_sav
STDOUT_FILTER $actualout
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake
index 43c8c15..5aa1d1a 100644
--- a/tools/test/h5diff/CMakeTests.cmake
+++ b/tools/test/h5diff/CMakeTests.cmake
@@ -66,10 +66,10 @@
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/non_comparables2.h5
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/tudfilter.h5
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/tudfilter2.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/diff_strings1.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/diff_strings2.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/diff_eps1.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/diff_eps2.h5
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_strings1.h5
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_strings2.h5
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_eps1.h5
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_eps2.h5
# tools/testfiles/vds
${HDF5_TOOLS_DIR}/testfiles/vds/1_a.h5
${HDF5_TOOLS_DIR}/testfiles/vds/1_b.h5
@@ -341,9 +341,10 @@
# Overwrite system dependent files (Windows) and not VS2015
#
set (COPY_WINDOWS_FILES false)
- if (MINGW)
- set (COPY_WINDOWS_FILES true)
- endif ()
+ # MinGW tests may depend on host system
+ #if (MINGW)
+ # set (COPY_WINDOWS_FILES true)
+ #endif ()
if (WIN32 AND MSVC_VERSION LESS 1900)
set (COPY_WINDOWS_FILES true)
endif ()
@@ -542,11 +543,11 @@
set (ATTR_VERBOSE_LEVEL_FILE1 h5diff_attr_v_level1.h5)
set (ATTR_VERBOSE_LEVEL_FILE2 h5diff_attr_v_level2.h5)
# strings
- set (STRINGS1 diff_strings1.h5)
- set (STRINGS2 diff_strings2.h5)
+ set (STRINGS1 h5diff_strings1.h5)
+ set (STRINGS2 h5diff_strings2.h5)
# epsilon
- set (EPS1 diff_eps1.h5)
- set (EPS2 diff_eps2.h5)
+ set (EPS1 h5diff_eps1.h5)
+ set (EPS2 h5diff_eps2.h5)
# VDS tests
set (FILEV1 1_vds.h5)
diff --git a/tools/test/h5diff/h5diff_plugin.sh.in b/tools/test/h5diff/h5diff_plugin.sh.in
index 341cba5..ffc43da 100644
--- a/tools/test/h5diff/h5diff_plugin.sh.in
+++ b/tools/test/h5diff/h5diff_plugin.sh.in
@@ -135,24 +135,24 @@ CLEAN_TESTFILES_AND_TESTDIR()
# -h print help page
while [ $# -gt 0 ]; do
case "$1" in
- -p) # reset the tool name and bin to run ph5diff tests
- TESTNAME=ph5diff
- H5DIFF=../../src/h5diff/ph5diff # The tool name
- H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary
- pmode=yes
- shift
- ;;
+ -p) # reset the tool name and bin to run ph5diff tests
+ TESTNAME=ph5diff
+ H5DIFF=../../src/h5diff/ph5diff # The tool name
+ H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary
+ pmode=yes
+ shift
+ ;;
-h) # print help page
- echo "$0 [-p] [-h]"
- echo " -p run ph5diff tests"
- echo " -h print help page"
- shift
- exit 0
- ;;
+ echo "$0 [-p] [-h]"
+ echo " -p run ph5diff tests"
+ echo " -h print help page"
+ shift
+ exit 0
+ ;;
*) # unknown option
echo "$0: Unknown option ($1)"
- exit 1
- ;;
+ exit 1
+ ;;
esac
done
@@ -218,19 +218,21 @@ TOOLTEST() {
# Run test.
TESTING $H5DIFF $@
(
- #echo "#############################"
- #echo "Expected output for '$H5DIFF $@'"
- #echo "#############################"
- cd $TESTDIR
- eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@"
+ #echo "#############################"
+ #echo "Expected output for '$H5DIFF $@'"
+ #echo "#############################"
+ cd $TESTDIR
+ eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@"
) >$actual 2>$actual_err
EXIT_CODE=$?
+
# save actual and actual_err in case they are needed later.
cp $actual $actual_sav
STDOUT_FILTER $actual
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
cat $actual_err >> $actual
+
# don't add exit code check in pmode, as it causes failure. (exit code
# is from mpirun not tool)
# if any problem occurs relate to an exit code, it will be caught in
@@ -260,27 +262,29 @@ TOOLTEST() {
actual_sorted=actual_sorted
sort $expect -o $expect_sorted
sort $actual -o $actual_sorted
+
# remove "EXIT CODE:" line from expect file. test for exit code
# is done by serial mode.
grep -v "EXIT CODE:" $expect_sorted > $expect_sorted.noexit
mv $expect_sorted.noexit $expect_sorted
- if $CMP $expect_sorted $actual_sorted; then
- echo " PASSED"
- else
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
- if test yes = "$verbose"; then
- echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
- $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
- echo "====The actual output ($actual_sav)"
- sed 's/^/ /' < $actual_sav
- echo "====The actual stderr ($actual_err_sav)"
- sed 's/^/ /' < $actual_err_sav
- echo "====End of actual stderr ($actual_err_sav)"
- echo ""
+
+ if $CMP $expect_sorted $actual_sorted; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ if test yes = "$verbose"; then
+ echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
+ $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
+ echo "====The actual output ($actual_sav)"
+ sed 's/^/ /' < $actual_sav
+ echo "====The actual stderr ($actual_err_sav)"
+ sed 's/^/ /' < $actual_err_sav
+ echo "====End of actual stderr ($actual_err_sav)"
+ echo ""
+ fi
fi
fi
- fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
@@ -306,18 +310,20 @@ TOOLTEST_ERR() {
# Run test.
TESTING $H5DIFF $@
(
- #echo "#############################"
- #echo "Expected output for '$H5DIFF $@'"
- #echo "#############################"
- cd $TESTDIR
- eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@"
+ #echo "#############################"
+ #echo "Expected output for '$H5DIFF $@'"
+ #echo "#############################"
+ cd $TESTDIR
+ eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@"
) >$actual 2>$actual_err
EXIT_CODE=$?
+
# save actual and actual_err in case they are needed later.
cp $actual $actual_sav
STDOUT_FILTER $actual
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
+
# don't add exit code check in pmode, as it causes failure. (exit code
# is from mpirun not tool)
# if any problem occurs relate to an exit code, it will be caught in
@@ -348,23 +354,24 @@ TOOLTEST_ERR() {
sort $expect_err -o $expect_sorted
sort $actual_err -o $actual_sorted
mv $expect_sorted.noexit $expect_sorted
- if $CMP $expect_sorted $actual_sorted; then
- echo " PASSED"
- else
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
- if test yes = "$verbose"; then
- echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
- $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
- echo "====The actual output ($actual_sav)"
- sed 's/^/ /' < $actual_sav
- echo "====The actual stderr ($actual_err_sav)"
- sed 's/^/ /' < $actual_err_sav
- echo "====End of actual stderr ($actual_err_sav)"
- echo ""
+
+ if $CMP $expect_sorted $actual_sorted; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ if test yes = "$verbose"; then
+ echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
+ $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
+ echo "====The actual output ($actual_sav)"
+ sed 's/^/ /' < $actual_sav
+ echo "====The actual stderr ($actual_err_sav)"
+ sed 's/^/ /' < $actual_err_sav
+ echo "====End of actual stderr ($actual_err_sav)"
+ echo ""
+ fi
fi
fi
- fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c
index df79aa1..bdc2ddc 100644
--- a/tools/test/h5diff/h5diffgentest.c
+++ b/tools/test/h5diff/h5diffgentest.c
@@ -94,11 +94,11 @@ size_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024);
#define NON_COMPARBLES1 "non_comparables1.h5"
#define NON_COMPARBLES2 "non_comparables2.h5"
/* string dataset and attribute */
-#define DIFF_STRINGS1 "diff_strings1.h5"
-#define DIFF_STRINGS2 "diff_strings2.h5"
+#define DIFF_STRINGS1 "h5diff_strings1.h5"
+#define DIFF_STRINGS2 "h5diff_strings2.h5"
/* double dataset and epsilon */
-#define DIFF_EPS1 "diff_eps1.h5"
-#define DIFF_EPS2 "diff_eps2.h5"
+#define DIFF_EPS1 "h5diff_eps1.h5"
+#define DIFF_EPS2 "h5diff_eps2.h5"
#define UIMAX 4294967295u /*Maximum value for a variable of type unsigned int */
#define STR_SIZE 3
diff --git a/tools/test/h5diff/testfiles/h5diff_eps.txt b/tools/test/h5diff/testfiles/h5diff_eps.txt
index ef48cb6..3a71366 100644
--- a/tools/test/h5diff/testfiles/h5diff_eps.txt
+++ b/tools/test/h5diff/testfiles/h5diff_eps.txt
@@ -1,5 +1,5 @@
-file1: diff_eps1.h5
-file2: diff_eps2.h5
+file1: h5diff_eps1.h5
+file2: h5diff_eps2.h5
file1 file2
---------------------------------------
diff --git a/tools/test/h5diff/testfiles/diff_eps1.h5 b/tools/test/h5diff/testfiles/h5diff_eps1.h5
index 2803a1d..2803a1d 100644
--- a/tools/test/h5diff/testfiles/diff_eps1.h5
+++ b/tools/test/h5diff/testfiles/h5diff_eps1.h5
Binary files differ
diff --git a/tools/test/h5diff/testfiles/diff_eps2.h5 b/tools/test/h5diff/testfiles/h5diff_eps2.h5
index 4acf27a..4acf27a 100644
--- a/tools/test/h5diff/testfiles/diff_eps2.h5
+++ b/tools/test/h5diff/testfiles/h5diff_eps2.h5
Binary files differ
diff --git a/tools/test/h5diff/testfiles/diff_strings1.h5 b/tools/test/h5diff/testfiles/h5diff_strings1.h5
index 0f8b380..0f8b380 100644
--- a/tools/test/h5diff/testfiles/diff_strings1.h5
+++ b/tools/test/h5diff/testfiles/h5diff_strings1.h5
Binary files differ
diff --git a/tools/test/h5diff/testfiles/diff_strings2.h5 b/tools/test/h5diff/testfiles/h5diff_strings2.h5
index e8520ae..e8520ae 100644
--- a/tools/test/h5diff/testfiles/diff_strings2.h5
+++ b/tools/test/h5diff/testfiles/h5diff_strings2.h5
Binary files differ
diff --git a/tools/test/h5diff/testh5diff.sh.in b/tools/test/h5diff/testh5diff.sh.in
index 84330ec..9f88ee1 100644
--- a/tools/test/h5diff/testh5diff.sh.in
+++ b/tools/test/h5diff/testh5diff.sh.in
@@ -120,10 +120,10 @@ $SRC_H5DIFF_TESTFILES/h5diff_attr_v_level2.h5
$SRC_H5DIFF_TESTFILES/h5diff_enum_invalid_values.h5
$SRC_H5DIFF_TESTFILES/non_comparables1.h5
$SRC_H5DIFF_TESTFILES/non_comparables2.h5
-$SRC_H5DIFF_TESTFILES/diff_strings1.h5
-$SRC_H5DIFF_TESTFILES/diff_strings2.h5
-$SRC_H5DIFF_TESTFILES/diff_eps1.h5
-$SRC_H5DIFF_TESTFILES/diff_eps2.h5
+$SRC_H5DIFF_TESTFILES/h5diff_strings1.h5
+$SRC_H5DIFF_TESTFILES/h5diff_strings2.h5
+$SRC_H5DIFF_TESTFILES/h5diff_eps1.h5
+$SRC_H5DIFF_TESTFILES/h5diff_eps2.h5
$SRC_TOOLS_TESTFILES/tvlstr.h5
"
@@ -500,18 +500,20 @@ TOOLTEST() {
# Run test.
TESTING $H5DIFF $@
(
- #echo "#############################"
- #echo "Expected output for '$H5DIFF $@'"
- #echo "#############################"
- cd $TESTDIR
- eval $RUNCMD $H5DIFF_BIN "$@"
+ #echo "#############################"
+ #echo "Expected output for '$H5DIFF $@'"
+ #echo "#############################"
+ cd $TESTDIR
+ eval $RUNCMD $H5DIFF_BIN "$@"
) >$actual 2>$actual_err
EXIT_CODE=$?
+
# save actual and actual_err in case they are needed later.
cp $actual $actual_sav
STDOUT_FILTER $actual
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
+
# don't add exit code check in pmode, as it causes failure. (exit code
# is from mpirun not tool)
# if any problem occurs relate to an exit code, it will be caught in
@@ -545,23 +547,24 @@ TOOLTEST() {
# is done by serial mode.
grep -v "EXIT CODE:" $expect_sorted > $expect_sorted.noexit
mv $expect_sorted.noexit $expect_sorted
- if $CMP $expect_sorted $actual_sorted; then
- echo " PASSED"
- else
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
- if test yes = "$verbose"; then
- echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
- $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
- echo "====The actual output ($actual_sav)"
- sed 's/^/ /' < $actual_sav
- echo "====The actual stderr ($actual_err_sav)"
- sed 's/^/ /' < $actual_err_sav
- echo "====End of actual stderr ($actual_err_sav)"
- echo ""
+
+ if $CMP $expect_sorted $actual_sorted; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ if test yes = "$verbose"; then
+ echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
+ $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
+ echo "====The actual output ($actual_sav)"
+ sed 's/^/ /' < $actual_sav
+ echo "====The actual stderr ($actual_err_sav)"
+ sed 's/^/ /' < $actual_err_sav
+ echo "====End of actual stderr ($actual_err_sav)"
+ echo ""
+ fi
fi
fi
- fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
@@ -723,10 +726,10 @@ TOOLTEST h5diff_59.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset11a dset11b
# Strings
# ( HDFFV-10128 )
-TOOLTEST h5diff_60.txt -v diff_strings1.h5 diff_strings2.h5 string1 string1
-TOOLTEST h5diff_61.txt -v diff_strings1.h5 diff_strings2.h5 string2 string2
-TOOLTEST h5diff_62.txt -v diff_strings1.h5 diff_strings2.h5 string3 string3
-TOOLTEST h5diff_63.txt -v diff_strings1.h5 diff_strings2.h5 string4 string4
+TOOLTEST h5diff_60.txt -v h5diff_strings1.h5 h5diff_strings2.h5 string1 string1
+TOOLTEST h5diff_61.txt -v h5diff_strings1.h5 h5diff_strings2.h5 string2 string2
+TOOLTEST h5diff_62.txt -v h5diff_strings1.h5 h5diff_strings2.h5 string3 string3
+TOOLTEST h5diff_63.txt -v h5diff_strings1.h5 h5diff_strings2.h5 string4 string4
# ##############################################################################
# # Error messages
@@ -770,7 +773,7 @@ TOOLTEST h5diff_609.txt -d 200 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dse
TOOLTEST h5diff_610.txt -d 1 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# eps: number smaller than epsilon
-TOOLTEST h5diff_eps.txt -v3 -d 1e-16 diff_eps1.h5 diff_eps2.h5
+TOOLTEST h5diff_eps.txt -v3 -d 1e-16 h5diff_eps1.h5 h5diff_eps2.h5
# ##############################################################################
diff --git a/tools/test/h5dump/h5dump_plugin.sh.in b/tools/test/h5dump/h5dump_plugin.sh.in
index 6a00a16..d940ab3 100644
--- a/tools/test/h5dump/h5dump_plugin.sh.in
+++ b/tools/test/h5dump/h5dump_plugin.sh.in
@@ -181,8 +181,8 @@ TOOLTEST() {
# Run test.
TESTING $H5DUMP $@
(
- cd $TESTDIR
- $ENVCMD $RUNSERIAL $H5DUMP_BIN "$@"
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $H5DUMP_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -192,24 +192,24 @@ TOOLTEST() {
STDERR_FILTER $actual_err
cat $actual_err >> $actual
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual > /dev/null 2>&1 ; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
+ rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
fi
}
diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in
index 53c8927..b69346e 100644
--- a/tools/test/h5dump/testh5dump.sh.in
+++ b/tools/test/h5dump/testh5dump.sh.in
@@ -465,14 +465,14 @@ TESTING() {
TOOLTEST() {
# check if caseless compare and diff requested
if [ "$1" = ignorecase ]; then
- caseless="-i"
- # replace cmp with diff which runs much longer.
- xCMP="$DIFF -i"
- shift
+ caseless="-i"
+ # replace cmp with diff which runs much longer.
+ xCMP="$DIFF -i"
+ shift
else
- caseless=""
- # stick with faster cmp if ignorecase is not requested.
- xCMP="$CMP"
+ caseless=""
+ # stick with faster cmp if ignorecase is not requested.
+ xCMP="$CMP"
fi
expect="$TESTDIR/$1"
@@ -485,8 +485,8 @@ TOOLTEST() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -495,24 +495,24 @@ TOOLTEST() {
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $xCMP $expect $actual > /dev/null 2>&1 ; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
+ rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
fi
}
@@ -534,41 +534,41 @@ TOOLTEST2() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expect $actual; then
- if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
+ # Create the expect file if it doesn't yet exist.
echo " CREATED"
- cp $actualdata $expectdata
- echo " Expected data (*.exp) missing"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
nerrors="`expr $nerrors + 1`"
- elif $CMP $expectdata $actualdata; then
- echo " PASSED"
- else
+ elif $CMP $expect $actual; then
+ if [ ! -f $expectdata ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ echo " Expected data (*.exp) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expectdata $actualdata; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
+ fi
+ else
echo "*FAILED*"
- echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
- fi
- else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actualdata $actual_err
+ rm -f $actual $actualdata $actual_err
fi
}
@@ -592,56 +592,55 @@ TOOLTEST2A() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expect $actual; then
- if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
+ # Create the expect file if it doesn't yet exist.
echo " CREATED"
- cp $actualdata $expectdata
- echo " Expected data (*.exp) missing"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
nerrors="`expr $nerrors + 1`"
- elif $DIFF $expectdata $actualdata; then
- if [ ! -f $expectmeta ]; then
- # Create the expect meta file if it doesn't yet exist.
- echo " CREATED"
- cp $actualmeta $expectmeta
- echo " Expected metafile (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expectmeta $actualmeta; then
- echo " PASSED"
+ elif $CMP $expect $actual; then
+ if [ ! -f $expectdata ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ echo " Expected data (*.exp) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $DIFF $expectdata $actualdata; then
+ if [ ! -f $expectmeta ]; then
+ # Create the expect meta file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualmeta $expectmeta
+ echo " Expected metafile (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expectmeta $actualmeta; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected metafile (*.ddl) differs from actual metafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectmeta $actualmeta |sed 's/^/ /'
+ fi
else
- echo "*FAILED*"
- echo " Expected metafile (*.ddl) differs from actual metafile (*.txt)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectmeta $actualmeta |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
fi
- else
+ else
echo "*FAILED*"
- echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
- fi
- else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actualdata $actual_err $actualmeta
+ rm -f $actual $actualdata $actual_err $actualmeta
fi
-
}
# same as TOOLTEST2 but only compares the generated data file to the expected data file
@@ -658,28 +657,28 @@ TOOLTEST2B() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
- echo " CREATED"
- cp $actualdata $expectdata
- echo " Expected data (*.exp) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ echo " Expected data (*.exp) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expectdata $actualdata; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actualdata $actual_err
+ rm -f $actual $actualdata $actual_err
fi
}
@@ -699,8 +698,8 @@ TOOLTEST3() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -719,23 +718,23 @@ TOOLTEST3() {
$actual_err > $actual_ext
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
}
@@ -757,8 +756,8 @@ TOOLTEST4() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $ENVCMD $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -777,30 +776,30 @@ TOOLTEST4() {
$actual_err > $actual_ext
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- if $CMP $expect_err $actual_ext; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.err) differs from actual result (*.oerr)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
- fi
+ if $CMP $expect_err $actual_ext; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.err) differs from actual result (*.oerr)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
+ fi
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
}
@@ -822,8 +821,8 @@ TOOLTEST5() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $ENVCMD $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -842,33 +841,33 @@ TOOLTEST5() {
$actual_err > $actual_ext
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- if $CMP $expect_err $actual_ext; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.err) differs from actual result (*.oerr)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
- fi
+ if $CMP $expect_err $actual_ext; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.err) differs from actual result (*.oerr)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
+ fi
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
-
}
+
# ADD_HELP_TEST
TOOLTEST_HELP() {
@@ -880,27 +879,27 @@ TOOLTEST_HELP() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect-CREATED
- echo " Expected output (*.txt) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect-CREATED
+ echo " Expected output (*.txt) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected output (*.txt) differs from actual output (*.out)"
- nerrors="`expr $nerrors + 1`"
+ echo "*FAILED*"
+ echo " Expected output (*.txt) differs from actual output (*.out)"
+ nerrors="`expr $nerrors + 1`"
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err
+ rm -f $actual $actual_err
fi
}
@@ -920,14 +919,16 @@ GREPTEST()
# Run test.
TESTING $DUMPER -p $@
(
- cd $TESTDIR
- $ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
) >$actual 2>$actual_err
+
if [ "$txttype" = "ERRTXT" ]; then
$GREP "$expectdata" $actual_err > /dev/null
else
$GREP "$expectdata" $actual > /dev/null
fi
+
if [ $? -eq 0 ]; then
echo " PASSED"
else
@@ -937,7 +938,7 @@ GREPTEST()
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err
+ rm -f $actual $actual_err
fi
}
@@ -956,14 +957,16 @@ GREPTEST2()
# Run test.
TESTING $DUMPER -p $@
(
- cd $TESTDIR
- $ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
) >$actual 2>$actual_err
+
if [ "$txttype" = "ERRTXT" ]; then
$GREP "$expectdata" $actual_err > /dev/null
else
$GREP "$expectdata" $actual > /dev/null
fi
+
if [ $? -eq 0 ]; then
echo " PASSED"
else
@@ -973,21 +976,21 @@ GREPTEST2()
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err
+ rm -f $actual $actual_err
fi
}
# Print a "SKIP" message
SKIP() {
- TESTING $DUMPER $@
+ TESTING $DUMPER $@
echo " -SKIP-"
}
# Print a line-line message left justified in a field of 70 characters
#
PRINT_H5DIFF() {
- SPACES=" "
- echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
}
@@ -997,10 +1000,11 @@ DIFFTEST()
{
PRINT_H5DIFF $@
(
- cd $TESTDIR
- $RUNSERIAL $H5DIFF_BIN "$@" -q
+ cd $TESTDIR
+ $RUNSERIAL $H5DIFF_BIN "$@" -q
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
@@ -1014,8 +1018,8 @@ DIFFTEST()
# beginning with the word "Verifying".
#
PRINT_H5IMPORT() {
- SPACES=" "
- echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
}
# Call the h5import tool
@@ -1025,15 +1029,16 @@ IMPORTTEST()
# remove the output hdf5 file if it exists
hdf5_file="$TESTDIR/$5"
if [ -f $hdf5_file ]; then
- rm -f $hdf5_file
+ rm -f $hdf5_file
fi
PRINT_H5IMPORT $@
(
- cd $TESTDIR
- $RUNSERIAL $H5IMPORT_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $H5IMPORT_BIN "$@"
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
@@ -1138,9 +1143,9 @@ TOOLTEST tcomp-4.ddl --enable-error-stack tcompound_complex.h5
TOOLTEST tcompound_complex2.ddl --enable-error-stack tcompound_complex2.h5
# tests for bitfields and opaque data types
if test $WORDS_BIGENDIAN != "yes"; then
-TOOLTEST tbitnopaque_le.ddl --enable-error-stack tbitnopaque.h5
+ TOOLTEST tbitnopaque_le.ddl --enable-error-stack tbitnopaque.h5
else
-TOOLTEST tbitnopaque_be.ddl --enable-error-stack tbitnopaque.h5
+ TOOLTEST tbitnopaque_be.ddl --enable-error-stack tbitnopaque.h5
fi
#test for the nested compound type
@@ -1318,12 +1323,12 @@ TOOLTEST tallfilters.ddl --enable-error-stack -H -p -d all tfilters.h5
TOOLTEST tuserfilter.ddl --enable-error-stack -H -p -d myfilter tfilters.h5
if test $USE_FILTER_DEFLATE = "yes" ; then
- # data read internal filters
- TOOLTEST treadintfilter.ddl --enable-error-stack -d deflate -d shuffle -d fletcher32 -d nbit -d scaleoffset tfilters.h5
- if test $USE_FILTER_SZIP = "yes"; then
- # data read
- TOOLTEST treadfilter.ddl --enable-error-stack -d all -d szip tfilters.h5
- fi
+ # data read internal filters
+ TOOLTEST treadintfilter.ddl --enable-error-stack -d deflate -d shuffle -d fletcher32 -d nbit -d scaleoffset tfilters.h5
+ if test $USE_FILTER_SZIP = "yes"; then
+ # data read
+ TOOLTEST treadfilter.ddl --enable-error-stack -d all -d szip tfilters.h5
+ fi
fi
# test for displaying objects with very long names
@@ -1380,9 +1385,9 @@ TOOLTEST tbin4.ddl --enable-error-stack -d double -b FILE -o out4.bin tbin
# Clean up binary output files
if test -z "$HDF5_NOCLEANUP"; then
- rm -f out[1-4].bin
- rm -f out1.h5
- rm -f out3.h5
+ rm -f out[1-4].bin
+ rm -f out1.h5
+ rm -f out3.h5
fi
# test for dataset region references
@@ -1394,7 +1399,7 @@ TOOLTEST2 tbinregR.exp --enable-error-stack -d /Dataset1 -s 0 -R -y -o tbinregR.
# Clean up text output files
if test -z "$HDF5_NOCLEANUP"; then
- rm -f tbinregR.txt
+ rm -f tbinregR.txt
fi
# tests for group creation order
diff --git a/tools/test/h5dump/testh5dumppbits.sh.in b/tools/test/h5dump/testh5dumppbits.sh.in
index febce2c..ff0659a 100644
--- a/tools/test/h5dump/testh5dumppbits.sh.in
+++ b/tools/test/h5dump/testh5dumppbits.sh.in
@@ -236,26 +236,25 @@ TOOLTEST() {
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
+ rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
fi
-
}
@@ -274,36 +273,36 @@ TOOLTEST2() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expect $actual; then
- if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
+ # Create the expect file if it doesn't yet exist.
echo " CREATED"
- cp $actualdata $expectdata
- echo " Expected data (*.exp) missing"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
nerrors="`expr $nerrors + 1`"
- elif $CMP $expectdata $actualdata; then
- echo " PASSED"
- else
+ elif $CMP $expect $actual; then
+ if [ ! -f $expectdata ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ echo " Expected data (*.exp) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expectdata $actualdata; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
+ fi
+ else
echo "*FAILED*"
- echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
- fi
- else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
@@ -328,8 +327,8 @@ TOOLTEST3() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -348,23 +347,23 @@ TOOLTEST3() {
$actual_err > $actual_ext
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
}
@@ -385,8 +384,8 @@ TOOLTEST4() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -405,30 +404,30 @@ TOOLTEST4() {
$actual_err > $actual_ext
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- if $CMP $expect_err $actual_ext; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.err) differs from actual result (*.oerr)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
- fi
+ if $CMP $expect_err $actual_ext; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.err) differs from actual result (*.oerr)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
+ fi
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
}
@@ -442,8 +441,8 @@ SKIP() {
# Print a line-line message left justified in a field of 70 characters
#
PRINT_H5DIFF() {
- SPACES=" "
- echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
}
@@ -453,10 +452,11 @@ DIFFTEST()
{
PRINT_H5DIFF $@
(
- cd $TESTDIR
- $RUNSERIAL $H5DIFF_BIN "$@" -q
+ cd $TESTDIR
+ $RUNSERIAL $H5DIFF_BIN "$@" -q
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
@@ -470,8 +470,8 @@ DIFFTEST()
# beginning with the word "Verifying".
#
PRINT_H5IMPORT() {
- SPACES=" "
- echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
}
# Call the h5import tool
@@ -481,22 +481,22 @@ IMPORTTEST()
# remove the output hdf5 file if it exists
hdf5_file="$TESTDIR/$5"
if [ -f $hdf5_file ]; then
- rm -f $hdf5_file
+ rm -f $hdf5_file
fi
PRINT_H5IMPORT $@
(
- cd $TESTDIR
- $RUNSERIAL $H5IMPORT_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $H5IMPORT_BIN "$@"
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
-
}
diff --git a/tools/test/h5dump/testh5dumpvds.sh.in b/tools/test/h5dump/testh5dumpvds.sh.in
index f89234e..29ff238 100644
--- a/tools/test/h5dump/testh5dumpvds.sh.in
+++ b/tools/test/h5dump/testh5dumpvds.sh.in
@@ -205,8 +205,8 @@ TOOLTEST() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -216,26 +216,25 @@ TOOLTEST() {
STDERR_FILTER $actual_err
cat $actual_err >> $actual
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
+ rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
fi
-
}
@@ -254,42 +253,42 @@ TOOLTEST2() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
cat $actual_err >> $actual
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expect $actual; then
- if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
+ # Create the expect file if it doesn't yet exist.
echo " CREATED"
- cp $actualdata $expectdata
- echo " Expected data (*.exp) missing"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
nerrors="`expr $nerrors + 1`"
- elif $CMP $expectdata $actualdata; then
- echo " PASSED"
- else
+ elif $CMP $expect $actual; then
+ if [ ! -f $expectdata ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ echo " Expected data (*.exp) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expectdata $actualdata; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
+ fi
+ else
echo "*FAILED*"
- echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
- fi
- else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actualdata $actual_err
+ rm -f $actual $actualdata $actual_err
fi
}
@@ -309,8 +308,8 @@ TOOLTEST3() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -326,27 +325,27 @@ TOOLTEST3() {
-e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \
-e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \
-e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \
- $actual_err > $actual_ext
+ $actual_err > $actual_ext
cat $actual_ext >> $actual
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
}
@@ -367,8 +366,8 @@ TOOLTEST4() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -384,47 +383,46 @@ TOOLTEST4() {
-e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \
-e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \
-e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \
- $actual_err > $actual_ext
+ $actual_err > $actual_ext
#cat $actual_ext >> $actual
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
elif $CMP $expect $actual; then
- if $CMP $expect_err $actual_ext; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.err) differs from actual result (*.oerr)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
- fi
+ if $CMP $expect_err $actual_ext; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.err) differs from actual result (*.oerr)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
+ fi
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
-
}
# Print a "SKIP" message
SKIP() {
- TESTING $DUMPER $@
+ TESTING $DUMPER $@
echo " -SKIP-"
}
# Print a line-line message left justified in a field of 70 characters
#
PRINT_H5DIFF() {
- SPACES=" "
- echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
}
@@ -434,25 +432,25 @@ DIFFTEST()
{
PRINT_H5DIFF $@
(
- cd $TESTDIR
- $RUNSERIAL $H5DIFF_BIN "$@" -q
+ cd $TESTDIR
+ $RUNSERIAL $H5DIFF_BIN "$@" -q
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
-
}
# Print a line-line message left justified in a field of 70 characters
# beginning with the word "Verifying".
#
PRINT_H5IMPORT() {
- SPACES=" "
- echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
}
# Call the h5import tool
@@ -462,22 +460,22 @@ IMPORTTEST()
# remove the output hdf5 file if it exists
hdf5_file="$TESTDIR/$5"
if [ -f $hdf5_file ]; then
- rm -f $hdf5_file
+ rm -f $hdf5_file
fi
PRINT_H5IMPORT $@
(
- cd $TESTDIR
- $RUNSERIAL $H5IMPORT_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $H5IMPORT_BIN "$@"
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
-
}
@@ -491,7 +489,7 @@ COPY_TESTFILES_TO_TESTDIR
####### test for dataset vds ######
- # Data read
+# Data read
if test $USE_FILTER_DEFLATE = "yes" ; then
TOOLTEST tvds-1.ddl --enable-error-stack 1_vds.h5
TOOLTEST tvds-2.ddl --enable-error-stack 2_vds.h5
@@ -504,7 +502,7 @@ if test $USE_FILTER_DEFLATE = "yes" ; then
TOOLTEST vds-gap2.ddl --vds-gap-size=2 --enable-error-stack vds-eiger.h5
fi
- # Layout read
+# Layout read
if test $USE_FILTER_DEFLATE = "yes" ; then
TOOLTEST tvds_layout-1.ddl -p --enable-error-stack 1_vds.h5
TOOLTEST tvds_layout-2.ddl -p --enable-error-stack 2_vds.h5
diff --git a/tools/test/h5dump/testh5dumpxml.sh.in b/tools/test/h5dump/testh5dumpxml.sh.in
index f7af300..52a13c2 100644
--- a/tools/test/h5dump/testh5dumpxml.sh.in
+++ b/tools/test/h5dump/testh5dumpxml.sh.in
@@ -262,36 +262,35 @@ TOOLTEST() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
-
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.xml) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.xml) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.xml) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.xml) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err
+ rm -f $actual $actual_err
fi
}
# Print a "SKIP" message
SKIP() {
- TESTING $DUMPER $@
- echo " -SKIP-"
+ TESTING $DUMPER $@
+ echo " -SKIP-"
}
diff --git a/tools/test/h5jam/tellub.c b/tools/test/h5jam/tellub.c
index e7bb561..453444d 100644
--- a/tools/test/h5jam/tellub.c
+++ b/tools/test/h5jam/tellub.c
@@ -71,6 +71,7 @@ parse_command_line (int argc, const char *argv[])
case 'h':
usage (h5tools_getprogname());
h5tools_setstatus(EXIT_SUCCESS);
+ break;
case '?':
default:
usage (h5tools_getprogname());
@@ -105,7 +106,7 @@ int
main (int argc, const char *argv[])
{
char *ifname;
- hid_t ifile;
+ hid_t ifile = H5I_INVALID_HID;
hsize_t usize;
htri_t testval;
herr_t status;
@@ -165,7 +166,8 @@ main (int argc, const char *argv[])
done:
H5Pclose (plist);
- H5Fclose (ifile);
+ if(ifile >= 0)
+ H5Fclose (ifile);
leave(h5tools_getstatus());
} /* end main() */
diff --git a/tools/test/h5ls/h5ls_plugin.sh.in b/tools/test/h5ls/h5ls_plugin.sh.in
index c89269d..28370e6 100644
--- a/tools/test/h5ls/h5ls_plugin.sh.in
+++ b/tools/test/h5ls/h5ls_plugin.sh.in
@@ -139,8 +139,8 @@ CLEAN_TESTFILES_AND_TESTDIR()
# Print a $* message left justified in a field of 70 characters
#
MESSAGE() {
- SPACES=" "
- echo "$* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo "$* $SPACES" | cut -c1-70 | tr -d '\012'
}
# Print a line-line message left justified in a field of 70 characters
@@ -206,7 +206,7 @@ TOOLTEST() {
echo ""
fi
elif [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
+ # Create the expect file if it doesn't yet exist.
echo " CREATED"
cp $actual $expect
echo " Expected result (*.ls) missing"
diff --git a/tools/test/misc/testh5mkgrp.sh.in b/tools/test/misc/testh5mkgrp.sh.in
index 3ad1f71..b08cce1 100644
--- a/tools/test/misc/testh5mkgrp.sh.in
+++ b/tools/test/misc/testh5mkgrp.sh.in
@@ -150,10 +150,11 @@ TOOLTEST()
{
TESTING $H5MKGRP $@
(
- cd $TESTDIR
- $RUNSERIAL $H5MKGRP_BIN $@
+ cd $TESTDIR
+ $RUNSERIAL $H5MKGRP_BIN $@
) > output.out
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -164,7 +165,7 @@ TOOLTEST()
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f output.out
+ rm -f output.out
fi
fi
}
@@ -181,8 +182,8 @@ H5LSTEST()
# any unexpected output from that stream too.
VERIFY_H5LS $@
(
- cd $TESTDIR
- $RUNSERIAL $H5LS_BIN $H5LS_ARGS $@
+ cd $TESTDIR
+ $RUNSERIAL $H5LS_BIN $H5LS_ARGS $@
) 2>&1 |sed 's/Modified:.*/Modified: XXXX-XX-XX XX:XX:XX XXX/' >$actual
# save actual in case it is needed later.
@@ -190,25 +191,25 @@ H5LSTEST()
STDOUT_FILTER $actual
STDERR_FILTER $actual
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ls) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expect $actual; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.ls) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
- fi
-
- # Clean up output file
- if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_sav
- fi
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ls) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ls) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_sav
+ fi
}
# Single run of tool
@@ -258,30 +259,30 @@ CMPTEST()
# any unexpected output from that stream too.
TESTING $H5MKGRP $@
(
- cd $TESTDIR
- $RUNSERIAL $H5MKGRP_BIN $@
+ cd $TESTDIR
+ $RUNSERIAL $H5MKGRP_BIN $@
) >$actual 2>$actual_err
cat $actual_err >> $actual
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.txt) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expect $actual; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.txt) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
- fi
-
- # Clean up output file
- if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err
- fi
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.txt) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.txt) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_err
+ fi
}
##############################################################################