summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/h5dumpgentest.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5dump/h5dumpgentest.c')
-rw-r--r--tools/h5dump/h5dumpgentest.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index ca55696..c74e800 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -3495,6 +3493,7 @@ static void gent_array8(void)
status = H5Dwrite (dset, filetype, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
HDassert(status >= 0);
}
+
/*
* Close and release resources.
*/
@@ -9569,18 +9568,19 @@ static void gent_bitnopaquefields(void)
/* Compound datatype */
typedef struct s_t
{
- unsigned char a;
- unsigned int b;
- unsigned long c;
- unsigned long long d;
+ uint8_t a;
+ uint16_t b;
+ uint32_t c;
+ uint64_t 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 */
+ uint8_t buf[F80_DIM32]; /* bitfield, opaque */
+ uint16_t buf2[F80_DIM32]; /* bitfield, opaque */
+ uint32_t buf3[F80_DIM32]; /* bitfield, opaque */
+ uint64_t buf4[F80_DIM32]; /* bitfield, opaque */
s_t buf5[F80_DIM32]; /* compound */
file = H5Fcreate(FILE80, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -9591,7 +9591,7 @@ static void gent_bitnopaquefields(void)
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;
+ buf[i] = (uint8_t)0xff ^ (uint8_t)i;
}
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
H5Dclose(dset);
@@ -9606,7 +9606,7 @@ static void gent_bitnopaquefields(void)
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);
+ buf2[i] = (uint16_t)0xffff ^ (uint16_t)(i * 16);
}
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2);
H5Dclose(dset);
@@ -9621,7 +9621,7 @@ static void gent_bitnopaquefields(void)
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);
+ buf3[i] = (uint32_t)0xffffffff ^ (uint32_t)(i * 32);
}
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf3);
H5Dclose(dset);
@@ -9636,7 +9636,7 @@ static void gent_bitnopaquefields(void)
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);
+ buf4[i] = (uint64_t)0xffffffffffffffff ^ (uint64_t)(i * 64);
}
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf4);
H5Dclose(dset);
@@ -9656,7 +9656,7 @@ static void gent_bitnopaquefields(void)
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;
+ buf[i] = (uint8_t)0xff ^ (uint8_t)i;
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
H5Dclose(dset);
}
@@ -9672,7 +9672,7 @@ static void gent_bitnopaquefields(void)
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);
+ buf2[i] = (uint16_t)0xffff ^ (uint16_t)(i * 16);
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2);
H5Dclose(dset);
@@ -9695,10 +9695,10 @@ static void gent_bitnopaquefields(void)
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);
+ buf5[i].a = (uint8_t)0xff ^ (uint8_t)i;
+ buf5[i].b = (uint16_t)0xffff ^ (uint16_t)(i * 16);
+ buf5[i].c = (uint32_t)0xffffffff ^ (uint32_t)(i * 32);
+ buf5[i].d = (uint64_t)0xffffffffffffffff ^ (uint64_t)(i * 64);
}
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5);