summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2015-06-19 17:13:50 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2015-06-19 17:13:50 (GMT)
commit5c0d9097242e4f6bb793c0b6998aaeb3e47e979d (patch)
tree402b87736f68079f59fefcd3ae9322b743c9883c /tools
parentd9c8412a5dfe47d4b6af0b749c50c637672a84f0 (diff)
downloadhdf5-5c0d9097242e4f6bb793c0b6998aaeb3e47e979d.zip
hdf5-5c0d9097242e4f6bb793c0b6998aaeb3e47e979d.tar.gz
hdf5-5c0d9097242e4f6bb793c0b6998aaeb3e47e979d.tar.bz2
[svn-r27253] Move packed bits files to subfolder
Diffstat (limited to 'tools')
-rw-r--r--tools/h5dump/CMakeTestsPBITS.cmake146
-rw-r--r--tools/h5dump/h5dumpgentest.c1163
-rw-r--r--tools/h5dump/testh5dumppbits.sh.in128
-rw-r--r--tools/h5jam/testh5jam.sh.in4
-rw-r--r--tools/lib/h5tools_str.c29
-rw-r--r--tools/testfiles/pbits/tnofilename-with-packed-bits.ddl (renamed from tools/testfiles/tnofilename-with-packed-bits.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsArray.ddl (renamed from tools/testfiles/tpbitsArray.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsCharLengthExceeded.ddl (renamed from tools/testfiles/tpbitsCharLengthExceeded.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsCharOffsetExceeded.ddl (renamed from tools/testfiles/tpbitsCharOffsetExceeded.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsCompound.ddl (renamed from tools/testfiles/tpbitsCompound.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsIncomplete.ddl (renamed from tools/testfiles/tpbitsIncomplete.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsIntLengthExceeded.ddl (renamed from tools/testfiles/tpbitsIntLengthExceeded.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsIntOffsetExceeded.ddl (renamed from tools/testfiles/tpbitsIntOffsetExceeded.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsLengthExceeded.ddl (renamed from tools/testfiles/tpbitsLengthExceeded.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsLengthPositive.ddl (renamed from tools/testfiles/tpbitsLengthPositive.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsLongLengthExceeded.ddl (renamed from tools/testfiles/tpbitsLongLengthExceeded.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsLongOffsetExceeded.ddl (renamed from tools/testfiles/tpbitsLongOffsetExceeded.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsMax.ddl (renamed from tools/testfiles/tpbitsMax.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsMaxExceeded.ddl (renamed from tools/testfiles/tpbitsMaxExceeded.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsOffsetExceeded.ddl (renamed from tools/testfiles/tpbitsOffsetExceeded.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsOffsetNegative.ddl (renamed from tools/testfiles/tpbitsOffsetNegative.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsOverlapped.ddl (renamed from tools/testfiles/tpbitsOverlapped.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsSigned.ddl (renamed from tools/testfiles/tpbitsSigned.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsSigned2.ddl (renamed from tools/testfiles/tpbitsSigned2.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsSigned4.ddl (renamed from tools/testfiles/tpbitsSigned4.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsSignedInt.ddl (renamed from tools/testfiles/tpbitsSignedInt.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsSignedInt4.ddl (renamed from tools/testfiles/tpbitsSignedInt4.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsSignedInt8.ddl (renamed from tools/testfiles/tpbitsSignedInt8.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsSignedIntWhole.ddl (renamed from tools/testfiles/tpbitsSignedIntWhole.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsSignedLong.ddl (renamed from tools/testfiles/tpbitsSignedLong.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsSignedLong16.ddl (renamed from tools/testfiles/tpbitsSignedLong16.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsSignedLong8.ddl (renamed from tools/testfiles/tpbitsSignedLong8.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsSignedLongLong.ddl (renamed from tools/testfiles/tpbitsSignedLongLong.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsSignedLongLong16.ddl (renamed from tools/testfiles/tpbitsSignedLongLong16.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsSignedLongLong32.ddl (renamed from tools/testfiles/tpbitsSignedLongLong32.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsSignedLongLongWhole.ddl (renamed from tools/testfiles/tpbitsSignedLongLongWhole.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsSignedLongLongWhole1.ddl (renamed from tools/testfiles/tpbitsSignedLongLongWhole1.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsSignedLongLongWhole63.ddl (renamed from tools/testfiles/tpbitsSignedLongLongWhole63.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsSignedLongWhole.ddl (renamed from tools/testfiles/tpbitsSignedLongWhole.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsSignedWhole.ddl (renamed from tools/testfiles/tpbitsSignedWhole.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsUnsigned.ddl (renamed from tools/testfiles/tpbitsUnsigned.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsUnsigned2.ddl (renamed from tools/testfiles/tpbitsUnsigned2.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsUnsigned4.ddl (renamed from tools/testfiles/tpbitsUnsigned4.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsUnsignedInt.ddl (renamed from tools/testfiles/tpbitsUnsignedInt.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsUnsignedInt4.ddl (renamed from tools/testfiles/tpbitsUnsignedInt4.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsUnsignedInt8.ddl (renamed from tools/testfiles/tpbitsUnsignedInt8.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsUnsignedIntWhole.ddl (renamed from tools/testfiles/tpbitsUnsignedIntWhole.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsUnsignedLong.ddl (renamed from tools/testfiles/tpbitsUnsignedLong.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsUnsignedLong16.ddl (renamed from tools/testfiles/tpbitsUnsignedLong16.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsUnsignedLong8.ddl (renamed from tools/testfiles/tpbitsUnsignedLong8.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsUnsignedLongLong.ddl (renamed from tools/testfiles/tpbitsUnsignedLongLong.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsUnsignedLongLong16.ddl (renamed from tools/testfiles/tpbitsUnsignedLongLong16.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsUnsignedLongLong32.ddl (renamed from tools/testfiles/tpbitsUnsignedLongLong32.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsUnsignedLongLongWhole.ddl (renamed from tools/testfiles/tpbitsUnsignedLongLongWhole.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsUnsignedLongLongWhole1.ddl (renamed from tools/testfiles/tpbitsUnsignedLongLongWhole1.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsUnsignedLongLongWhole63.ddl (renamed from tools/testfiles/tpbitsUnsignedLongLongWhole63.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsUnsignedLongWhole.ddl (renamed from tools/testfiles/tpbitsUnsignedLongWhole.ddl)0
-rw-r--r--tools/testfiles/pbits/tpbitsUnsignedWhole.ddl (renamed from tools/testfiles/tpbitsUnsignedWhole.ddl)0
58 files changed, 1316 insertions, 154 deletions
diff --git a/tools/h5dump/CMakeTestsPBITS.cmake b/tools/h5dump/CMakeTestsPBITS.cmake
index 421e020..e76fa0e 100644
--- a/tools/h5dump/CMakeTestsPBITS.cmake
+++ b/tools/h5dump/CMakeTestsPBITS.cmake
@@ -4,65 +4,65 @@
### T E S T I N G ###
##############################################################################
##############################################################################
-
+
# --------------------------------------------------------------------
# Packed Bits
# --------------------------------------------------------------------
#-- Copy all the HDF5 files from the test directory into the source directory
set (HDF5_REFERENCE_PBITS
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnofilename-with-packed-bits.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsArray.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCompound.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIncomplete.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLengthExceeded.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCharLengthExceeded.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIntLengthExceeded.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLongLengthExceeded.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLengthPositive.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsMax.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsMaxExceeded.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOffsetExceeded.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCharOffsetExceeded.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIntOffsetExceeded.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLongOffsetExceeded.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOffsetNegative.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOverlapped.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedWhole.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedWhole.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedIntWhole.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedIntWhole.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongWhole.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongWhole.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole63.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole63.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned4.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned4.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt8.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt8.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong16.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong16.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong32.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong32.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt4.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt4.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong8.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong8.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong16.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong16.ddl
+ tnofilename-with-packed-bits.ddl
+ tpbitsArray.ddl
+ tpbitsCompound.ddl
+ tpbitsIncomplete.ddl
+ tpbitsLengthExceeded.ddl
+ tpbitsCharLengthExceeded.ddl
+ tpbitsIntLengthExceeded.ddl
+ tpbitsLongLengthExceeded.ddl
+ tpbitsLengthPositive.ddl
+ tpbitsMax.ddl
+ tpbitsMaxExceeded.ddl
+ tpbitsOffsetExceeded.ddl
+ tpbitsCharOffsetExceeded.ddl
+ tpbitsIntOffsetExceeded.ddl
+ tpbitsLongOffsetExceeded.ddl
+ tpbitsOffsetNegative.ddl
+ tpbitsOverlapped.ddl
+ tpbitsSigned.ddl
+ tpbitsUnsigned.ddl
+ tpbitsSignedInt.ddl
+ tpbitsUnsignedInt.ddl
+ tpbitsSignedLong.ddl
+ tpbitsUnsignedLong.ddl
+ tpbitsSignedLongLong.ddl
+ tpbitsUnsignedLongLong.ddl
+ tpbitsSignedWhole.ddl
+ tpbitsUnsignedWhole.ddl
+ tpbitsSignedIntWhole.ddl
+ tpbitsUnsignedIntWhole.ddl
+ tpbitsSignedLongWhole.ddl
+ tpbitsUnsignedLongWhole.ddl
+ tpbitsSignedLongLongWhole.ddl
+ tpbitsUnsignedLongLongWhole.ddl
+ tpbitsSignedLongLongWhole1.ddl
+ tpbitsUnsignedLongLongWhole1.ddl
+ tpbitsSignedLongLongWhole63.ddl
+ tpbitsUnsignedLongLongWhole63.ddl
+ tpbitsSigned4.ddl
+ tpbitsUnsigned4.ddl
+ tpbitsSignedInt8.ddl
+ tpbitsUnsignedInt8.ddl
+ tpbitsSignedLong16.ddl
+ tpbitsUnsignedLong16.ddl
+ tpbitsSignedLongLong32.ddl
+ tpbitsUnsignedLongLong32.ddl
+ tpbitsSigned2.ddl
+ tpbitsUnsigned2.ddl
+ tpbitsSignedInt4.ddl
+ tpbitsUnsignedInt4.ddl
+ tpbitsSignedLong8.ddl
+ tpbitsUnsignedLong8.ddl
+ tpbitsSignedLongLong16.ddl
+ tpbitsUnsignedLongLong16.ddl
)
set (HDF5_REFERENCE_TEST_PBITS
${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.h5
@@ -70,19 +70,19 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5
)
set (HDF5_ERROR_REFERENCE_PBITS
- ${PROJECT_SOURCE_DIR}/errfiles/tnofilename-with-packed-bits.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsCharLengthExceeded.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsCharOffsetExceeded.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIncomplete.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIntLengthExceeded.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIntOffsetExceeded.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLengthExceeded.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLengthPositive.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLongLengthExceeded.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLongOffsetExceeded.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsMaxExceeded.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsOffsetExceeded.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsOffsetNegative.err
+ tnofilename-with-packed-bits.err
+ tpbitsCharLengthExceeded.err
+ tpbitsCharOffsetExceeded.err
+ tpbitsIncomplete.err
+ tpbitsIntLengthExceeded.err
+ tpbitsIntOffsetExceeded.err
+ tpbitsLengthExceeded.err
+ tpbitsLengthPositive.err
+ tpbitsLongLengthExceeded.err
+ tpbitsLongOffsetExceeded.err
+ tpbitsMaxExceeded.err
+ tpbitsOffsetExceeded.err
+ tpbitsOffsetNegative.err
)
foreach (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS})
@@ -96,7 +96,7 @@
ARGS -E copy_if_different ${pbits_h5_file} ${dest}
)
endforeach (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS})
-
+
foreach (ddl_pbits ${HDF5_REFERENCE_PBITS})
GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME)
@@ -106,7 +106,7 @@
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${ddl_pbits} ${ddldest}
+ ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/pbits/${ddl_pbits} ${ddldest}
)
endforeach (ddl_pbits ${HDF5_REFERENCE_PBITS})
@@ -118,10 +118,10 @@
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${ddl_pbits} ${ddldest}
+ ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/errfiles/${ddl_pbits} ${ddldest}
)
endforeach (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS})
-
+
##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
@@ -163,7 +163,7 @@
##############################################################################
##############################################################################
-### T H E T E S T S HDF5_ENABLE_USING_MEMCHECKER ###
+### T H E T E S T S ###
##############################################################################
##############################################################################
@@ -172,7 +172,7 @@
add_test (
NAME H5DUMP_PACKED_BITS-clearall-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
tnofilename-with-packed-bits.out
tnofilename-with-packed-bits.out.err
tpbitsArray.out
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index 5a6ccca..785b1e6 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -105,6 +105,11 @@
#define FILE73 "tscalarintsize.h5"
#define FILE74 "tscalarattrintsize.h5"
#define FILE75 "tscalarstring.h5"
+#define FILE76 "tcmpdintarray.h5"
+#define FILE77 "tcmpdints.h5"
+#define FILE78 "tscalarintattrsize.h5"
+#define FILE79 "tintsattrs.h5"
+#define FILE80 "tbitnopaque.h5"
/*-------------------------------------------------------------------------
* prototypes
@@ -295,7 +300,7 @@ typedef struct s1_t {
/* Name of dataset to create in datafile */
#define F71_DATASETNAME "CompoundAttrIntSize"
-/* "FILE73" macros and for FILE69 */
+/* "FILE73" macros and for FILE69 and FILE78 */
#define F73_ARRAY_RANK 2
#define F73_XDIM 8
#define F73_DATASETU08 "DU08BITS"
@@ -312,6 +317,32 @@ typedef struct s1_t {
#define F73_YDIM64 64
#define F73_DUMMYDBL "DummyDBL"
+/* "FILE76 and FILE77 */
+/* Name of dataset to create in datafile */
+#define F76_DATASETNAME "CompoundIntArray"
+#define F76_LENGTH 4
+#define F76_RANK 1
+#define F76_ARRAY_RANK 1
+#define F76_DATASETU08 "DU08BITS"
+#define F76_DATASETS08 "DS08BITS"
+#define F76_DIM8 8
+#define F76_DATASETU16 "DU16BITS"
+#define F76_DATASETS16 "DS16BITS"
+#define F76_DIM16 16
+#define F76_DATASETU32 "DU32BITS"
+#define F76_DATASETS32 "DS32BITS"
+#define F76_DIM32 32
+#define F76_DATASETU64 "DU64BITS"
+#define F76_DATASETS64 "DS64BITS"
+#define F76_DIM64 64
+#define F76_DUMMYDBL "DummyDBL"
+/* Name of dataset to create in datafile */
+#define F77_DATASETNAME1 "CompoundInts"
+#define F77_DATASETNAME2 "CompoundRInts"
+#define F77_LENGTH 64
+
+#define F80_DIM32 32
+
static void
gent_group(void)
{
@@ -8527,6 +8558,1131 @@ gent_string_scalars(void)
H5Fclose(fid);
}
+static void gent_compound_int_array(void) {
+ hid_t fid, dataset, space;
+ hsize_t dims[1];
+ uint8_t valu8bits;
+ uint16_t valu16bits;
+ uint32_t valu32bits;
+ uint64_t valu64bits;
+ int8_t val8bits;
+ int16_t val16bits;
+ int32_t val32bits;
+ int64_t val64bits;
+ hsize_t array_dim8[]={F76_DIM8}; /* Array dimensions */
+ hsize_t array_dim16[]={F76_DIM16}; /* Array dimensions */
+ hsize_t array_dim32[]={F76_DIM32}; /* Array dimensions */
+ hsize_t array_dim64[]={F76_DIM64}; /* Array dimensions */
+ hid_t arrayu8_tid; /* Array datatype handle */
+ hid_t arrayu16_tid; /* Array datatype handle */
+ hid_t arrayu32_tid; /* Array datatype handle */
+ hid_t arrayu64_tid; /* Array datatype handle */
+ hid_t array8_tid; /* Array datatype handle */
+ hid_t array16_tid; /* Array datatype handle */
+ hid_t array32_tid; /* Array datatype handle */
+ hid_t array64_tid; /* Array datatype handle */
+ hid_t arraydbl_tid; /* Array datatype handle */
+ /* Structure and array for compound types */
+ typedef struct Cmpd1Struct {
+ uint8_t dsetu8[F76_DIM8];
+ uint16_t dsetu16[F76_DIM16];
+ uint32_t dsetu32[F76_DIM32];
+ uint64_t dsetu64[F76_DIM64];
+ int8_t dset8[F76_DIM8];
+ int16_t dset16[F76_DIM16];
+ int32_t dset32[F76_DIM32];
+ int64_t dset64[F76_DIM64];
+ double dsetdbl[F76_DIM8];
+ } Cmpd1Struct;
+ Cmpd1Struct Cmpd1[F76_LENGTH];
+
+ hid_t Cmpd1Structid; /* File datatype identifier */
+ herr_t status; /* Error checking variable */
+ hsize_t dim[] = { F76_LENGTH }; /* Dataspace dimensions */
+
+ int m, n; /* Array init loop vars */
+
+ /* Initialize the data in the arrays/datastructure */
+ for (m = 0; m < F76_LENGTH; m++) {
+
+ /* Array of 8 bits unsigned int */
+ dims[0] = F76_DIM8;
+
+ valu8bits = (uint8_t) ~0u; /* all 1s */
+ for(n = 0; n < dims[0]; n++){
+ Cmpd1[m].dsetu8[n] = valu8bits;
+ valu8bits <<= 1;
+ }
+
+ /* Array of 16 bits unsigned int */
+ dims[0] = F76_DIM16;
+
+ valu16bits = (uint16_t) ~0u; /* all 1s */
+ for(n = 0; n < dims[0]; n++){
+ Cmpd1[m].dsetu16[n] = valu16bits;
+ valu16bits <<= 1;
+ }
+
+ /* Array of 32 bits unsigned int */
+ dims[0] = F76_DIM32;
+
+ valu32bits = (uint32_t) ~0u; /* all 1s */
+ for(n = 0; n < dims[0]; n++){
+ Cmpd1[m].dsetu32[n] = valu32bits;
+ valu32bits <<= 1;
+ }
+
+ /* Array of 64 bits unsigned int */
+ dims[0] = F76_DIM64;
+
+ valu64bits = (uint64_t) ~0Lu; /* all 1s */
+ for(n = 0; n < dims[0]; n++){
+ Cmpd1[m].dsetu64[n] = valu64bits;
+ valu64bits <<= 1;
+ }
+
+ /* Array of 8 bits signed int */
+ dims[0] = F76_DIM8;
+
+ val8bits = (int8_t) ~0; /* all 1s */
+ for(n = 0; n < dims[0]; n++){
+ Cmpd1[m].dset8[n] = val8bits;
+ val8bits <<= 1;
+ }
+
+ /* Array of 16 bits signed int */
+ dims[0] = F76_DIM16;
+
+ val16bits = (int16_t) ~0; /* all 1s */
+ for(n = 0; n < dims[0]; n++){
+ Cmpd1[m].dset16[n] = val16bits;
+ val16bits <<= 1;
+ }
+
+ /* Array of 32 bits signed int */
+ dims[0] = F76_DIM32;
+
+ val32bits = (int32_t) ~0; /* all 1s */
+ for(n = 0; n < dims[0]; n++){
+ Cmpd1[m].dset32[n] = val32bits;
+ val32bits <<= 1;
+ }
+
+ /* Array of 64 bits signed int */
+ dims[0] = F76_DIM64;
+
+ val64bits = (int64_t) ~0L; /* all 1s */
+ for(n = 0; n < dims[0]; n++){
+ Cmpd1[m].dset64[n] = val64bits;
+ val64bits <<= 1;
+ }
+
+ /* Double Dummy set for failure tests */
+ dims[0] = F76_DIM8;
+
+ for(n = 0; n < dims[0]; n++)
+ Cmpd1[m].dsetdbl[n] = 0.0001F + n;
+ }
+
+ /* Create the array data type for the 8 bits signed int array */
+ array8_tid = H5Tarray_create2(H5T_NATIVE_SCHAR, F76_ARRAY_RANK, array_dim8);
+ HDassert(array8_tid >= 0);
+
+ /* Create the array data type for the 16 bits signed int array */
+ array16_tid = H5Tarray_create2(H5T_NATIVE_SHORT, F76_ARRAY_RANK, array_dim16);
+ HDassert(array16_tid >= 0);
+
+ /* Create the array data type for the 32 bits signed int array */
+ array32_tid = H5Tarray_create2(H5T_NATIVE_INT, F76_ARRAY_RANK, array_dim32);
+ HDassert(array32_tid >= 0);
+
+ /* Create the array data type for the 64 bits signed int array */
+ array64_tid = H5Tarray_create2(H5T_NATIVE_LONG, F76_ARRAY_RANK, array_dim64);
+ HDassert(array64_tid >= 0);
+
+ /* Create the array data type for the 8 bits signed int array */
+ arrayu8_tid = H5Tarray_create2(H5T_NATIVE_UCHAR, F76_ARRAY_RANK, array_dim8);
+ HDassert(arrayu8_tid >= 0);
+
+ /* Create the array data type for the 16 bits signed int array */
+ arrayu16_tid = H5Tarray_create2(H5T_NATIVE_USHORT, F76_ARRAY_RANK, array_dim16);
+ HDassert(arrayu16_tid >= 0);
+
+ /* Create the array data type for the 32 bits signed int array */
+ arrayu32_tid = H5Tarray_create2(H5T_NATIVE_UINT, F76_ARRAY_RANK, array_dim32);
+ HDassert(arrayu32_tid >= 0);
+
+ /* Create the array data type for the 64 bits signed int array */
+ arrayu64_tid = H5Tarray_create2(H5T_NATIVE_ULONG, F76_ARRAY_RANK, array_dim64);
+ HDassert(arrayu64_tid >= 0);
+
+ /* Create the array data type for the 32 bits double array */
+ arraydbl_tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, F76_ARRAY_RANK, array_dim8);
+ HDassert(arraydbl_tid >= 0);
+
+ /* Create the dataspace */
+ space = H5Screate_simple(F76_RANK, dim, NULL);
+ HDassert(space >= 0);
+
+ /* Create the file */
+ fid = H5Fcreate(FILE76, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ HDassert(fid >= 0);
+
+ /* Create the memory data type */
+ Cmpd1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Cmpd1Struct));
+ HDassert(Cmpd1Structid >= 0);
+
+ /* Insert the arrays and variables into the structure */
+ status = H5Tinsert(Cmpd1Structid, F76_DATASETU08, HOFFSET(Cmpd1Struct, dsetu8), arrayu8_tid);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd1Structid, F76_DATASETU16, HOFFSET(Cmpd1Struct, dsetu16), arrayu16_tid);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd1Structid, F76_DATASETU32, HOFFSET(Cmpd1Struct, dsetu32), arrayu32_tid);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd1Structid, F76_DATASETU64, HOFFSET(Cmpd1Struct, dsetu64), arrayu64_tid);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd1Structid, F76_DATASETS08, HOFFSET(Cmpd1Struct, dset8), array8_tid);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd1Structid, F76_DATASETS16, HOFFSET(Cmpd1Struct, dset16), array16_tid);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd1Structid, F76_DATASETS32, HOFFSET(Cmpd1Struct, dset32), array32_tid);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd1Structid, F76_DATASETS64, HOFFSET(Cmpd1Struct, dset64), array64_tid);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd1Structid, F76_DUMMYDBL, HOFFSET(Cmpd1Struct, dsetdbl), arraydbl_tid);
+ HDassert(status >= 0);
+
+ /* Create the dataset */
+ dataset = H5Dcreate2(fid, F76_DATASETNAME, Cmpd1Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Write data to the dataset */
+ status = H5Dwrite(dataset, Cmpd1Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Cmpd1);
+ HDassert(status >= 0);
+
+ /* Release resources */
+ status = H5Tclose(Cmpd1Structid);
+ HDassert(status >= 0);
+
+ status = H5Tclose(arrayu8_tid);
+ HDassert(status >= 0);
+
+ status = H5Tclose(arrayu16_tid);
+ HDassert(status >= 0);
+
+ status = H5Tclose(arrayu32_tid);
+ HDassert(status >= 0);
+
+ status = H5Tclose(arrayu64_tid);
+ HDassert(status >= 0);
+
+ status = H5Tclose(array8_tid);
+ HDassert(status >= 0);
+
+ status = H5Tclose(array16_tid);
+ HDassert(status >= 0);
+
+ status = H5Tclose(array32_tid);
+ HDassert(status >= 0);
+
+ status = H5Tclose(array64_tid);
+ HDassert(status >= 0);
+
+ status = H5Tclose(arraydbl_tid);
+ HDassert(status >= 0);
+
+ status = H5Sclose(space);
+ HDassert(status >= 0);
+
+ status = H5Dclose(dataset);
+ HDassert(status >= 0);
+
+ status = H5Fclose(fid);
+ HDassert(status >= 0);
+}
+
+static void gent_compound_ints(void) {
+ hid_t fid, dataset, space;
+ uint8_t valu8bits = (uint8_t) ~0u; /* all 1s */
+ uint16_t valu16bits = (uint16_t) ~0u; /* all 1s */
+ uint32_t valu32bits = (uint32_t) ~0u; /* all 1s */
+ uint64_t valu64bits = (uint64_t) ~0Lu; /* all 1s */
+ int8_t val8bits = (int8_t) ~0; /* all 1s */
+ int16_t val16bits = (int16_t) ~0; /* all 1s */
+ int32_t val32bits = (int32_t) ~0; /* all 1s */
+ int64_t val64bits = (int64_t) ~0L; /* all 1s */
+ /* Structure and array for compound types */
+ typedef struct Cmpd1Struct {
+ uint8_t dsetu8;
+ uint16_t dsetu16;
+ uint32_t dsetu32;
+ uint64_t dsetu64;
+ int8_t dset8;
+ int16_t dset16;
+ int32_t dset32;
+ int64_t dset64;
+ double dsetdbl;
+ } Cmpd1Struct;
+ Cmpd1Struct Cmpd1[F77_LENGTH];
+
+ typedef struct Cmpd2Struct {
+ uint64_t dsetu64;
+ uint32_t dsetu32;
+ uint16_t dsetu16;
+ uint8_t dsetu8;
+ int64_t dset64;
+ int32_t dset32;
+ int16_t dset16;
+ int8_t dset8;
+ double dsetdbl;
+ } Cmpd2Struct;
+ Cmpd2Struct Cmpd2[F77_LENGTH];
+
+ hid_t Cmpd1Structid; /* File datatype identifier */
+ hid_t Cmpd2Structid; /* File datatype identifier */
+ herr_t status; /* Error checking variable */
+ hsize_t dim[] = { F77_LENGTH }; /* Dataspace dimensions */
+
+ int m; /* Array init loop vars */
+
+ /* Initialize the data in the arrays/datastructure */
+ for (m = 0; m < F77_LENGTH; m++) {
+
+ /* Array of 8 bits unsigned int */
+ if((m % F76_DIM8) == 0)
+ valu8bits = (uint8_t) ~0u; /* all 1s */
+ Cmpd1[m].dsetu8 = valu8bits;
+ Cmpd2[m].dsetu8 = valu8bits;
+ valu8bits <<= 1;
+
+ /* Array of 16 bits unsigned int */
+ if((m % F76_DIM16) == 0)
+ valu16bits = (uint16_t) ~0u; /* all 1s */
+ Cmpd1[m].dsetu16 = valu16bits;
+ Cmpd2[m].dsetu16 = valu16bits;
+ valu16bits <<= 1;
+
+ /* Array of 32 bits unsigned int */
+ if((m % F76_DIM32) == 0)
+ valu32bits = (uint32_t) ~0u; /* all 1s */
+ Cmpd1[m].dsetu32 = valu32bits;
+ Cmpd2[m].dsetu32 = valu32bits;
+ valu32bits <<= 1;
+
+ /* Array of 64 bits unsigned int */
+ if((m % F76_DIM64) == 0)
+ valu64bits = (uint64_t) ~0Lu; /* all 1s */
+ Cmpd1[m].dsetu64 = valu64bits;
+ Cmpd2[m].dsetu64 = valu64bits;
+ valu64bits <<= 1;
+
+ /* Array of 8 bits signed int */
+ if((m % F76_DIM8) == 0)
+ val8bits = (int8_t) ~0; /* all 1s */
+ Cmpd1[m].dset8 = val8bits;
+ Cmpd2[m].dset8 = val8bits;
+ val8bits <<= 1;
+
+ /* Array of 16 bits signed int */
+ if((m % F76_DIM16) == 0)
+ val16bits = (int16_t) ~0; /* all 1s */
+ Cmpd1[m].dset16 = val16bits;
+ Cmpd2[m].dset16 = val16bits;
+ val16bits <<= 1;
+
+ /* Array of 32 bits signed int */
+ if((m % F76_DIM32) == 0)
+ val32bits = (int32_t) ~0; /* all 1s */
+ Cmpd1[m].dset32 = val32bits;
+ Cmpd2[m].dset32 = val32bits;
+ val32bits <<= 1;
+
+ /* Array of 64 bits signed int */
+ if((m % F76_DIM64) == 0)
+ val64bits = (int64_t) ~0L; /* all 1s */
+ Cmpd1[m].dset64 = val64bits;
+ Cmpd2[m].dset64 = val64bits;
+ val64bits <<= 1;
+
+ /* Double Dummy set for failure tests */
+ Cmpd1[m].dsetdbl = 0.0001F + m;
+ Cmpd2[m].dsetdbl = 0.0001F + m;
+ }
+
+ /* Create the dataspace */
+ space = H5Screate_simple(F76_RANK, dim, NULL);
+ HDassert(space >= 0);
+
+ /* Create the file */
+ fid = H5Fcreate(FILE77, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ HDassert(fid >= 0);
+
+ /* Create the memory data type */
+ Cmpd1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Cmpd1Struct));
+ HDassert(Cmpd1Structid >= 0);
+
+ /* Insert the arrays and variables into the structure */
+ status = H5Tinsert(Cmpd1Structid, F76_DATASETU08, HOFFSET(Cmpd1Struct, dsetu8), H5T_NATIVE_UCHAR);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd1Structid, F76_DATASETU16, HOFFSET(Cmpd1Struct, dsetu16), H5T_NATIVE_USHORT);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd1Structid, F76_DATASETU32, HOFFSET(Cmpd1Struct, dsetu32), H5T_NATIVE_UINT);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd1Structid, F76_DATASETU64, HOFFSET(Cmpd1Struct, dsetu64), H5T_NATIVE_ULONG);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd1Structid, F76_DATASETS08, HOFFSET(Cmpd1Struct, dset8), H5T_NATIVE_SCHAR);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd1Structid, F76_DATASETS16, HOFFSET(Cmpd1Struct, dset16), H5T_NATIVE_SHORT);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd1Structid, F76_DATASETS32, HOFFSET(Cmpd1Struct, dset32), H5T_NATIVE_INT);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd1Structid, F76_DATASETS64, HOFFSET(Cmpd1Struct, dset64), H5T_NATIVE_LONG);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd1Structid, F76_DUMMYDBL, HOFFSET(Cmpd1Struct, dsetdbl), H5T_NATIVE_DOUBLE);
+ HDassert(status >= 0);
+
+ /* Create the dataset */
+ dataset = H5Dcreate2(fid, F77_DATASETNAME1, Cmpd1Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Write data to the dataset */
+ status = H5Dwrite(dataset, Cmpd1Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Cmpd1);
+ HDassert(status >= 0);
+
+ /* Release resources */
+ status = H5Tclose(Cmpd1Structid);
+ HDassert(status >= 0);
+
+ status = H5Sclose(space);
+ HDassert(status >= 0);
+
+ status = H5Dclose(dataset);
+ HDassert(status >= 0);
+
+ /* Create the dataspace */
+ space = H5Screate_simple(F76_RANK, dim, NULL);
+ HDassert(space >= 0);
+
+ /* Create the memory data type */
+ Cmpd2Structid = H5Tcreate(H5T_COMPOUND, sizeof(Cmpd2Struct));
+ HDassert(Cmpd2Structid >= 0);
+
+ /* Insert the arrays and variables into the structure */
+ status = H5Tinsert(Cmpd2Structid, F76_DATASETU64, HOFFSET(Cmpd2Struct, dsetu64), H5T_NATIVE_ULONG);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd2Structid, F76_DATASETU32, HOFFSET(Cmpd2Struct, dsetu32), H5T_NATIVE_UINT);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd2Structid, F76_DATASETU16, HOFFSET(Cmpd2Struct, dsetu16), H5T_NATIVE_USHORT);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd2Structid, F76_DATASETU08, HOFFSET(Cmpd2Struct, dsetu8), H5T_NATIVE_UCHAR);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd2Structid, F76_DATASETS64, HOFFSET(Cmpd2Struct, dset64), H5T_NATIVE_LONG);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd2Structid, F76_DATASETS32, HOFFSET(Cmpd2Struct, dset32), H5T_NATIVE_INT);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd2Structid, F76_DATASETS16, HOFFSET(Cmpd2Struct, dset16), H5T_NATIVE_SHORT);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd2Structid, F76_DATASETS08, HOFFSET(Cmpd2Struct, dset8), H5T_NATIVE_SCHAR);
+ HDassert(status >= 0);
+
+ status = H5Tinsert(Cmpd2Structid, F76_DUMMYDBL, HOFFSET(Cmpd2Struct, dsetdbl), H5T_NATIVE_DOUBLE);
+ HDassert(status >= 0);
+
+ /* Create the dataset */
+ dataset = H5Dcreate2(fid, F77_DATASETNAME2, Cmpd2Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Write data to the dataset */
+ status = H5Dwrite(dataset, Cmpd2Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Cmpd2);
+ HDassert(status >= 0);
+
+ /* Release resources */
+ status = H5Tclose(Cmpd2Structid);
+ HDassert(status >= 0);
+
+ status = H5Sclose(space);
+ HDassert(status >= 0);
+
+ status = H5Dclose(dataset);
+ HDassert(status >= 0);
+
+ status = H5Fclose(fid);
+ HDassert(status >= 0);
+}
+
+/*-------------------------------------------------------------------------
+ * Function: gent_intscalars
+ *
+ * Purpose: Generate a file to be used in the h5dump scalar with attribute tests.
+ * Four datasets of 1, 2, 4 and 8 bytes of unsigned int types are created.
+ * Four more datasets of 1, 2, 4 and 8 bytes of signed int types are created.
+ * Fill them with raw data such that no bit will be all zero in a dataset.
+ * A dummy dataset of double type is created for failure test.
+ *-------------------------------------------------------------------------
+ */
+static void
+gent_intattrscalars(void)
+{
+ hid_t fid, attr, dataset, space, tid;
+ hsize_t dims[2];
+ uint8_t dsetu8[F73_XDIM][F73_YDIM8], valu8bits;
+ uint16_t dsetu16[F73_XDIM][F73_YDIM16], valu16bits;
+ uint32_t dsetu32[F73_XDIM][F73_YDIM32], valu32bits;
+ uint64_t dsetu64[F73_XDIM][F73_YDIM64], valu64bits;
+ int8_t dset8[F73_XDIM][F73_YDIM8], val8bits;
+ int16_t dset16[F73_XDIM][F73_YDIM16], val16bits;
+ int32_t dset32[F73_XDIM][F73_YDIM32], val32bits;
+ int64_t dset64[F73_XDIM][F73_YDIM64], val64bits;
+ double dsetdbl[F73_XDIM][F73_YDIM8];
+ unsigned int i, j;
+
+ fid = H5Fcreate(FILE78, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Dataset of 8 bits unsigned int */
+ dims[0] = F73_XDIM; dims[1] = F73_YDIM8;
+ space = H5Screate(H5S_SCALAR);
+ tid = H5Tarray_create2(H5T_STD_U8LE, F73_ARRAY_RANK, dims);
+ dataset = H5Dcreate2(fid, F73_DATASETU08, tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ valu8bits = (uint8_t) ~0u; /* all 1s */
+ for(i = 0; i < dims[0]; i++){
+ dsetu8[i][0] = valu8bits;
+ for(j = 1; j < dims[1]; j++) {
+ dsetu8[i][j] = dsetu8[i][j-1] << 1;
+ }
+ valu8bits <<= 1;
+ }
+
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu8);
+ /* Attribute of 8 bits unsigned int */
+ attr = H5Acreate2(dataset, F73_DATASETU08, tid, space, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(attr, tid, dsetu8);
+ H5Aclose(attr);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 16 bits unsigned int */
+ dims[0] = F73_XDIM; dims[1] = F73_YDIM16;
+ space = H5Screate(H5S_SCALAR);
+ tid = H5Tarray_create2(H5T_STD_U16LE, F73_ARRAY_RANK, dims);
+ dataset = H5Dcreate2(fid, F73_DATASETU16, tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ valu16bits = (uint16_t) ~0u; /* all 1s */
+ for(i = 0; i < dims[0]; i++){
+ dsetu16[i][0] = valu16bits;
+ for(j = 1; j < dims[1]; j++) {
+ dsetu16[i][j] = dsetu16[i][j-1] << 1;
+ }
+ valu16bits <<= 1;
+ }
+
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu16);
+ /* Attribute of 16 bits unsigned int */
+ attr = H5Acreate2(dataset, F73_DATASETU16, tid, space, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(attr, tid, dsetu16);
+ H5Aclose(attr);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 32 bits unsigned int */
+ dims[0] = F73_XDIM; dims[1] = F73_YDIM32;
+ space = H5Screate(H5S_SCALAR);
+ tid = H5Tarray_create2(H5T_STD_U32LE, F73_ARRAY_RANK, dims);
+ dataset = H5Dcreate2(fid, F73_DATASETU32, tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ valu32bits = (uint32_t) ~0u; /* all 1s */
+ for(i = 0; i < dims[0]; i++){
+ dsetu32[i][0] = valu32bits;
+ for(j = 1; j < dims[1]; j++) {
+ dsetu32[i][j] = dsetu32[i][j-1] << 1;
+ }
+ valu32bits <<= 1;
+ }
+
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu32);
+ /* Attribute of 32 bits unsigned int */
+ attr = H5Acreate2(dataset, F73_DATASETU32, tid, space, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(attr, tid, dsetu32);
+ H5Aclose(attr);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 64 bits unsigned int */
+ dims[0] = F73_XDIM; dims[1] = F73_YDIM64;
+ space = H5Screate(H5S_SCALAR);
+ tid = H5Tarray_create2(H5T_STD_U64LE, F73_ARRAY_RANK, dims);
+ dataset = H5Dcreate2(fid, F73_DATASETU64, tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ valu64bits = (uint64_t) ~0Lu; /* all 1s */
+ for(i = 0; i < dims[0]; i++){
+ dsetu64[i][0] = valu64bits;
+ for(j = 1; j < dims[1]; j++) {
+ dsetu64[i][j] = dsetu64[i][j-1] << 1;
+ }
+ valu64bits <<= 1;
+ }
+
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu64);
+ /* Attribute of 64 bits unsigned int */
+ attr = H5Acreate2(dataset, F73_DATASETU64, tid, space, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(attr, tid, dsetu64);
+ H5Aclose(attr);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 8 bits signed int */
+ dims[0] = F73_XDIM; dims[1] = F73_YDIM8;
+ space = H5Screate(H5S_SCALAR);
+ tid = H5Tarray_create2(H5T_STD_I8LE, F73_ARRAY_RANK, dims);
+ dataset = H5Dcreate2(fid, F73_DATASETS08, tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ val8bits = (int8_t) ~0; /* all 1s */
+ for(i = 0; i < dims[0]; i++){
+ dset8[i][0] = val8bits;
+ for(j = 1; j < dims[1]; j++) {
+ dset8[i][j] = dset8[i][j-1] << 1;
+ }
+ val8bits <<= 1;
+ }
+
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset8);
+ /* Attribute of 8 bits signed int */
+ attr = H5Acreate2(dataset, F73_DATASETS08, tid, space, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(attr, tid, dset8);
+ H5Aclose(attr);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 16 bits signed int */
+ dims[0] = F73_XDIM; dims[1] = F73_YDIM16;
+ space = H5Screate(H5S_SCALAR);
+ tid = H5Tarray_create2(H5T_STD_I16LE, F73_ARRAY_RANK, dims);
+ dataset = H5Dcreate2(fid, F73_DATASETS16, tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ val16bits = (int16_t) ~0; /* all 1s */
+ for(i = 0; i < dims[0]; i++){
+ dset16[i][0] = val16bits;
+ for(j = 1; j < dims[1]; j++) {
+ dset16[i][j] = dset16[i][j-1] << 1;
+ }
+ val16bits <<= 1;
+ }
+
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset16);
+ /* Attribute of 16 bits signed int */
+ attr = H5Acreate2(dataset, F73_DATASETS16, tid, space, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(attr, tid, dset16);
+ H5Aclose(attr);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 32 bits signed int */
+ dims[0] = F73_XDIM; dims[1] = F73_YDIM32;
+ space = H5Screate(H5S_SCALAR);
+ tid = H5Tarray_create2(H5T_STD_I32LE, F73_ARRAY_RANK, dims);
+ dataset = H5Dcreate2(fid, F73_DATASETS32, tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ val32bits = (int32_t) ~0; /* all 1s */
+ for(i = 0; i < dims[0]; i++){
+ dset32[i][0] = val32bits;
+ for(j = 1; j < dims[1]; j++) {
+ dset32[i][j] = dset32[i][j-1] << 1;
+ }
+ val32bits <<= 1;
+ }
+
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32);
+ /* Attribute of 32 bits signed int */
+ attr = H5Acreate2(dataset, F73_DATASETS32, tid, space, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(attr, tid, dset32);
+ H5Aclose(attr);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 64 bits signed int */
+ dims[0] = F73_XDIM; dims[1] = F73_YDIM64;
+ space = H5Screate(H5S_SCALAR);
+ tid = H5Tarray_create2(H5T_STD_I64LE, F73_ARRAY_RANK, dims);
+ dataset = H5Dcreate2(fid, F73_DATASETS64, tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ val64bits = (int64_t) ~0L; /* all 1s */
+ for(i = 0; i < dims[0]; i++){
+ dset64[i][0] = val64bits;
+ for(j = 1; j < dims[1]; j++) {
+ dset64[i][j] = dset64[i][j-1] << 1;
+ }
+ val64bits <<= 1;
+ }
+
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64);
+ /* Attribute of 64 bits signed int */
+ attr = H5Acreate2(dataset, F73_DATASETS64, tid, space, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(attr, tid, dset64);
+ H5Aclose(attr);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Double Dummy set for failure tests */
+ dims[0] = F73_XDIM; dims[1] = F73_YDIM8;
+ space = H5Screate(H5S_SCALAR);
+ tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, F73_ARRAY_RANK, dims);
+ dataset = H5Dcreate2(fid, F73_DUMMYDBL, tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ for(i = 0; i < dims[0]; i++)
+ for(j = 0; j < dims[1]; j++)
+ dsetdbl[i][j] = 0.0001F * j + i;
+
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl);
+ /* Attribute of double */
+ attr = H5Acreate2(dataset, F73_DUMMYDBL, tid, space, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(attr, tid, dsetdbl);
+ H5Aclose(attr);
+ H5Sclose(space);
+ H5Dclose(dataset);
+ H5Fclose(fid);
+}
+
+/*-------------------------------------------------------------------------
+ * Function: gent_packedbits
+ *
+ * Purpose: Generate a file to be used in the h5dump packed bits tests.
+ * Four datasets of 1, 2, 4 and 8 bytes of unsigned int types are created.
+ * Four more datasets of 1, 2, 4 and 8 bytes of signed int types are created.
+ * Fill them with raw data such that no bit will be all zero in a dataset.
+ * A dummy dataset of double type is created for failure test.
+ * Created: Albert Cheng, 2010/5/10.
+ * Modified: Allen Byrne, 2011/1/5 Use file to test Signed/Unsigned datatypes
+ *-------------------------------------------------------------------------
+ */
+static void
+gent_intsattrs(void)
+{
+ hid_t fid, attr, dataset, space, aspace;
+ hsize_t dims[2], adims[1];
+ uint8_t dsetu8[F66_XDIM][F66_YDIM8], asetu8[F66_XDIM*F66_YDIM8], valu8bits;
+ uint16_t dsetu16[F66_XDIM][F66_YDIM16], asetu16[F66_XDIM*F66_YDIM16], valu16bits;
+ uint32_t dsetu32[F66_XDIM][F66_YDIM32], asetu32[F66_XDIM*F66_YDIM32], valu32bits;
+ uint64_t dsetu64[F66_XDIM][F66_YDIM64], asetu64[F66_XDIM*F66_YDIM64], valu64bits;
+ int8_t dset8[F66_XDIM][F66_YDIM8], aset8[F66_XDIM*F66_YDIM8], val8bits;
+ int16_t dset16[F66_XDIM][F66_YDIM16], aset16[F66_XDIM*F66_YDIM16], val16bits;
+ int32_t dset32[F66_XDIM][F66_YDIM32], aset32[F66_XDIM*F66_YDIM32], val32bits;
+ int64_t dset64[F66_XDIM][F66_YDIM64], aset64[F66_XDIM*F66_YDIM64], val64bits;
+ double dsetdbl[F66_XDIM][F66_YDIM8], asetdbl[F66_XDIM*F66_YDIM8];
+ unsigned int i, j;
+
+ fid = H5Fcreate(FILE79, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Dataset of 8 bits unsigned int */
+ dims[0] = F66_XDIM; dims[1] = F66_YDIM8;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F66_DATASETU08, H5T_STD_U8LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ valu8bits = (uint8_t) ~0u; /* all 1s */
+ for(i = 0; i < dims[0]; i++){
+ dsetu8[i][0] = valu8bits;
+ asetu8[i*dims[1]] = dsetu8[i][0];
+ for(j = 1; j < dims[1]; j++) {
+ dsetu8[i][j] = dsetu8[i][j-1] << 1;
+ asetu8[i*dims[1]+j] = dsetu8[i][j];
+ }
+ valu8bits <<= 1;
+ }
+
+ H5Dwrite(dataset, H5T_NATIVE_UINT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu8);
+ /* Attribute of 8 bits unsigned int */
+ adims[0] = F66_XDIM * F66_YDIM8;
+ aspace = H5Screate_simple(1, adims, NULL);
+ attr = H5Acreate2(dataset, F66_DATASETU08, H5T_STD_U8LE, aspace, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(attr, H5T_NATIVE_UINT8, asetu8);
+ H5Aclose(attr);
+ H5Sclose(aspace);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 16 bits unsigned int */
+ dims[0] = F66_XDIM; dims[1] = F66_YDIM16;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F66_DATASETU16, H5T_STD_U16LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ valu16bits = (uint16_t) ~0u; /* all 1s */
+ for(i = 0; i < dims[0]; i++){
+ dsetu16[i][0] = valu16bits;
+ asetu16[i*dims[1]] = dsetu16[i][0];
+ for(j = 1; j < dims[1]; j++) {
+ dsetu16[i][j] = dsetu16[i][j-1] << 1;
+ asetu16[i*dims[1]+j] = dsetu16[i][j];
+ }
+ valu16bits <<= 1;
+ }
+
+ H5Dwrite(dataset, H5T_NATIVE_UINT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu16);
+ /* Attribute of 16 bits unsigned int */
+ adims[0] = F66_XDIM * F66_YDIM16;
+ aspace = H5Screate_simple(1, adims, NULL);
+ attr = H5Acreate2(dataset, F66_DATASETU16, H5T_STD_U16LE, aspace, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(attr, H5T_NATIVE_UINT16, asetu16);
+ H5Aclose(attr);
+ H5Sclose(aspace);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 32 bits unsigned int */
+ dims[0] = F66_XDIM; dims[1] = F66_YDIM32;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F66_DATASETU32, H5T_STD_U32LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ valu32bits = (uint32_t) ~0u; /* all 1s */
+ for(i = 0; i < dims[0]; i++){
+ dsetu32[i][0] = valu32bits;
+ asetu32[i*dims[1]] = dsetu32[i][0];
+ for(j = 1; j < dims[1]; j++) {
+ dsetu32[i][j] = dsetu32[i][j-1] << 1;
+ asetu32[i*dims[1]+j] = dsetu32[i][j];
+ }
+ valu32bits <<= 1;
+ }
+
+ H5Dwrite(dataset, H5T_NATIVE_UINT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu32);
+ /* Attribute of 32 bits unsigned int */
+ adims[0] = F66_XDIM * F66_YDIM32;
+ aspace = H5Screate_simple(1, adims, NULL);
+ attr = H5Acreate2(dataset, F66_DATASETU32, H5T_STD_U32LE, aspace, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(attr, H5T_NATIVE_UINT32, asetu32);
+ H5Aclose(attr);
+ H5Sclose(aspace);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 64 bits unsigned int */
+ dims[0] = F66_XDIM; dims[1] = F66_YDIM64;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F66_DATASETU64, H5T_STD_U64LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ valu64bits = (uint64_t) ~0Lu; /* all 1s */
+ for(i = 0; i < dims[0]; i++){
+ dsetu64[i][0] = valu64bits;
+ asetu64[i*dims[1]] = dsetu64[i][0];
+ for(j = 1; j < dims[1]; j++) {
+ dsetu64[i][j] = dsetu64[i][j-1] << 1;
+ asetu64[i*dims[1]+j] = dsetu64[i][j];
+ }
+ valu64bits <<= 1;
+ }
+
+ H5Dwrite(dataset, H5T_NATIVE_UINT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu64);
+ /* Attribute of 64 bits unsigned int */
+ adims[0] = F66_XDIM * F66_YDIM64;
+ aspace = H5Screate_simple(1, adims, NULL);
+ attr = H5Acreate2(dataset, F66_DATASETU64, H5T_STD_U64LE, aspace, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(attr, H5T_NATIVE_UINT64, asetu64);
+ H5Aclose(attr);
+ H5Sclose(aspace);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 8 bits signed int */
+ dims[0] = F66_XDIM; dims[1] = F66_YDIM8;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F66_DATASETS08, H5T_STD_I8LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ val8bits = (int8_t) ~0; /* all 1s */
+ for(i = 0; i < dims[0]; i++){
+ dset8[i][0] = val8bits;
+ aset8[i*dims[1]] = dset8[i][0];
+ for(j = 1; j < dims[1]; j++) {
+ dset8[i][j] = dset8[i][j-1] << 1;
+ aset8[i*dims[1]+j] = dset8[i][j];
+ }
+ val8bits <<= 1;
+ }
+
+ H5Dwrite(dataset, H5T_NATIVE_INT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset8);
+ /* Attribute of 8 bits signed int */
+ adims[0] = F66_XDIM * F66_YDIM8;
+ aspace = H5Screate_simple(1, adims, NULL);
+ attr = H5Acreate2(dataset, F66_DATASETS08, H5T_STD_I8LE, aspace, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(attr, H5T_NATIVE_INT8, aset8);
+ H5Aclose(attr);
+ H5Sclose(aspace);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 16 bits signed int */
+ dims[0] = F66_XDIM; dims[1] = F66_YDIM16;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F66_DATASETS16, H5T_STD_I16LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ val16bits = (int16_t) ~0; /* all 1s */
+ for(i = 0; i < dims[0]; i++){
+ dset16[i][0] = val16bits;
+ aset16[i*dims[1]] = dset16[i][0];
+ for(j = 1; j < dims[1]; j++) {
+ dset16[i][j] = dset16[i][j-1] << 1;
+ aset16[i*dims[1]+j] = dset16[i][j];
+ }
+ val16bits <<= 1;
+ }
+
+ H5Dwrite(dataset, H5T_NATIVE_INT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset16);
+ /* Attribute of 16 bits signed int */
+ adims[0] = F66_XDIM * F66_YDIM16;
+ aspace = H5Screate_simple(1, adims, NULL);
+ attr = H5Acreate2(dataset, F66_DATASETS16, H5T_STD_I16LE, aspace, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(attr, H5T_NATIVE_INT16, aset16);
+ H5Aclose(attr);
+ H5Sclose(aspace);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 32 bits signed int */
+ dims[0] = F66_XDIM; dims[1] = F66_YDIM32;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F66_DATASETS32, H5T_STD_I32LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ val32bits = (int32_t) ~0; /* all 1s */
+ for(i = 0; i < dims[0]; i++){
+ dset32[i][0] = val32bits;
+ aset32[i*dims[1]] = dset32[i][0];
+ for(j = 1; j < dims[1]; j++) {
+ dset32[i][j] = dset32[i][j-1] << 1;
+ aset32[i*dims[1]+j] = dset32[i][j];
+ }
+ val32bits <<= 1;
+ }
+
+ H5Dwrite(dataset, H5T_NATIVE_INT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32);
+ /* Attribute of 32 bits signed int */
+ adims[0] = F66_XDIM * F66_YDIM32;
+ aspace = H5Screate_simple(1, adims, NULL);
+ attr = H5Acreate2(dataset, F66_DATASETS32, H5T_STD_I32LE, aspace, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(attr, H5T_NATIVE_INT32, aset32);
+ H5Aclose(attr);
+ H5Sclose(aspace);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 64 bits signed int */
+ dims[0] = F66_XDIM; dims[1] = F66_YDIM64;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F66_DATASETS64, H5T_STD_I64LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ val64bits = (int64_t) ~0L; /* all 1s */
+ for(i = 0; i < dims[0]; i++){
+ dset64[i][0] = val64bits;
+ aset64[i*dims[1]] = dset64[i][0];
+ for(j = 1; j < dims[1]; j++) {
+ dset64[i][j] = dset64[i][j-1] << 1;
+ aset64[i*dims[1]+j] = dset64[i][j];
+ }
+ val64bits <<= 1;
+ }
+
+ H5Dwrite(dataset, H5T_NATIVE_INT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64);
+ /* Attribute of 64 bits signed int */
+ adims[0] = F66_XDIM * F66_YDIM64;
+ aspace = H5Screate_simple(1, adims, NULL);
+ attr = H5Acreate2(dataset, F66_DATASETS64, H5T_STD_I64LE, aspace, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(attr, H5T_NATIVE_INT64, aset64);
+ H5Aclose(attr);
+ H5Sclose(aspace);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Double Dummy set for failure tests */
+ dims[0] = F66_XDIM; dims[1] = F66_YDIM8;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F66_DUMMYDBL, H5T_IEEE_F64BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ for(i = 0; i < dims[0]; i++)
+ for(j = 0; j < dims[1]; j++) {
+ dsetdbl[i][j] = 0.0001F * j + i;
+ asetdbl[i*dims[1]+j] = dsetdbl[i][j];
+ }
+
+ H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl);
+ /* Attribute of double */
+ adims[0] = F66_XDIM * F66_YDIM8;
+ aspace = H5Screate_simple(1, adims, NULL);
+ attr = H5Acreate2(dataset, F66_DUMMYDBL, H5T_IEEE_F64BE, aspace, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(attr, H5T_NATIVE_DOUBLE, asetdbl);
+ H5Aclose(attr);
+ H5Sclose(aspace);
+ H5Sclose(space);
+ H5Dclose(dataset);
+ H5Fclose(fid);
+}
+
+static void gent_bitnopaquefields(void)
+{
+ /* Compound datatype */
+ typedef struct s_t
+ {
+ unsigned char a;
+ unsigned int b;
+ unsigned long c;
+ unsigned long long d;
+ } s_t;
+ hid_t file, grp=-1, type=-1, space=-1, dset=-1;
+ size_t i;
+ hsize_t nelmts = F80_DIM32;
+ unsigned char buf[F80_DIM32]; /* bitfield, opaque */
+ unsigned int buf2[F80_DIM32]; /* bitfield, opaque */
+ unsigned long buf3[F80_DIM32]; /* bitfield, opaque */
+ unsigned long long buf4[F80_DIM32]; /* bitfield, opaque */
+ s_t buf5[F80_DIM32]; /* compound */
+
+ file = H5Fcreate(FILE80, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ if ((grp = H5Gcreate2(file, "bittypetests", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ /* bitfield_1 */
+ if ((type = H5Tcopy(H5T_STD_B8LE)) >= 0) {
+ if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
+ if ((dset = H5Dcreate2(grp, "bitfield_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ for (i = 0; i < nelmts; i++) {
+ buf[i] = (unsigned char)0xff ^ (unsigned char)i;
+ }
+ H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
+ H5Dclose(dset);
+ }
+ H5Sclose(space);
+ }
+ H5Tclose(type);
+ }
+
+ /* bitfield_2 */
+ if ((type = H5Tcopy(H5T_STD_B16LE)) >= 0) {
+ if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
+ if ((dset = H5Dcreate2(grp, "bitfield_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ for (i = 0; i < nelmts; i++) {
+ buf2[i] = (unsigned int)0xffff ^ (unsigned int)(i * 16);
+ }
+ H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2);
+ H5Dclose(dset);
+ }
+ H5Sclose(space);
+ }
+ H5Tclose(type);
+ }
+
+ /* bitfield_3 */
+ if ((type = H5Tcopy(H5T_STD_B32LE)) >= 0) {
+ if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
+ if ((dset = H5Dcreate2(grp, "bitfield_3", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ for (i = 0; i < nelmts; i++) {
+ buf3[i] = (unsigned long)0xffffffff ^ (unsigned long)(i * 32);
+ }
+ H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf3);
+ H5Dclose(dset);
+ }
+ H5Sclose(space);
+ }
+ H5Tclose(type);
+ }
+
+ /* bitfield_4 */
+ if ((type = H5Tcopy(H5T_STD_B64LE)) >= 0) {
+ if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
+ if ((dset = H5Dcreate2(grp, "bitfield_4", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ for (i = 0; i < nelmts; i++) {
+ buf4[i] = (unsigned long long)0xffffffffffffffff ^ (unsigned long long)(i * 64);
+ }
+ H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf4);
+ H5Dclose(dset);
+ }
+ H5Sclose(space);
+ }
+ H5Tclose(type);
+ }
+
+ H5Gclose(grp);
+ }
+
+ if ((grp = H5Gcreate2(file, "opaquetypetests", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ /* opaque_1 */
+ if ((type = H5Tcreate(H5T_OPAQUE, 1)) >= 0) {
+ if ((H5Tset_tag(type, "1-byte opaque type")) >= 0) {
+ if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
+ if ((dset = H5Dcreate2(grp, "opaque_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ for(i = 0; i < nelmts; i++)
+ buf[i] = (unsigned char)0xff ^ (unsigned char)i;
+ H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
+ H5Dclose(dset);
+ }
+ H5Sclose(space);
+ }
+ }
+ H5Tclose(type);
+ }
+
+ /* opaque_2 */
+ if ((type = H5Tcreate(H5T_OPAQUE, 2)) >= 0) {
+ if ((H5Tset_tag(type, "2-byte opaque type")) >= 0) {
+ if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
+ if ((dset = H5Dcreate2(grp, "opaque_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ for(i = 0; i < nelmts; i++)
+ buf2[i] = (unsigned int)0xffff ^ (unsigned int)(i * 16);
+
+ H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2);
+ H5Dclose(dset);
+ }
+ H5Sclose(space);
+ }
+ }
+ H5Tclose(type);
+ }
+ H5Gclose(grp);
+ }
+
+ if ((grp = H5Gcreate2(file, "cmpdtypetests", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ /* compound_1 */
+ if ((type = H5Tcreate(H5T_COMPOUND, sizeof(s_t))) >= 0) {
+ H5Tinsert(type, "a", HOFFSET(s_t, a), H5T_STD_B8LE);
+ H5Tinsert(type, "b", HOFFSET(s_t, b), H5T_STD_B16LE);
+ H5Tinsert(type, "c", HOFFSET(s_t, c), H5T_STD_B32LE);
+ H5Tinsert(type, "d", HOFFSET(s_t, d), H5T_STD_B64LE);
+ if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
+ if ((dset = H5Dcreate2(grp, "compound_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ for(i = 0; i < nelmts; i++) {
+ buf5[i].a = (unsigned char)0xff ^ (unsigned char)i;
+ buf5[i].b = (unsigned int)0xffff ^ (unsigned int)(i * 16);
+ buf5[i].c = (unsigned long)0xffffffff ^ (unsigned long)(i * 32);
+ buf5[i].d = (unsigned long long)0xffffffffffffffff ^ (unsigned long long)(i * 64);
+ }
+
+ H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5);
+ H5Dclose(dset);
+ }
+ H5Sclose(space);
+ }
+ H5Tclose(type);
+ }
+ H5Gclose(grp);
+ }
+
+ H5Fclose(file);
+}
+
+
/*-------------------------------------------------------------------------
* Function: main
*
@@ -8611,6 +9767,11 @@ int main(void)
gent_intscalars();
gent_attr_intscalars();
gent_string_scalars();
+ gent_compound_int_array();
+ gent_compound_ints();
+ gent_intattrscalars();
+ gent_intsattrs();
+ gent_bitnopaquefields();
return 0;
}
diff --git a/tools/h5dump/testh5dumppbits.sh.in b/tools/h5dump/testh5dumppbits.sh.in
index 6556ff5..4211c63 100644
--- a/tools/h5dump/testh5dumppbits.sh.in
+++ b/tools/h5dump/testh5dumppbits.sh.in
@@ -28,10 +28,10 @@ EXIT_FAILURE=1
DUMPER=h5dump # The tool name
DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary
-H5DIFF=../h5diff/h5diff # The h5diff tool name
+H5DIFF=../h5diff/h5diff # The h5diff tool name
H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary
-H5IMPORT=../h5import/h5import # The h5import tool name
+H5IMPORT=../h5import/h5import # The h5import tool name
H5IMPORT_BIN=`pwd`/$H5IMPORT # The path of the h5import tool binary
RM='rm -rf'
@@ -81,59 +81,59 @@ $SRC_H5DUMP_TESTFILES/tcompound.h5
"
LIST_OTHER_TEST_FILES="
-$SRC_H5DUMP_TESTFILES/tnofilename-with-packed-bits.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsArray.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsCompound.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsIncomplete.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsLengthExceeded.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsCharLengthExceeded.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsIntLengthExceeded.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsLongLengthExceeded.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsLengthPositive.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsMax.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsMaxExceeded.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsOffsetExceeded.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsCharOffsetExceeded.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsIntOffsetExceeded.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsLongOffsetExceeded.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsOffsetNegative.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsOverlapped.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsSigned.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsUnsigned.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsSignedInt.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsUnsignedInt.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsSignedLong.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLong.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLong.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLong.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsSignedWhole.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsUnsignedWhole.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsSignedIntWhole.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsUnsignedIntWhole.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsSignedLongWhole.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongWhole.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLongWhole.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLongWhole.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLongWhole1.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLongWhole1.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLongWhole63.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLongWhole63.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsSigned4.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsUnsigned4.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsSignedInt8.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsUnsignedInt8.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsSignedLong16.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLong16.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLong32.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLong32.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsSigned2.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsUnsigned2.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsSignedInt4.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsUnsignedInt4.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsSignedLong8.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLong8.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLong16.ddl
-$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLong16.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tnofilename-with-packed-bits.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsArray.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsCompound.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsIncomplete.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsLengthExceeded.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsCharLengthExceeded.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsIntLengthExceeded.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsLongLengthExceeded.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsLengthPositive.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsMax.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsMaxExceeded.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsOffsetExceeded.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsCharOffsetExceeded.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsIntOffsetExceeded.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsLongOffsetExceeded.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsOffsetNegative.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsOverlapped.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsSigned.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsigned.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedInt.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedInt.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLong.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLong.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLongLong.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLongLong.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedWhole.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedWhole.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedIntWhole.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedIntWhole.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLongWhole.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLongWhole.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLongLongWhole.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLongLongWhole.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLongLongWhole1.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLongLongWhole1.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLongLongWhole63.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLongLongWhole63.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsSigned4.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsigned4.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedInt8.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedInt8.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLong16.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLong16.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLongLong32.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLongLong32.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsSigned2.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsigned2.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedInt4.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedInt4.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLong8.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLong8.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsSignedLongLong16.ddl
+$SRC_H5DUMP_TESTFILES/pbits/tpbitsUnsignedLongLong16.ddl
"
LIST_ERROR_TEST_FILES="
@@ -173,10 +173,10 @@ COPY_TESTFILES_TO_TESTDIR()
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
- $CP -f $tstfile $TESTDIR
+ $CP -f $tstfile $TESTDIR
if [ $? -ne 0 ]; then
echo "Error: FAILED to copy $tstfile ."
-
+
# Comment out this to CREATE expected file
exit $EXIT_FAILURE
fi
@@ -303,7 +303,7 @@ TOOLTEST2() {
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 $actualdata $actual_err
@@ -434,7 +434,7 @@ SKIP() {
TESTING $DUMPER $@
echo " -SKIP-"
}
-
+
# Print a line-line message left justified in a field of 70 characters
#
PRINT_H5DIFF() {
@@ -445,7 +445,7 @@ PRINT_H5DIFF() {
# Call the h5diff tool
#
-DIFFTEST()
+DIFFTEST()
{
PRINT_H5DIFF $@
(
@@ -459,7 +459,7 @@ DIFFTEST()
else
echo " PASSED"
fi
-
+
}
# Print a line-line message left justified in a field of 70 characters
@@ -472,7 +472,7 @@ PRINT_H5IMPORT() {
# Call the h5import tool
#
-IMPORTTEST()
+IMPORTTEST()
{
# remove the output hdf5 file if it exists
hdf5_file="$TESTDIR/$5"
@@ -483,7 +483,7 @@ IMPORTTEST()
PRINT_H5IMPORT $@
(
cd $TESTDIR
- $RUNSERIAL $H5IMPORT_BIN "$@"
+ $RUNSERIAL $H5IMPORT_BIN "$@"
)
RET=$?
if [ $RET != 0 ] ; then
@@ -492,7 +492,7 @@ IMPORTTEST()
else
echo " PASSED"
fi
-
+
}
diff --git a/tools/h5jam/testh5jam.sh.in b/tools/h5jam/testh5jam.sh.in
index 8e4aca7..1664d6b 100644
--- a/tools/h5jam/testh5jam.sh.in
+++ b/tools/h5jam/testh5jam.sh.in
@@ -509,10 +509,10 @@ TOOLTEST_OUTPUT() {
# Create the expect file if it doesn't yet exist.
echo " CREATED"
cp $actual $expect
- rm -f $actual $actual_err
+ rm -f $actual $actual_sav $actual_err $actual_err_sav
elif $CMP $expect $actual; then
echo " PASSED"
- rm -f $actual $actual_err
+ rm -f $actual $actual_sav $actual_err $actual_err_sav
else
echo "*FAILED*"
echo " Expected result differs from actual result"
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 22518d6..4273607 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -48,6 +48,7 @@
static char *h5tools_escape(char *s, size_t size);
static hbool_t h5tools_str_is_zero(const void *_mem, size_t size);
static void h5tools_print_char(h5tools_str_t *str, const h5tool_format_t *info, char ch);
+void h5tools_str_indent(h5tools_str_t *str, const h5tool_format_t *info, h5tools_context_t *ctx);
/*-------------------------------------------------------------------------
* Function: h5tools_str_close
@@ -144,16 +145,16 @@ h5tools_str_append(h5tools_str_t *str/*in,out*/, const char *fmt, ...)
nchars = HDvsnprintf(str->s + str->len, avail, fmt, ap);
HDva_end(ap);
- /* Note: HDvsnprintf() behaves differently on Windows as Unix, when
- * buffer is smaller than source string. On Unix, this function
- * returns length of the source string and copy string upto the
- * buffer size with NULL at the end of the buffer. However on
- * Windows with the same condition, this function returns -1 and
+ /* Note: HDvsnprintf() behaves differently on Windows as Unix, when
+ * buffer is smaller than source string. On Unix, this function
+ * returns length of the source string and copy string upto the
+ * buffer size with NULL at the end of the buffer. However on
+ * Windows with the same condition, this function returns -1 and
* doesn't add NULL at the end of the buffer.
* Because of this different return results, the strlen of the new string
* is used to handle when HDvsnprintf() returns -1 on Windows due
* to lack of buffer size, so try one more time after realloc more
- * buffer size before return NULL.
+ * buffer size before return NULL.
*/
if (nchars < 0) {
/* failure, such as bad format */
@@ -277,7 +278,7 @@ h5tools_str_fmt(h5tools_str_t *str/*in,out*/, size_t start, const char *fmt)
if (HDstrchr(fmt, '%')) {
size_t n = sizeof(_temp);
if (str->len - start + 1 > n) {
- n = str->len - start + 1;
+ n = str->len - start + 1;
temp = (char*)HDmalloc(n);
HDassert(temp);
}
@@ -665,12 +666,12 @@ h5tools_str_indent(h5tools_str_t *str, const h5tool_format_t *info,
*
* PVN, 28 March 2006
* added H5T_NATIVE_LDOUBLE case
- *
+ *
* Raymond Lu, 2011-09-01
* CLANG compiler complained about the line (about 800):
* tempint = (tempint >> packed_data_offset) & packed_data_mask;
- * The right shift may cause undefined behavior if PACKED_DATA_OFFSET is
- * 32-bit or more. For every kind of native integers, I changed the code
+ * The right shift may cause undefined behavior if PACKED_DATA_OFFSET is
+ * 32-bit or more. For every kind of native integers, I changed the code
* to make it zero if PACKED_DATA_OFFSET is greater than or equal to the
* size of integer.
*-------------------------------------------------------------------------
@@ -1371,14 +1372,14 @@ h5tools_str_is_zero(const void *_mem, size_t size)
*
* Purpose: replace all occurrences of substring.
*
- * Return: char *
+ * Return: char *
*
* Programmer: Peter Cao
* March 8, 2012
*
* Notes:
- * Applications need to call free() to free the memoery allocated for
- * the return string
+ * Applications need to call free() to free the memoery allocated for
+ * the return string
*
*-------------------------------------------------------------------------
*/
@@ -1411,6 +1412,6 @@ h5tools_str_replace ( const char *string, const char *substr, const char *replac
head = newstr + (tok - oldstr) + HDstrlen( replacement );
HDfree (oldstr);
}
-
+
return newstr;
}
diff --git a/tools/testfiles/tnofilename-with-packed-bits.ddl b/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl
index 64a2880..64a2880 100644
--- a/tools/testfiles/tnofilename-with-packed-bits.ddl
+++ b/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl
diff --git a/tools/testfiles/tpbitsArray.ddl b/tools/testfiles/pbits/tpbitsArray.ddl
index 125abb8..125abb8 100644
--- a/tools/testfiles/tpbitsArray.ddl
+++ b/tools/testfiles/pbits/tpbitsArray.ddl
diff --git a/tools/testfiles/tpbitsCharLengthExceeded.ddl b/tools/testfiles/pbits/tpbitsCharLengthExceeded.ddl
index b0683a7..b0683a7 100644
--- a/tools/testfiles/tpbitsCharLengthExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsCharLengthExceeded.ddl
diff --git a/tools/testfiles/tpbitsCharOffsetExceeded.ddl b/tools/testfiles/pbits/tpbitsCharOffsetExceeded.ddl
index 530fa05..530fa05 100644
--- a/tools/testfiles/tpbitsCharOffsetExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsCharOffsetExceeded.ddl
diff --git a/tools/testfiles/tpbitsCompound.ddl b/tools/testfiles/pbits/tpbitsCompound.ddl
index c84272a..c84272a 100644
--- a/tools/testfiles/tpbitsCompound.ddl
+++ b/tools/testfiles/pbits/tpbitsCompound.ddl
diff --git a/tools/testfiles/tpbitsIncomplete.ddl b/tools/testfiles/pbits/tpbitsIncomplete.ddl
index cdb1f91..cdb1f91 100644
--- a/tools/testfiles/tpbitsIncomplete.ddl
+++ b/tools/testfiles/pbits/tpbitsIncomplete.ddl
diff --git a/tools/testfiles/tpbitsIntLengthExceeded.ddl b/tools/testfiles/pbits/tpbitsIntLengthExceeded.ddl
index 1c919cd..1c919cd 100644
--- a/tools/testfiles/tpbitsIntLengthExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsIntLengthExceeded.ddl
diff --git a/tools/testfiles/tpbitsIntOffsetExceeded.ddl b/tools/testfiles/pbits/tpbitsIntOffsetExceeded.ddl
index f3b2a8c..f3b2a8c 100644
--- a/tools/testfiles/tpbitsIntOffsetExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsIntOffsetExceeded.ddl
diff --git a/tools/testfiles/tpbitsLengthExceeded.ddl b/tools/testfiles/pbits/tpbitsLengthExceeded.ddl
index 6d2492a..6d2492a 100644
--- a/tools/testfiles/tpbitsLengthExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsLengthExceeded.ddl
diff --git a/tools/testfiles/tpbitsLengthPositive.ddl b/tools/testfiles/pbits/tpbitsLengthPositive.ddl
index 4f56619..4f56619 100644
--- a/tools/testfiles/tpbitsLengthPositive.ddl
+++ b/tools/testfiles/pbits/tpbitsLengthPositive.ddl
diff --git a/tools/testfiles/tpbitsLongLengthExceeded.ddl b/tools/testfiles/pbits/tpbitsLongLengthExceeded.ddl
index 812c300..812c300 100644
--- a/tools/testfiles/tpbitsLongLengthExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsLongLengthExceeded.ddl
diff --git a/tools/testfiles/tpbitsLongOffsetExceeded.ddl b/tools/testfiles/pbits/tpbitsLongOffsetExceeded.ddl
index cbea722..cbea722 100644
--- a/tools/testfiles/tpbitsLongOffsetExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsLongOffsetExceeded.ddl
diff --git a/tools/testfiles/tpbitsMax.ddl b/tools/testfiles/pbits/tpbitsMax.ddl
index e569488..e569488 100644
--- a/tools/testfiles/tpbitsMax.ddl
+++ b/tools/testfiles/pbits/tpbitsMax.ddl
diff --git a/tools/testfiles/tpbitsMaxExceeded.ddl b/tools/testfiles/pbits/tpbitsMaxExceeded.ddl
index 3432433..3432433 100644
--- a/tools/testfiles/tpbitsMaxExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsMaxExceeded.ddl
diff --git a/tools/testfiles/tpbitsOffsetExceeded.ddl b/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl
index e51a09e..e51a09e 100644
--- a/tools/testfiles/tpbitsOffsetExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl
diff --git a/tools/testfiles/tpbitsOffsetNegative.ddl b/tools/testfiles/pbits/tpbitsOffsetNegative.ddl
index ba6e46d..ba6e46d 100644
--- a/tools/testfiles/tpbitsOffsetNegative.ddl
+++ b/tools/testfiles/pbits/tpbitsOffsetNegative.ddl
diff --git a/tools/testfiles/tpbitsOverlapped.ddl b/tools/testfiles/pbits/tpbitsOverlapped.ddl
index 9dcc9d2..9dcc9d2 100644
--- a/tools/testfiles/tpbitsOverlapped.ddl
+++ b/tools/testfiles/pbits/tpbitsOverlapped.ddl
diff --git a/tools/testfiles/tpbitsSigned.ddl b/tools/testfiles/pbits/tpbitsSigned.ddl
index b843388..b843388 100644
--- a/tools/testfiles/tpbitsSigned.ddl
+++ b/tools/testfiles/pbits/tpbitsSigned.ddl
diff --git a/tools/testfiles/tpbitsSigned2.ddl b/tools/testfiles/pbits/tpbitsSigned2.ddl
index 932b5fd..932b5fd 100644
--- a/tools/testfiles/tpbitsSigned2.ddl
+++ b/tools/testfiles/pbits/tpbitsSigned2.ddl
diff --git a/tools/testfiles/tpbitsSigned4.ddl b/tools/testfiles/pbits/tpbitsSigned4.ddl
index 9eacd83..9eacd83 100644
--- a/tools/testfiles/tpbitsSigned4.ddl
+++ b/tools/testfiles/pbits/tpbitsSigned4.ddl
diff --git a/tools/testfiles/tpbitsSignedInt.ddl b/tools/testfiles/pbits/tpbitsSignedInt.ddl
index 5c37e77..5c37e77 100644
--- a/tools/testfiles/tpbitsSignedInt.ddl
+++ b/tools/testfiles/pbits/tpbitsSignedInt.ddl
diff --git a/tools/testfiles/tpbitsSignedInt4.ddl b/tools/testfiles/pbits/tpbitsSignedInt4.ddl
index 4e9f0f6..4e9f0f6 100644
--- a/tools/testfiles/tpbitsSignedInt4.ddl
+++ b/tools/testfiles/pbits/tpbitsSignedInt4.ddl
diff --git a/tools/testfiles/tpbitsSignedInt8.ddl b/tools/testfiles/pbits/tpbitsSignedInt8.ddl
index f2d6069..f2d6069 100644
--- a/tools/testfiles/tpbitsSignedInt8.ddl
+++ b/tools/testfiles/pbits/tpbitsSignedInt8.ddl
diff --git a/tools/testfiles/tpbitsSignedIntWhole.ddl b/tools/testfiles/pbits/tpbitsSignedIntWhole.ddl
index 598c446..598c446 100644
--- a/tools/testfiles/tpbitsSignedIntWhole.ddl
+++ b/tools/testfiles/pbits/tpbitsSignedIntWhole.ddl
diff --git a/tools/testfiles/tpbitsSignedLong.ddl b/tools/testfiles/pbits/tpbitsSignedLong.ddl
index b3eba61..b3eba61 100644
--- a/tools/testfiles/tpbitsSignedLong.ddl
+++ b/tools/testfiles/pbits/tpbitsSignedLong.ddl
diff --git a/tools/testfiles/tpbitsSignedLong16.ddl b/tools/testfiles/pbits/tpbitsSignedLong16.ddl
index 83fa889..83fa889 100644
--- a/tools/testfiles/tpbitsSignedLong16.ddl
+++ b/tools/testfiles/pbits/tpbitsSignedLong16.ddl
diff --git a/tools/testfiles/tpbitsSignedLong8.ddl b/tools/testfiles/pbits/tpbitsSignedLong8.ddl
index e99b1d0..e99b1d0 100644
--- a/tools/testfiles/tpbitsSignedLong8.ddl
+++ b/tools/testfiles/pbits/tpbitsSignedLong8.ddl
diff --git a/tools/testfiles/tpbitsSignedLongLong.ddl b/tools/testfiles/pbits/tpbitsSignedLongLong.ddl
index 2be8a55..2be8a55 100644
--- a/tools/testfiles/tpbitsSignedLongLong.ddl
+++ b/tools/testfiles/pbits/tpbitsSignedLongLong.ddl
diff --git a/tools/testfiles/tpbitsSignedLongLong16.ddl b/tools/testfiles/pbits/tpbitsSignedLongLong16.ddl
index 44e336d..44e336d 100644
--- a/tools/testfiles/tpbitsSignedLongLong16.ddl
+++ b/tools/testfiles/pbits/tpbitsSignedLongLong16.ddl
diff --git a/tools/testfiles/tpbitsSignedLongLong32.ddl b/tools/testfiles/pbits/tpbitsSignedLongLong32.ddl
index 6ab4ac4..6ab4ac4 100644
--- a/tools/testfiles/tpbitsSignedLongLong32.ddl
+++ b/tools/testfiles/pbits/tpbitsSignedLongLong32.ddl
diff --git a/tools/testfiles/tpbitsSignedLongLongWhole.ddl b/tools/testfiles/pbits/tpbitsSignedLongLongWhole.ddl
index 134f3be..134f3be 100644
--- a/tools/testfiles/tpbitsSignedLongLongWhole.ddl
+++ b/tools/testfiles/pbits/tpbitsSignedLongLongWhole.ddl
diff --git a/tools/testfiles/tpbitsSignedLongLongWhole1.ddl b/tools/testfiles/pbits/tpbitsSignedLongLongWhole1.ddl
index 7431670..7431670 100644
--- a/tools/testfiles/tpbitsSignedLongLongWhole1.ddl
+++ b/tools/testfiles/pbits/tpbitsSignedLongLongWhole1.ddl
diff --git a/tools/testfiles/tpbitsSignedLongLongWhole63.ddl b/tools/testfiles/pbits/tpbitsSignedLongLongWhole63.ddl
index c7cc65f..c7cc65f 100644
--- a/tools/testfiles/tpbitsSignedLongLongWhole63.ddl
+++ b/tools/testfiles/pbits/tpbitsSignedLongLongWhole63.ddl
diff --git a/tools/testfiles/tpbitsSignedLongWhole.ddl b/tools/testfiles/pbits/tpbitsSignedLongWhole.ddl
index e583f1d..e583f1d 100644
--- a/tools/testfiles/tpbitsSignedLongWhole.ddl
+++ b/tools/testfiles/pbits/tpbitsSignedLongWhole.ddl
diff --git a/tools/testfiles/tpbitsSignedWhole.ddl b/tools/testfiles/pbits/tpbitsSignedWhole.ddl
index f044e23..f044e23 100644
--- a/tools/testfiles/tpbitsSignedWhole.ddl
+++ b/tools/testfiles/pbits/tpbitsSignedWhole.ddl
diff --git a/tools/testfiles/tpbitsUnsigned.ddl b/tools/testfiles/pbits/tpbitsUnsigned.ddl
index 9e7ac50..9e7ac50 100644
--- a/tools/testfiles/tpbitsUnsigned.ddl
+++ b/tools/testfiles/pbits/tpbitsUnsigned.ddl
diff --git a/tools/testfiles/tpbitsUnsigned2.ddl b/tools/testfiles/pbits/tpbitsUnsigned2.ddl
index b7e6f79..b7e6f79 100644
--- a/tools/testfiles/tpbitsUnsigned2.ddl
+++ b/tools/testfiles/pbits/tpbitsUnsigned2.ddl
diff --git a/tools/testfiles/tpbitsUnsigned4.ddl b/tools/testfiles/pbits/tpbitsUnsigned4.ddl
index d25d838..d25d838 100644
--- a/tools/testfiles/tpbitsUnsigned4.ddl
+++ b/tools/testfiles/pbits/tpbitsUnsigned4.ddl
diff --git a/tools/testfiles/tpbitsUnsignedInt.ddl b/tools/testfiles/pbits/tpbitsUnsignedInt.ddl
index 5e0fefe..5e0fefe 100644
--- a/tools/testfiles/tpbitsUnsignedInt.ddl
+++ b/tools/testfiles/pbits/tpbitsUnsignedInt.ddl
diff --git a/tools/testfiles/tpbitsUnsignedInt4.ddl b/tools/testfiles/pbits/tpbitsUnsignedInt4.ddl
index 0d3e38f..0d3e38f 100644
--- a/tools/testfiles/tpbitsUnsignedInt4.ddl
+++ b/tools/testfiles/pbits/tpbitsUnsignedInt4.ddl
diff --git a/tools/testfiles/tpbitsUnsignedInt8.ddl b/tools/testfiles/pbits/tpbitsUnsignedInt8.ddl
index 861ed3e..861ed3e 100644
--- a/tools/testfiles/tpbitsUnsignedInt8.ddl
+++ b/tools/testfiles/pbits/tpbitsUnsignedInt8.ddl
diff --git a/tools/testfiles/tpbitsUnsignedIntWhole.ddl b/tools/testfiles/pbits/tpbitsUnsignedIntWhole.ddl
index c054011..c054011 100644
--- a/tools/testfiles/tpbitsUnsignedIntWhole.ddl
+++ b/tools/testfiles/pbits/tpbitsUnsignedIntWhole.ddl
diff --git a/tools/testfiles/tpbitsUnsignedLong.ddl b/tools/testfiles/pbits/tpbitsUnsignedLong.ddl
index 9f8bcb4..9f8bcb4 100644
--- a/tools/testfiles/tpbitsUnsignedLong.ddl
+++ b/tools/testfiles/pbits/tpbitsUnsignedLong.ddl
diff --git a/tools/testfiles/tpbitsUnsignedLong16.ddl b/tools/testfiles/pbits/tpbitsUnsignedLong16.ddl
index 7a1984f..7a1984f 100644
--- a/tools/testfiles/tpbitsUnsignedLong16.ddl
+++ b/tools/testfiles/pbits/tpbitsUnsignedLong16.ddl
diff --git a/tools/testfiles/tpbitsUnsignedLong8.ddl b/tools/testfiles/pbits/tpbitsUnsignedLong8.ddl
index 17b896c..17b896c 100644
--- a/tools/testfiles/tpbitsUnsignedLong8.ddl
+++ b/tools/testfiles/pbits/tpbitsUnsignedLong8.ddl
diff --git a/tools/testfiles/tpbitsUnsignedLongLong.ddl b/tools/testfiles/pbits/tpbitsUnsignedLongLong.ddl
index 1cd9a6c..1cd9a6c 100644
--- a/tools/testfiles/tpbitsUnsignedLongLong.ddl
+++ b/tools/testfiles/pbits/tpbitsUnsignedLongLong.ddl
diff --git a/tools/testfiles/tpbitsUnsignedLongLong16.ddl b/tools/testfiles/pbits/tpbitsUnsignedLongLong16.ddl
index f8b0189..f8b0189 100644
--- a/tools/testfiles/tpbitsUnsignedLongLong16.ddl
+++ b/tools/testfiles/pbits/tpbitsUnsignedLongLong16.ddl
diff --git a/tools/testfiles/tpbitsUnsignedLongLong32.ddl b/tools/testfiles/pbits/tpbitsUnsignedLongLong32.ddl
index befaf5b..befaf5b 100644
--- a/tools/testfiles/tpbitsUnsignedLongLong32.ddl
+++ b/tools/testfiles/pbits/tpbitsUnsignedLongLong32.ddl
diff --git a/tools/testfiles/tpbitsUnsignedLongLongWhole.ddl b/tools/testfiles/pbits/tpbitsUnsignedLongLongWhole.ddl
index 27c8879..27c8879 100644
--- a/tools/testfiles/tpbitsUnsignedLongLongWhole.ddl
+++ b/tools/testfiles/pbits/tpbitsUnsignedLongLongWhole.ddl
diff --git a/tools/testfiles/tpbitsUnsignedLongLongWhole1.ddl b/tools/testfiles/pbits/tpbitsUnsignedLongLongWhole1.ddl
index 0302105..0302105 100644
--- a/tools/testfiles/tpbitsUnsignedLongLongWhole1.ddl
+++ b/tools/testfiles/pbits/tpbitsUnsignedLongLongWhole1.ddl
diff --git a/tools/testfiles/tpbitsUnsignedLongLongWhole63.ddl b/tools/testfiles/pbits/tpbitsUnsignedLongLongWhole63.ddl
index 6a9b503..6a9b503 100644
--- a/tools/testfiles/tpbitsUnsignedLongLongWhole63.ddl
+++ b/tools/testfiles/pbits/tpbitsUnsignedLongLongWhole63.ddl
diff --git a/tools/testfiles/tpbitsUnsignedLongWhole.ddl b/tools/testfiles/pbits/tpbitsUnsignedLongWhole.ddl
index 50ad02f..50ad02f 100644
--- a/tools/testfiles/tpbitsUnsignedLongWhole.ddl
+++ b/tools/testfiles/pbits/tpbitsUnsignedLongWhole.ddl
diff --git a/tools/testfiles/tpbitsUnsignedWhole.ddl b/tools/testfiles/pbits/tpbitsUnsignedWhole.ddl
index 7c9e736..7c9e736 100644
--- a/tools/testfiles/tpbitsUnsignedWhole.ddl
+++ b/tools/testfiles/pbits/tpbitsUnsignedWhole.ddl