summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-10-09 04:18:18 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-10-09 04:18:18 (GMT)
commit14dcb6db33f88011c3499d439c53890ab09d1ba2 (patch)
treecc05060f7dd94342c2e06726ef6b550bf4a7d8f1 /tools
parent20720af231c875330a6074f65ee1c54e6a806fbb (diff)
downloadhdf5-14dcb6db33f88011c3499d439c53890ab09d1ba2.zip
hdf5-14dcb6db33f88011c3499d439c53890ab09d1ba2.tar.gz
hdf5-14dcb6db33f88011c3499d439c53890ab09d1ba2.tar.bz2
[svn-r12736] Description:
Add "use the latest format" support for dataspace object header encode/ decode routines and clean up format a bit for the latest format (new to 1.8.x releases) Remove storing 'perm' parameter for array datatypes in memory and the file, and add test to make certain that if any user applications are attempting to store them, we get some reports back. (Should be unlikely, since the RefMan says that the parameter is not implemented and is unsupported). Carry those changes into the tests, etc. Clean up a bunch more compiler warnings. Tested on: FreeBSD/32 4.11 (sleipnir) w/threadsafe Linux/32 2.4 (heping) w/FORTRAN & C++ Linux/64 2.4 (mir) w/enable-1.6-compat
Diffstat (limited to 'tools')
-rw-r--r--tools/h5diff/h5diffgentest.c12
-rw-r--r--tools/h5dump/h5dump.c29
-rw-r--r--tools/h5dump/h5dumpgentest.c131
-rw-r--r--tools/h5ls/h5ls.c17
-rw-r--r--tools/h5repack/h5repack.c8
-rw-r--r--tools/h5repack/h5repack.h12
-rw-r--r--tools/h5repack/h5repack_copy.c6
-rw-r--r--tools/h5repack/h5repack_filters.c1
-rw-r--r--tools/h5repack/h5repack_list.c4
-rw-r--r--tools/h5repack/h5repack_main.c2
-rw-r--r--tools/h5repack/testh5repack_attr.c6
-rw-r--r--tools/h5repack/testh5repack_dset.c6
-rw-r--r--tools/h5repack/testh5repack_main.c92
-rw-r--r--tools/lib/h5diff_array.c9
-rw-r--r--tools/lib/h5tools.c2
-rw-r--r--tools/lib/h5tools_str.c117
-rw-r--r--tools/lib/h5tools_str.h1
-rw-r--r--tools/lib/talign.c255
-rw-r--r--tools/misc/h5stat.c3
-rw-r--r--tools/testfiles/tarray1.h5.xml2
-rw-r--r--tools/testfiles/tarray2.h5.xml6
-rw-r--r--tools/testfiles/tarray3.h5.xml6
-rw-r--r--tools/testfiles/tarray6.h5.xml2
-rw-r--r--tools/testfiles/tarray7.h5.xml4
-rw-r--r--tools/testfiles/tcompound.h5.xml6
-rw-r--r--tools/testfiles/tcompound2.h5.xml6
-rw-r--r--tools/testfiles/tcompound_complex.h5.xml8
-rw-r--r--tools/testfiles/tempty-dtd-2.h5.xml2
-rw-r--r--tools/testfiles/tempty-dtd-uri.h5.xml2
-rw-r--r--tools/testfiles/tempty-dtd.h5.xml2
-rw-r--r--tools/testfiles/tempty-nons-2.h5.xml2
-rw-r--r--tools/testfiles/tempty-nons-uri.h5.xml2
-rw-r--r--tools/testfiles/tempty-nons.h5.xml2
-rw-r--r--tools/testfiles/tempty-ns-2.h5.xml2
-rw-r--r--tools/testfiles/tempty-ns.h5.xml2
-rw-r--r--tools/testfiles/tempty.h5.xml2
-rw-r--r--tools/testfiles/tmany.h5.xml24
-rw-r--r--tools/testfiles/tnestedcomp.h5.xml2
-rw-r--r--tools/testfiles/tsaf.h5.xml8
-rw-r--r--tools/testfiles/tstr.h5.xml8
40 files changed, 387 insertions, 426 deletions
diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c
index ac2fb65..1f78b68 100644
--- a/tools/h5diff/h5diffgentest.c
+++ b/tools/h5diff/h5diffgentest.c
@@ -675,7 +675,7 @@ void write_dset_in(hid_t loc_id,
}
}
- tid = H5Tarray_create(H5T_NATIVE_INT,1,dimarray,NULL);
+ tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL);
write_dset(loc_id,1,dims,"array",tid,buf6);
status = H5Tclose(tid);
@@ -824,7 +824,7 @@ void write_dset_in(hid_t loc_id,
}
- tid = H5Tarray_create(H5T_NATIVE_INT,1,dimarray,NULL);
+ tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL);
write_dset(loc_id,2,dims2,"array2D",tid,buf62);
status = H5Tclose(tid);
@@ -1008,7 +1008,7 @@ void write_dset_in(hid_t loc_id,
}
}
- tid = H5Tarray_create(H5T_NATIVE_INT,1,dimarray,NULL);
+ tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL);
write_dset(loc_id,3,dims3,"array3D",tid,buf63);
status = H5Tclose(tid);
@@ -1334,7 +1334,7 @@ position array of </g1> array of </g1> difference
[ 1 ] 5 0 5
[ 1 ] 6 0 6
*/
- tid = H5Tarray_create(H5T_NATIVE_INT,1,dimarray,NULL);
+ tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL);
write_attr(loc_id,1,dims,"array",tid,buf6);
status = H5Tclose(tid);
@@ -1613,7 +1613,7 @@ position array2D of </g1> array2D of </g1> difference
[ 2 1 ] 17 0 17
[ 2 1 ] 18 0 18
*/
- tid = H5Tarray_create(H5T_NATIVE_INT,1,dimarray,NULL);
+ tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL);
write_attr(loc_id,2,dims2,"array2D",tid,buf62);
status = H5Tclose(tid);
@@ -2001,7 +2001,7 @@ etc
etc
*/
- tid = H5Tarray_create(H5T_NATIVE_INT,1,dimarray,NULL);
+ tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL);
write_attr(loc_id,3,dims3,"array3D",tid,buf63);
status = H5Tclose(tid);
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 979ddc9..fdee5d1 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -686,7 +686,6 @@ print_datatype(hid_t type,unsigned in_group)
char *fname;
hid_t mtype, str_type;
unsigned nmembers;
- int perm[H5DUMP_MAX_RANK];
unsigned ndims;
unsigned i;
size_t size=0;
@@ -1062,7 +1061,7 @@ done:
/* Get array information */
ndims = H5Tget_array_ndims(type);
- H5Tget_array_dims(type, dims, perm);
+ H5Tget_array_dims(type, dims, NULL);
/* Print array dimensions */
for (i = 0; i < ndims; i++)
@@ -2100,7 +2099,7 @@ dump_subsetting_header(struct subset_t *sset, int dims)
*-------------------------------------------------------------------------
*/
static void
-dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int display_ai)
+dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int display_index)
{
h5tool_format_t *outputformat = &dataformat;
int status = -1;
@@ -2115,7 +2114,7 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int display_ai)
outputformat->line_ncols = nCols;
outputformat->do_escape=display_escape;
/* print the matrix indices */
- outputformat->pindex=display_ai;
+ outputformat->pindex=display_index;
if (outputformat->pindex) {
outputformat->idx_fmt = "(%s): ";
outputformat->idx_n_fmt = "%lu";
@@ -4282,7 +4281,6 @@ xml_print_datatype(hid_t type, unsigned in_group)
char *fname;
hid_t mtype;
unsigned nmembers;
- int perm[H5DUMP_MAX_RANK];
unsigned ndims;
unsigned i;
size_t size;
@@ -4608,24 +4606,15 @@ xml_print_datatype(hid_t type, unsigned in_group)
printf("%u\">\n", ndims);
/* Get array information */
- H5Tget_array_dims(type, dims, perm);
+ H5Tget_array_dims(type, dims, NULL);
/* list of dimensions */
indent += COL;
- if (perm != NULL) {
- /* for each dimension, list */
- for (i = 0; i < ndims; i++) {
- indentation(indent);
- printf("<%sArrayDimension DimSize=\"%u\" DimPerm=\"%u\"/>\n",
- xmlnsprefix,(int) dims[i], (int) perm[i]);
- }
- } else {
- for (i = 0; i < ndims; i++) {
- indentation(indent);
- printf("<%sArrayDimension DimSize=\"%u\" DimPerm=\"0\"/>\n",
- xmlnsprefix,
- (int) dims[i]);
- }
+ for (i = 0; i < ndims; i++) {
+ indentation(indent);
+ printf("<%sArrayDimension DimSize=\"%u\"/>\n",
+ xmlnsprefix,
+ (int) dims[i]);
}
indent -= COL;
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index 45142e3..e6454a8 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -548,7 +548,8 @@ static void gent_compound_dt(void) { /* test compound data type */
} dset5_t;
dset5_t dset5[5];
- int i, j, k, l, ndims;
+ int i, j, k, l;
+ unsigned ndims;
hsize_t dim[2];
hsize_t sdim = 5;
@@ -612,21 +613,21 @@ static void gent_compound_dt(void) { /* test compound data type */
ndims = 1; dim[0] = 4;
- array_dt=H5Tarray_create(H5T_STD_I32BE,ndims,dim,NULL);
+ array_dt = H5Tarray_create(H5T_STD_I32BE, ndims, dim, NULL);
H5Tinsert(type, "int_array", HOFFSET(dset3_t, a), array_dt);
H5Tclose(array_dt);
- array_dt=H5Tarray_create(H5T_NATIVE_INT,ndims,dim,NULL);
+ array_dt = H5Tarray_create(H5T_NATIVE_INT, ndims, dim, NULL);
H5Tinsert(type2, "int_array", HOFFSET(dset3_t, a), array_dt);
H5Tclose(array_dt);
ndims = 2; dim[0] = 5; dim[1] = 6;
- array_dt=H5Tarray_create(H5T_IEEE_F32BE,ndims,dim,NULL);
+ array_dt = H5Tarray_create(H5T_IEEE_F32BE, ndims, dim, NULL);
H5Tinsert(type, "float_array", HOFFSET(dset3_t, b), array_dt);
H5Tclose(array_dt);
- array_dt=H5Tarray_create(H5T_NATIVE_FLOAT,ndims,dim,NULL);
+ array_dt = H5Tarray_create(H5T_NATIVE_FLOAT, ndims, dim, NULL);
H5Tinsert(type2, "float_array", HOFFSET(dset3_t, b), array_dt);
H5Tclose(array_dt);
@@ -735,8 +736,8 @@ static void gent_compound_dt2(void) { /* test compound data type */
} dset5_t;
dset5_t dset5[10];
- int i, ndims;
- const int perm[2]={0,1};
+ int i;
+ unsigned ndims;
hsize_t dim[2];
hsize_t sdim, maxdim;
@@ -819,12 +820,12 @@ static void gent_compound_dt2(void) { /* test compound data type */
type = H5Tcreate (H5T_COMPOUND, sizeof(dset3_t));
ndims = 1; dim[0] = 4;
- array_dt=H5Tarray_create(H5T_STD_I32BE,ndims,dim,perm);
+ array_dt = H5Tarray_create(H5T_STD_I32BE, ndims, dim, NULL);
H5Tinsert(type, "int_array", HOFFSET(dset3_t, a), array_dt);
H5Tclose(array_dt);
ndims = 2; dim[0] = 5; dim[1] = 6;
- array_dt=H5Tarray_create(H5T_IEEE_F32BE,ndims,dim,perm);
+ array_dt = H5Tarray_create(H5T_IEEE_F32BE, ndims, dim, NULL);
H5Tinsert(type, "float_array", HOFFSET(dset3_t, b), array_dt);
H5Tclose(array_dt);
@@ -1102,8 +1103,6 @@ static void gent_many(void)
dset1_t dset1[6];
hsize_t dim[4];
- int idx[4] = {0,1,2,3}; /* normal indicies */
- const int perm[4] = {0,1,2,3}; /* the 0'th and the 3'rd indices are permuted */
herr_t ret;
fid = H5Fcreate(FILE12, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -1121,29 +1120,29 @@ static void gent_many(void)
type = H5Tcreate (H5T_COMPOUND, sizeof(dset1[0]));
dim[0] = dim[1] = dim[2] = dim[3] = 2;
- array_dt=H5Tarray_create(H5T_STD_I32BE,4,dim,perm);
+ array_dt = H5Tarray_create(H5T_STD_I32BE, 4, dim, NULL);
H5Tinsert(type, "a_array", HOFFSET(dset1_t, a), array_dt);
H5Tclose(array_dt);
- array_dt=H5Tarray_create(H5T_IEEE_F64BE,4,dim,perm);
+ array_dt = H5Tarray_create(H5T_IEEE_F64BE, 4, dim, NULL);
H5Tinsert(type, "b_array", HOFFSET(dset1_t, b), array_dt);
H5Tclose(array_dt);
- array_dt=H5Tarray_create(H5T_IEEE_F64BE,4,dim,perm);
+ array_dt = H5Tarray_create(H5T_IEEE_F64BE, 4, dim, NULL);
H5Tinsert(type, "c_array", HOFFSET(dset1_t, c), array_dt);
H5Tclose(array_dt);
type2 = H5Tcreate (H5T_COMPOUND, sizeof(dset1[0]));
- array_dt=H5Tarray_create(H5T_NATIVE_INT,4,dim,perm);
+ array_dt = H5Tarray_create(H5T_NATIVE_INT, 4, dim, NULL);
H5Tinsert(type2, "a_array", HOFFSET(dset1_t, a), array_dt);
H5Tclose(array_dt);
- array_dt=H5Tarray_create(H5T_NATIVE_DOUBLE,4,dim,perm);
+ array_dt = H5Tarray_create(H5T_NATIVE_DOUBLE,4,dim, NULL);
H5Tinsert(type2, "b_array", HOFFSET(dset1_t, b), array_dt);
H5Tclose(array_dt);
- array_dt=H5Tarray_create(H5T_NATIVE_DOUBLE,4,dim,perm);
+ array_dt = H5Tarray_create(H5T_NATIVE_DOUBLE, 4, dim, NULL);
H5Tinsert(type2, "c_array", HOFFSET(dset1_t, c), array_dt);
H5Tclose(array_dt);
@@ -1174,33 +1173,29 @@ static void gent_many(void)
dims[0] = 10;
space2 = H5Screate_simple(1, dims, NULL);
attr = H5Acreate (dataset, "attr3", H5T_IEEE_F64BE, space2, H5P_DEFAULT);
- for (i = 0; i < 10; i++) d[i] = 0.1 * i;
+ for (i = 0; i < 10; i++)
+ d[i] = 0.1 * i;
H5Awrite(attr, H5T_NATIVE_DOUBLE, d);
H5Sclose(space2);
H5Aclose(attr);
- for (j=0; j<(int)sdim; j++) {
- for (i3 = 0; i3 < 2; i3++) {
- idx[perm[3]] = i3;
- for (i2 = 0; i2 < 2; i2++) {
- idx[perm[2]] = i2;
- for (i1 = 0; i1 < 2; i1++) {
- idx[perm[1]] = i1;
- for (i0 = 0; i0 < 2; i0++) {
- idx[perm[0]] = i0;
-
- dset1[j].a[idx[3]][idx[2]][idx[1]][idx[0]] = i0+j;
- dset1[j].b[idx[3]][idx[2]][idx[1]][idx[0]] = (double)(i0+j);
+ for (j=0; j<(int)sdim; j++) {
+ for (i3 = 0; i3 < 2; i3++) {
+ for (i2 = 0; i2 < 2; i2++) {
+ for (i1 = 0; i1 < 2; i1++) {
+ for (i0 = 0; i0 < 2; i0++) {
+ dset1[j].a[i3][i2][i1][i0] = i0+j;
+ dset1[j].b[i3][i2][i1][i0] = (double)(i0+j);
#ifdef WIN32
- dset1[j].c[idx[3]][idx[2]][idx[1]][idx[0]] = (double)(i0+j+(signed __int64)sdim);
+ dset1[j].c[i3][i2][i1][i0] = (double)(i0+j+(signed __int64)sdim);
#else
- dset1[j].c[idx[3]][idx[2]][idx[1]][idx[0]] = (double)(i0+j+sdim);
+ dset1[j].c[i3][i2][i1][i0] = (double)(i0+j+sdim);
#endif
- }
- }
- }
- }
- }
+ }
+ }
+ }
+ }
+ }
H5Dwrite(dataset, type2, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1);
@@ -1388,24 +1383,24 @@ static void gent_str(void) {
mdims[0] = 8; mdims[1] = 10;
- array_dt=H5Tarray_create(H5T_STD_I32BE,2,mdims,NULL);
+ array_dt = H5Tarray_create(H5T_STD_I32BE, 2, mdims, NULL);
H5Tinsert(f_type, "int_array", HOFFSET(compound_t, a), array_dt);
H5Tclose(array_dt);
- array_dt=H5Tarray_create(H5T_NATIVE_INT,2,mdims,NULL);
+ array_dt = H5Tarray_create(H5T_NATIVE_INT, 2, mdims, NULL);
H5Tinsert(f_type2, "int_array", HOFFSET(compound_t, a), array_dt);
H5Tclose(array_dt);
mdims[0] = 3; mdims[1] = 4;
str_type = mkstr(32, H5T_STR_SPACEPAD);
- array_dt=H5Tarray_create(str_type,2,mdims,NULL);
+ array_dt = H5Tarray_create(str_type, 2, mdims, NULL);
H5Tinsert(f_type, "string", HOFFSET(compound_t, s), array_dt);
H5Tclose(array_dt);
H5Tclose(str_type);
str_type = mkstr(33, H5T_STR_NULLTERM);
- array_dt=H5Tarray_create(str_type,2,mdims,NULL);
+ array_dt = H5Tarray_create(str_type, 2, mdims, NULL);
H5Tinsert(f_type2, "string", HOFFSET(compound_t, s), array_dt);
H5Tclose(array_dt);
H5Tclose(str_type);
@@ -1859,7 +1854,7 @@ static void gent_nestcomp(void)
hid_t char_id; /* Handle for the string datatype */
hid_t array_dt;
hsize_t array_dims[] = {2}; /* Dataspace dimensions */
- int ndims = 1; /* Number of dimensions in the array field */
+ unsigned ndims = 1; /* Number of dimensions in the array field */
s2_t s1[10];
hid_t s2_tid; /* File datatype identifier */
@@ -1907,7 +1902,7 @@ static void gent_nestcomp(void)
H5Tset_strpad(char_id, H5T_STR_NULLTERM);
H5Tinsert(cmp_tid, "char_name", HOFFSET(cmp_t, a), char_id);
- array_dt=H5Tarray_create(H5T_NATIVE_FLOAT,ndims,array_dims,NULL);
+ array_dt = H5Tarray_create(H5T_NATIVE_FLOAT, ndims, array_dims, NULL);
H5Tinsert(cmp_tid, "array_name", HOFFSET(cmp_t, b), array_dt);
H5Tclose(array_dt);
@@ -2416,7 +2411,7 @@ static void gent_array1(void)
sid1 = H5Screate_simple(SPACE1_RANK, sdims1, NULL);
/* Create a datatype to refer to */
- tid1 = H5Tarray_create (H5T_NATIVE_INT,ARRAY1_RANK,tdims1,NULL);
+ tid1 = H5Tarray_create(H5T_NATIVE_INT, ARRAY1_RANK, tdims1, NULL);
/* Create a dataset */
dataset=H5Dcreate(fid1,"Dataset1",tid1,sid1,H5P_DEFAULT);
@@ -2462,7 +2457,7 @@ static void gent_array2(void)
sid = H5Screate_simple(SPACE1_RANK, sdims1, NULL);
/* Create a datatype to refer to */
- tid = H5Tarray_create (H5T_NATIVE_INT,ARRAY2_RANK,tdims2,NULL);
+ tid = H5Tarray_create(H5T_NATIVE_INT, ARRAY2_RANK, tdims2, NULL);
/* Create a dataset */
dataset=H5Dcreate(fid,"Dataset1",tid,sid,H5P_DEFAULT);
@@ -2510,10 +2505,10 @@ static void gent_array3(void)
sid = H5Screate_simple(SPACE1_RANK, sdims1, NULL);
/* Create a 2-D datatype to refer to */
- tid2 = H5Tarray_create (H5T_NATIVE_INT,ARRAY3_RANK,tdims2,NULL);
+ tid2 = H5Tarray_create(H5T_NATIVE_INT, ARRAY3_RANK, tdims2, NULL);
/* Create a 1-D datatype to refer to */
- tid1 = H5Tarray_create (tid2,ARRAY1_RANK,tdims1,NULL);
+ tid1 = H5Tarray_create(tid2, ARRAY1_RANK, tdims1, NULL);
/* Create a dataset */
dataset=H5Dcreate(fid,"Dataset1",tid1,sid,H5P_DEFAULT);
@@ -2577,7 +2572,7 @@ static void gent_array4(void)
assert(ret>=0);
/* Create an array datatype to refer to */
- tid1 = H5Tarray_create (tid2,ARRAY1_RANK,tdims1,NULL);
+ tid1 = H5Tarray_create(tid2, ARRAY1_RANK, tdims1, NULL);
/* Close compound datatype */
ret=H5Tclose(tid2);
@@ -2641,7 +2636,7 @@ static void gent_array5(void)
assert(ret>=0);
/* Create an array of floats datatype */
- tid3 = H5Tarray_create (H5T_NATIVE_FLOAT,ARRAY1_RANK,tdims1,NULL);
+ tid3 = H5Tarray_create(H5T_NATIVE_FLOAT, ARRAY1_RANK, tdims1, NULL);
/* Insert float array field */
ret = H5Tinsert (tid2, "f", HOFFSET(s2_t,f), tid3);
@@ -2652,7 +2647,7 @@ static void gent_array5(void)
assert(ret>=0);
/* Create an array datatype to refer to */
- tid1 = H5Tarray_create (tid2,ARRAY1_RANK,tdims1,NULL);
+ tid1 = H5Tarray_create(tid2, ARRAY1_RANK, tdims1, NULL);
/* Close compound datatype */
ret=H5Tclose(tid2);
@@ -2708,7 +2703,7 @@ static void gent_array6(void)
tid2 = H5Tvlen_create(H5T_NATIVE_UINT);
/* Create an array datatype to refer to */
- tid1 = H5Tarray_create (tid2,ARRAY1_RANK,tdims1,NULL);
+ tid1 = H5Tarray_create(tid2, ARRAY1_RANK, tdims1, NULL);
/* Close VL datatype */
ret=H5Tclose(tid2);
@@ -2767,7 +2762,7 @@ static void gent_array7(void)
sid1 = H5Screate_simple(SPACE1_RANK, sdims1, NULL);
/* Create the nested array datatype to refer to */
- tid3 = H5Tarray_create(H5T_NATIVE_UINT,ARRAY1_RANK,tdims1,NULL);
+ tid3 = H5Tarray_create(H5T_NATIVE_UINT, ARRAY1_RANK, tdims1, NULL);
/* Create a VL datatype of 1-D arrays to refer to */
tid2 = H5Tvlen_create(tid3);
@@ -2777,7 +2772,7 @@ static void gent_array7(void)
assert(ret>=0);
/* Create an array datatype to refer to */
- tid1 = H5Tarray_create (tid2,ARRAY1_RANK,tdims1,NULL);
+ tid1 = H5Tarray_create(tid2, ARRAY1_RANK, tdims1, NULL);
/* Close VL datatype */
ret=H5Tclose(tid2);
@@ -2842,7 +2837,7 @@ static void gent_empty(void)
assert(ret>=0);
/* write out an empty array dataset */
- type = H5Tarray_create(H5T_NATIVE_INT,SPACE1_RANK,dims,NULL);
+ type = H5Tarray_create(H5T_NATIVE_INT, SPACE1_RANK, dims, NULL);
dset = H5Dcreate(file, "Dataset4.0", type, space, H5P_DEFAULT);
/* Don't write any data */
ret = H5Dclose(dset);
@@ -3326,7 +3321,7 @@ static void write_attr_in(hid_t loc_id,
* H5T_ARRAY
*-------------------------------------------------------------------------
*/
- tid = H5Tarray_create(H5T_NATIVE_INT,1,dimarray,NULL);
+ tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL);
write_attr(loc_id,1,dims,"array",tid,buf6);
status = H5Tclose(tid);
@@ -3436,7 +3431,7 @@ static void write_attr_in(hid_t loc_id,
* H5T_ARRAY
*-------------------------------------------------------------------------
*/
- tid = H5Tarray_create(H5T_NATIVE_INT,1,dimarray,NULL);
+ tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL);
write_attr(loc_id,2,dims2,"array2D",tid,buf62);
status = H5Tclose(tid);
@@ -3575,7 +3570,7 @@ static void write_attr_in(hid_t loc_id,
}
}
- tid = H5Tarray_create(H5T_NATIVE_INT,1,dimarray,NULL);
+ tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL);
write_attr(loc_id,3,dims3,"array3D",tid,buf63);
status = H5Tclose(tid);
@@ -3768,7 +3763,7 @@ static void write_dset_in(hid_t loc_id,
* H5T_ARRAY
*-------------------------------------------------------------------------
*/
- tid = H5Tarray_create(H5T_NATIVE_INT,1,dimarray,NULL);
+ tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL);
write_dset(loc_id,1,dims,"array",tid,buf6);
status = H5Tclose(tid);
@@ -3878,7 +3873,7 @@ static void write_dset_in(hid_t loc_id,
* H5T_ARRAY
*-------------------------------------------------------------------------
*/
- tid = H5Tarray_create(H5T_NATIVE_INT,1,dimarray,NULL);
+ tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL);
write_dset(loc_id,2,dims2,"array2D",tid,buf62);
status = H5Tclose(tid);
@@ -4030,7 +4025,7 @@ static void write_dset_in(hid_t loc_id,
}
}
- tid = H5Tarray_create(H5T_NATIVE_INT,1,dimarray,NULL);
+ tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL);
write_dset(loc_id,3,dims3,"array3D",tid,buf63);
status = H5Tclose(tid);
@@ -4289,8 +4284,7 @@ static void gent_compound_complex(void)
assert (status >= 0);
/* Create the array data type for the string array */
- str_array_id = H5Tarray_create(array_tid, F41_ARRAY_RANK,
- array_dimb, NULL);
+ str_array_id = H5Tarray_create(array_tid, F41_ARRAY_RANK, array_dimb, NULL);
assert (str_array_id >= 0);
/* Copy the array data type for the character array */
@@ -4302,13 +4296,11 @@ static void gent_compound_complex(void)
assert (status >= 0);
/* Create the array data type for the character array */
- array2_tid = H5Tarray_create(H5T_NATIVE_SHORT, F41_ARRAY_RANKd,
- array_dimd, NULL);
+ array2_tid = H5Tarray_create(H5T_NATIVE_SHORT, F41_ARRAY_RANKd, array_dimd, NULL);
assert (array2_tid >= 0);
/* Create the array data type for the character array */
- array4_tid = H5Tarray_create(H5T_NATIVE_DOUBLE, F41_ARRAY_RANK,
- array_dimf, NULL);
+ array4_tid = H5Tarray_create(H5T_NATIVE_DOUBLE, F41_ARRAY_RANK, array_dimf, NULL);
assert (array4_tid >= 0);
/* Create the memory data type */
@@ -5232,7 +5224,7 @@ static void gent_fvalues(void)
* dataset with a H5T_ARRAY fill value
*-------------------------------------------------------------------------
*/
- tid = H5Tarray_create(H5T_NATIVE_INT,1,dimarray,NULL);
+ tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL);
write_dset(fid,1,dims,"fill_array",tid,buf4);
ret = H5Tclose(tid);
@@ -5568,7 +5560,8 @@ error:
*
*-------------------------------------------------------------------------
*/
-static void gent_binary()
+static void
+gent_binary(void)
{
hid_t fid, sid, did, tid;
hsize_t dims[1] = {6};
@@ -5606,7 +5599,7 @@ static void gent_binary()
* array
*-------------------------------------------------------------------------
*/
- tid = H5Tarray_create(H5T_NATIVE_INT,1,dims,NULL);
+ tid = H5Tarray_create(H5T_NATIVE_INT, 1, dims, NULL);
sid = H5Screate_simple(1, dimarray, NULL);
did = H5Dcreate(fid, "array", tid, sid, H5P_DEFAULT);
H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, abuf);
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index 978baf2..04a9371 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -1057,34 +1057,21 @@ static hbool_t
display_array_type(hid_t type, int ind)
{
hid_t super;
- int ndims, i, *perm=NULL, identity;
+ int ndims, i;
hsize_t *dims=NULL;
if (H5T_ARRAY!=H5Tget_class(type)) return FALSE;
ndims = H5Tget_array_ndims(type);
if (ndims) {
dims = malloc(ndims*sizeof(dims[0]));
- perm = malloc(ndims*sizeof(perm[0]));
- H5Tget_array_dims(type, dims, perm);
+ H5Tget_array_dims(type, dims, NULL);
/* Print dimensions */
for (i=0; i<ndims; i++)
HDfprintf(stdout, "%s%Hu" , i?",":"[", dims[i]);
putchar(']');
- /* Print permutation vector if not identity */
- for (i=0, identity=TRUE; identity && i<ndims; i++) {
- if (i!=perm[i]) identity = FALSE;
- }
- if (!identity) {
- fputs(" perm=[", stdout);
- for (i=0; i<ndims; i++)
- HDfprintf(stdout, "%s%d", i?",":"", perm[i]);
- putchar(']');
- }
-
free(dims);
- free(perm);
} else {
fputs(" [SCALAR]", stdout);
}
diff --git a/tools/h5repack/h5repack.c b/tools/h5repack/h5repack.c
index cc39201..3469704 100644
--- a/tools/h5repack/h5repack.c
+++ b/tools/h5repack/h5repack.c
@@ -68,20 +68,18 @@ static void aux_initglb_filter(pack_opt_t *options)
*/
int h5repack(const char* infile,
const char* outfile,
- pack_opt_t *options,
- int argc,
- const char *argv[])
+ pack_opt_t *options)
{
/* check input */
if (check_options(options)<0)
return -1;
/* check for objects in input that are in the file */
- if (check_objects(infile,options,argc,argv)<0)
+ if (check_objects(infile,options) < 0)
return -1;
/* copy the objects */
- if (copy_objects(infile,outfile,options,argc,argv)<0)
+ if (copy_objects(infile,outfile,options) < 0)
return -1;
diff --git a/tools/h5repack/h5repack.h b/tools/h5repack/h5repack.h
index e859347..29909b7 100644
--- a/tools/h5repack/h5repack.h
+++ b/tools/h5repack/h5repack.h
@@ -114,8 +114,7 @@ typedef struct {
extern "C" {
#endif
-int h5repack (const char* infile, const char* outfile, pack_opt_t *options,
- int argc, const char *argv[]);
+int h5repack (const char* infile, const char* outfile, pack_opt_t *options);
int h5repack_addfilter (const char* str, pack_opt_t *options);
int h5repack_addlayout (const char* str, pack_opt_t *options);
int h5repack_init (pack_opt_t *options, int verbose);
@@ -138,15 +137,11 @@ int h5repack_cmpdcpl (const char *fname1,
int check_objects(const char* fname,
- pack_opt_t *options,
- int argc,
- const char *argv[]);
+ pack_opt_t *options);
int copy_objects(const char* fnamein,
const char* fnameout,
- pack_opt_t *options,
- int argc,
- const char *argv[]);
+ pack_opt_t *options);
void print_objlist(const char *filename,
int nobjects,
@@ -184,7 +179,6 @@ int apply_filters(const char* name, /* object name from traverse list */
int rank, /* rank of dataset */
hsize_t *dims, /* dimensions of dataset */
hid_t dcpl_id, /* dataset creation property list */
- hid_t type_id, /* datatype */
pack_opt_t *options); /* repack options */
int has_filter(hid_t dcpl_id,
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index b2c375c..b0677ef 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -168,9 +168,7 @@ static void print_dataset_info(hid_t dcpl_id,
int copy_objects(const char* fnamein,
const char* fnameout,
- pack_opt_t *options,
- int argc,
- const char *argv[])
+ pack_opt_t *options)
{
hid_t fidin;
hid_t fidout;
@@ -431,7 +429,7 @@ int do_copy_objects(hid_t fidin,
*-------------------------------------------------------------------------
*/
if (apply_s){
- if (apply_filters(travt->objs[i].name,rank,dims,dcpl_out,mtype_id,options)<0)
+ if (apply_filters(travt->objs[i].name,rank,dims,dcpl_out,options)<0)
goto error;
}
diff --git a/tools/h5repack/h5repack_filters.c b/tools/h5repack/h5repack_filters.c
index 75ca771..60a0336 100644
--- a/tools/h5repack/h5repack_filters.c
+++ b/tools/h5repack/h5repack_filters.c
@@ -190,7 +190,6 @@ int apply_filters(const char* name, /* object name from traverse list */
int rank, /* rank of dataset */
hsize_t *dims, /* dimensions of dataset */
hid_t dcpl_id, /* dataset creation property list */
- hid_t type_id, /* dataset datatype */
pack_opt_t *options) /* repack options */
{
int nfilters; /* number of filters in DCPL */
diff --git a/tools/h5repack/h5repack_list.c b/tools/h5repack/h5repack_list.c
index 32cbc24..9912732 100644
--- a/tools/h5repack/h5repack_list.c
+++ b/tools/h5repack/h5repack_list.c
@@ -36,9 +36,7 @@ extern char *progname;
*-------------------------------------------------------------------------
*/
int check_objects(const char* fname,
- pack_opt_t *options,
- int argc,
- const char *argv[])
+ pack_opt_t *options)
{
hid_t fid;
int i;
diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c
index 92433f9..074f937 100644
--- a/tools/h5repack/h5repack_main.c
+++ b/tools/h5repack/h5repack_main.c
@@ -120,7 +120,7 @@ int main(int argc, char **argv)
}
/* pack it */
- ret=h5repack(infile,outfile,&options,argc,argv);
+ ret=h5repack(infile,outfile,&options);
/* free tables */
h5repack_end(&options);
diff --git a/tools/h5repack/testh5repack_attr.c b/tools/h5repack/testh5repack_attr.c
index 7635cf2..5064aa1 100644
--- a/tools/h5repack/testh5repack_attr.c
+++ b/tools/h5repack/testh5repack_attr.c
@@ -319,7 +319,7 @@ position array of </g1> array of </g1> difference
[ 1 ] 5 0 5
[ 1 ] 6 0 6
*/
- type_id = H5Tarray_create(H5T_NATIVE_INT,1,dimarray,NULL);
+ type_id = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL);
make_attr(loc_id,1,dims,"array",type_id,buf6);
status = H5Tclose(type_id);
@@ -598,7 +598,7 @@ position array2D of </g1> array2D of </g1> difference
[ 2 1 ] 17 0 17
[ 2 1 ] 18 0 18
*/
- type_id = H5Tarray_create(H5T_NATIVE_INT,1,dimarray,NULL);
+ type_id = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL);
make_attr(loc_id,2,dims2,"array2D",type_id,buf62);
status = H5Tclose(type_id);
@@ -986,7 +986,7 @@ etc
etc
*/
- type_id = H5Tarray_create(H5T_NATIVE_INT,1,dimarray,NULL);
+ type_id = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL);
make_attr(loc_id,3,dims3,"array3D",type_id,buf63);
status = H5Tclose(type_id);
diff --git a/tools/h5repack/testh5repack_dset.c b/tools/h5repack/testh5repack_dset.c
index 244aaae..0e6fbc2 100644
--- a/tools/h5repack/testh5repack_dset.c
+++ b/tools/h5repack/testh5repack_dset.c
@@ -255,7 +255,7 @@ void write_dset_in(hid_t loc_id,
}
}
- type_id = H5Tarray_create(H5T_NATIVE_INT,1,dimarray,NULL);
+ type_id = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL);
write_dset(loc_id,1,dims,"array",type_id,buf6);
status = H5Tclose(type_id);
@@ -404,7 +404,7 @@ void write_dset_in(hid_t loc_id,
}
- type_id = H5Tarray_create(H5T_NATIVE_INT,1,dimarray,NULL);
+ type_id = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL);
write_dset(loc_id,2,dims2,"array2D",type_id,buf62);
status = H5Tclose(type_id);
@@ -587,7 +587,7 @@ void write_dset_in(hid_t loc_id,
}
}
- type_id = H5Tarray_create(H5T_NATIVE_INT,1,dimarray,NULL);
+ type_id = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL);
write_dset(loc_id,3,dims3,"array3D",type_id,buf63);
status = H5Tclose(type_id);
diff --git a/tools/h5repack/testh5repack_main.c b/tools/h5repack/testh5repack_main.c
index e219497..9ecef36 100644
--- a/tools/h5repack/testh5repack_main.c
+++ b/tools/h5repack/testh5repack_main.c
@@ -69,7 +69,7 @@ int main (int argc, const char *argv[])
TESTING(" copy of datasets (fill values)");
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
- if (h5repack(FNAME0,FNAME0OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME0,FNAME0OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME0,FNAME0OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -90,7 +90,7 @@ int main (int argc, const char *argv[])
TESTING(" copy of datasets (all datatypes)");
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
- if (h5repack(FNAME1,FNAME1OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME1,FNAME1OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME1,FNAME1OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -109,7 +109,7 @@ int main (int argc, const char *argv[])
TESTING(" copy of datasets (attributes)");
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
- if (h5repack(FNAME2,FNAME2OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME2,FNAME2OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME2,FNAME2OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -129,7 +129,7 @@ int main (int argc, const char *argv[])
TESTING(" copy of datasets (hardlinks)");
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
- if (h5repack(FNAME3,FNAME3OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME3,FNAME3OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME3,FNAME3OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -149,7 +149,7 @@ int main (int argc, const char *argv[])
TESTING(" copy of allocation early file");
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
- if (h5repack(FNAME5,FNAME5OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME5,FNAME5OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME5,FNAME5OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -183,7 +183,7 @@ int main (int argc, const char *argv[])
TEST_ERROR;
if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -211,7 +211,7 @@ int main (int argc, const char *argv[])
TEST_ERROR;
if (h5repack_addlayout("CHUNK=20x10",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -249,7 +249,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addlayout("dset2:CHUNK=20x10",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -279,7 +279,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addfilter("SZIP=8,NN",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -312,7 +312,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -341,7 +341,7 @@ TESTING(" addding shuffle filter to all");
TEST_ERROR;
if (h5repack_addlayout("CHUNK=20x10",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -372,7 +372,7 @@ TESTING(" addding shuffle filter to all");
TEST_ERROR;
if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -402,7 +402,7 @@ TESTING(" addding shuffle filter to all");
TEST_ERROR;
if (h5repack_addlayout("CHUNK=20x10",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -451,7 +451,7 @@ if (szip_can_encode) {
TEST_ERROR;
#endif
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -474,7 +474,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -494,7 +494,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addlayout("CHUNK=20x10",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -515,7 +515,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addlayout("dset1:CONTI",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -536,7 +536,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addlayout("CONTI",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -558,7 +558,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addlayout("dset1:COMPA",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -579,7 +579,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addlayout("COMPA",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -601,7 +601,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addlayout("dset_compact:CONTI",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -621,7 +621,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addlayout("dset_compact:CHUNK=2x5",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -641,7 +641,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addlayout("dset_compact:COMPA",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -660,7 +660,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addlayout("dset_contiguous:COMPA",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -679,7 +679,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addlayout("dset_contiguous:CHUNK=3x6",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -699,7 +699,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addlayout("dset_contiguous:CONTI",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -718,7 +718,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addlayout("dset_chunk:COMPA",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -738,7 +738,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addlayout("dset_chunk:CONTI",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -757,7 +757,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addlayout("dset_chunk:CHUNK=18x13",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -785,7 +785,7 @@ if (szip_can_encode) {
if (szip_can_encode) {
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
- if (h5repack(FNAME7,FNAME7OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME7,FNAME7OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME7,FNAME7OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -810,7 +810,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addfilter("dset_szip:NONE",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME7,FNAME7OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME7,FNAME7OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME7,FNAME7OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -833,7 +833,7 @@ if (szip_can_encode) {
#ifdef H5_HAVE_FILTER_DEFLATE
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
- if (h5repack(FNAME8,FNAME8OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME8,FNAME8OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME8,FNAME8OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -855,7 +855,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addfilter("dset_deflate:NONE",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME8,FNAME8OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME8,FNAME8OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME8,FNAME8OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -876,7 +876,7 @@ if (szip_can_encode) {
#ifdef H5_HAVE_FILTER_SHUFFLE
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
- if (h5repack(FNAME9,FNAME9OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME9,FNAME9OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME9,FNAME9OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -897,7 +897,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addfilter("dset_shuffle:NONE",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME9,FNAME9OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME9,FNAME9OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME9,FNAME9OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -916,7 +916,7 @@ if (szip_can_encode) {
#ifdef H5_HAVE_FILTER_FLETCHER32
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
- if (h5repack(FNAME10,FNAME10OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME10,FNAME10OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME10,FNAME10OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -937,7 +937,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addfilter("dset_fletcher32:NONE",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME10,FNAME10OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME10,FNAME10OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME10,FNAME10OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -957,7 +957,7 @@ if (szip_can_encode) {
#ifdef H5_HAVE_FILTER_NBIT
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
- if (h5repack(FNAME12,FNAME12OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME12,FNAME12OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME12,FNAME12OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -978,7 +978,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addfilter("dset_nbit:NONE",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME12,FNAME12OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME12,FNAME12OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME12,FNAME12OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -999,7 +999,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addfilter("dset_int31:NBIT",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME12,FNAME12OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME12,FNAME12OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME12,FNAME12OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -1017,7 +1017,7 @@ if (szip_can_encode) {
#ifdef H5_HAVE_FILTER_SCALEOFFSET
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
- if (h5repack(FNAME13,FNAME13OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME13,FNAME13OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME13,FNAME13OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -1038,7 +1038,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addfilter("dset_scaleoffset:NONE",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME13,FNAME13OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME13,FNAME13OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME13,FNAME13OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -1060,7 +1060,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addfilter("dset_none:SOFF=31,IN",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME13,FNAME13OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME13,FNAME13OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME13,FNAME13OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -1096,7 +1096,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addfilter("dset_deflate:SZIP=8,NN",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME11,FNAME11OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME11,FNAME11OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -1124,7 +1124,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addfilter("dset_szip:GZIP=1",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME11,FNAME11OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME11,FNAME11OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
@@ -1156,7 +1156,7 @@ if (szip_can_encode) {
TEST_ERROR;
if (h5repack_addfilter("NONE",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME11,FNAME11OUT,&pack_options,argc,argv)<0)
+ if (h5repack(FNAME11,FNAME11OUT,&pack_options) < 0)
TEST_ERROR;
if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 62975d9..9929b05 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -1915,15 +1915,18 @@ hsize_t diff_region(hid_t obj1_id,
for (i = 0; i < npoints1; i++)
{
hsize_t pt1, pt2;
- int diff=0;
+ int diff_data = 0;
for (j = 0; j < ndims1; j++)
{
pt1 = ptdata1[i * ndims1 + j];
pt2 = ptdata2[i * ndims1 + j];
if (pt1 != pt2)
- diff=1;
+ {
+ diff_data = 1;
+ break;
+ }
}
- if (diff)
+ if (diff_data)
{
parallel_print("point #%d", i);
print_points(i, ptdata1, ndims1);
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 013cecf..362b070 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -1434,7 +1434,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
}
else
{
- s = mem;
+ s = (char *)mem;
size = H5Tget_size(tid);
}
for (i=0; i<size && (s[i] || pad!=H5T_STR_NULLTERM); i++)
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 7ad5db7..76bb81f 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -46,6 +46,7 @@
static char *h5tools_escape(char *s, size_t size);
static hbool_t h5tools_is_zero(const void *_mem, size_t size);
+static void h5tools_print_char(h5tools_str_t *str, const h5tool_format_t *info, char ch);
/*-------------------------------------------------------------------------
* Function: h5tools_str_close
@@ -460,69 +461,69 @@ h5tools_str_dump_region(h5tools_str_t *str, hid_t region, const h5tool_format_t
*
*-------------------------------------------------------------------------
*/
-void
-h5tools_print_char(h5tools_str_t *str, const h5tool_format_t *info, unsigned char ch)
+static void
+h5tools_print_char(h5tools_str_t *str, const h5tool_format_t *info, char ch)
{
if (info->str_locale == ESCAPE_HTML) {
if (ch <= ' ' || ch > '~')
h5tools_str_append(str, "%%%02x", ch);
else
- h5tools_str_append(str, "%c", (char)ch);
+ h5tools_str_append(str, "%c", ch);
} else {
switch (ch) {
- case '"':
- if (!info->do_escape)
- h5tools_str_append(str, "\"");
- else
- h5tools_str_append(str, "\\\"");
- break;
- case '\\':
- if (!info->do_escape)
- h5tools_str_append(str, "\\");
- else
- h5tools_str_append(str, "\\\\");
- break;
- case '\b':
- if (!info->do_escape)
- h5tools_str_append(str, "\b");
- else
- h5tools_str_append(str, "\\b");
- break;
- case '\f':
- if (!info->do_escape)
- h5tools_str_append(str, "\f");
- else
- h5tools_str_append(str, "\\f");
- break;
- case '\n':
- if (!info->do_escape) {
- h5tools_str_append(str, "\n");
- h5tools_str_append(str, " ");
- }
- else
- h5tools_str_append(str, "\\n");
- break;
- case '\r':
- if (!info->do_escape) {
- h5tools_str_append(str, "\r");
- h5tools_str_append(str, " ");
- }
- else
- h5tools_str_append(str, "\\r");
- break;
- case '\t':
- if (!info->do_escape)
- h5tools_str_append(str, "\t");
- else
- h5tools_str_append(str, "\\t");
- break;
- default:
- if (isprint(ch))
- h5tools_str_append(str, "%c", (char)ch);
- else
- h5tools_str_append(str, "\\%03o", ch);
-
- break;
+ case '"':
+ if (!info->do_escape)
+ h5tools_str_append(str, "\"");
+ else
+ h5tools_str_append(str, "\\\"");
+ break;
+ case '\\':
+ if (!info->do_escape)
+ h5tools_str_append(str, "\\");
+ else
+ h5tools_str_append(str, "\\\\");
+ break;
+ case '\b':
+ if (!info->do_escape)
+ h5tools_str_append(str, "\b");
+ else
+ h5tools_str_append(str, "\\b");
+ break;
+ case '\f':
+ if (!info->do_escape)
+ h5tools_str_append(str, "\f");
+ else
+ h5tools_str_append(str, "\\f");
+ break;
+ case '\n':
+ if (!info->do_escape) {
+ h5tools_str_append(str, "\n");
+ h5tools_str_append(str, " ");
+ }
+ else
+ h5tools_str_append(str, "\\n");
+ break;
+ case '\r':
+ if (!info->do_escape) {
+ h5tools_str_append(str, "\r");
+ h5tools_str_append(str, " ");
+ }
+ else
+ h5tools_str_append(str, "\\r");
+ break;
+ case '\t':
+ if (!info->do_escape)
+ h5tools_str_append(str, "\t");
+ else
+ h5tools_str_append(str, "\\t");
+ break;
+ default:
+ if (isprint(ch))
+ h5tools_str_append(str, "%c", ch);
+ else
+ h5tools_str_append(str, "\\%03o", ch);
+
+ break;
}
}
}
@@ -632,7 +633,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
#endif
} else if (info->ascii && (H5Tequal(type, H5T_NATIVE_SCHAR) ||
H5Tequal(type, H5T_NATIVE_UCHAR))) {
- h5tools_print_char(str, info, (unsigned char)(*ucp_vp));
+ h5tools_print_char(str, info, (char)(*ucp_vp));
} else if (H5T_STRING == H5Tget_class(type)) {
unsigned int i;
char quote = '\0';
@@ -686,7 +687,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
}
/* Print the character */
- h5tools_print_char(str, info, (unsigned char)(s[i]));
+ h5tools_print_char(str, info, s[i]);
/* Print the repeat count */
if (info->str_repeat && j > info->str_repeat) {
diff --git a/tools/lib/h5tools_str.h b/tools/lib/h5tools_str.h
index 19872a1..b2d1c37 100644
--- a/tools/lib/h5tools_str.h
+++ b/tools/lib/h5tools_str.h
@@ -35,7 +35,6 @@ extern char *h5tools_str_prefix(h5tools_str_t *str, const h5tool_format_t *in
hsize_t elmtno, int ndims, hsize_t min_idx[],
hsize_t max_idx[], h5tools_context_t *ctx);
extern int h5tools_str_dump_region(h5tools_str_t *, hid_t, const h5tool_format_t *);
-extern void h5tools_print_char(h5tools_str_t *str, const h5tool_format_t *info, unsigned char ch);
extern char *h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info,
hid_t container, hid_t type, void *vp,
h5tools_context_t *ctx);
diff --git a/tools/lib/talign.c b/tools/lib/talign.c
index f8b5c87..80e83b4 100644
--- a/tools/lib/talign.c
+++ b/tools/lib/talign.c
@@ -36,154 +36,155 @@ const char *setname = "align";
int main(void)
{
- hid_t fil,spc,set;
- hid_t cs6, cmp, fix;
- hid_t cmp1, cmp2, cmp3;
- hid_t plist;
- hid_t array_dt;
+ hid_t fil,spc,set;
+ hid_t cs6, cmp, fix;
+ hid_t cmp1, cmp2, cmp3;
+ hid_t plist;
+ hid_t array_dt;
- hsize_t dim[2];
- hsize_t cdim[4];
+ hsize_t dim[2];
+ hsize_t cdim[4];
- char string5[5];
- float fok[2] = {1234., 2341.};
- float fnok[2] = {5678., 6785.};
- float *fptr;
+ char string5[5];
+ float fok[2] = {1234., 2341.};
+ float fnok[2] = {5678., 6785.};
+ float *fptr;
- char *data;
- char *mname;
+ char *data;
+ char *mname;
- int result = 0;
+ int result = 0;
- printf("%-70s", "Testing alignment in compound datatypes");
+ printf("%-70s", "Testing alignment in compound datatypes");
- strcpy(string5, "Hi!");
- HDunlink(fname);
- fil = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ strcpy(string5, "Hi!");
+ HDunlink(fname);
+ fil = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- if (fil < 0) {
- puts("*FAILED*");
- return 1;
- }
+ if (fil < 0) {
+ puts("*FAILED*");
+ return 1;
+ }
- H5E_BEGIN_TRY {
- H5Gunlink(fil, setname);
- } H5E_END_TRY;
+ H5E_BEGIN_TRY {
+ H5Gunlink(fil, setname);
+ } H5E_END_TRY;
- cs6 = H5Tcopy(H5T_C_S1);
- H5Tset_size(cs6, sizeof(string5));
- H5Tset_strpad(cs6, H5T_STR_NULLPAD);
+ cs6 = H5Tcopy(H5T_C_S1);
+ H5Tset_size(cs6, sizeof(string5));
+ H5Tset_strpad(cs6, H5T_STR_NULLPAD);
- cmp = H5Tcreate(H5T_COMPOUND, sizeof(fok) + sizeof(string5) + sizeof(fnok));
- H5Tinsert(cmp, "Awkward length", 0, cs6);
+ cmp = H5Tcreate(H5T_COMPOUND, sizeof(fok) + sizeof(string5) + sizeof(fnok));
+ H5Tinsert(cmp, "Awkward length", 0, cs6);
- cdim[0] = sizeof(fok) / sizeof(float);
- array_dt=H5Tarray_create(H5T_NATIVE_FLOAT,1,cdim,NULL);
- H5Tinsert(cmp, "Ok", sizeof(string5), array_dt);
+ cdim[0] = sizeof(fok) / sizeof(float);
+ array_dt = H5Tarray_create(H5T_NATIVE_FLOAT, 1, cdim, NULL);
+ H5Tinsert(cmp, "Ok", sizeof(string5), array_dt);
H5Tclose(array_dt);
- cdim[0] = sizeof(fnok) / sizeof(float);
- array_dt=H5Tarray_create(H5T_NATIVE_FLOAT,1,cdim,NULL);
- H5Tinsert(cmp, "Not Ok", sizeof(fok) + sizeof(string5), array_dt);
+ cdim[0] = sizeof(fnok) / sizeof(float);
+ array_dt = H5Tarray_create(H5T_NATIVE_FLOAT, 1, cdim, NULL);
+ H5Tinsert(cmp, "Not Ok", sizeof(fok) + sizeof(string5), array_dt);
H5Tclose(array_dt);
- fix=h5tools_get_native_type(cmp);
+ fix=h5tools_get_native_type(cmp);
- cmp1 = H5Tcreate(H5T_COMPOUND, sizeof(fok));
+ cmp1 = H5Tcreate(H5T_COMPOUND, sizeof(fok));
- cdim[0] = sizeof(fok) / sizeof(float);
- array_dt=H5Tarray_create(H5T_NATIVE_FLOAT,1,cdim,NULL);
- H5Tinsert(cmp1, "Ok", 0, array_dt);
+ cdim[0] = sizeof(fok) / sizeof(float);
+ array_dt = H5Tarray_create(H5T_NATIVE_FLOAT, 1, cdim, NULL);
+ H5Tinsert(cmp1, "Ok", 0, array_dt);
H5Tclose(array_dt);
- cmp2 = H5Tcreate(H5T_COMPOUND, sizeof(string5));
- H5Tinsert(cmp2, "Awkward length", 0, cs6);
+ cmp2 = H5Tcreate(H5T_COMPOUND, sizeof(string5));
+ H5Tinsert(cmp2, "Awkward length", 0, cs6);
- cmp3 = H5Tcreate(H5T_COMPOUND, sizeof(fnok));
+ cmp3 = H5Tcreate(H5T_COMPOUND, sizeof(fnok));
- cdim[0] = sizeof(fnok) / sizeof(float);
- array_dt=H5Tarray_create(H5T_NATIVE_FLOAT,1,cdim,NULL);
- H5Tinsert(cmp3, "Not Ok", 0, array_dt);
+ cdim[0] = sizeof(fnok) / sizeof(float);
+ array_dt = H5Tarray_create(H5T_NATIVE_FLOAT, 1, cdim, NULL);
+ H5Tinsert(cmp3, "Not Ok", 0, array_dt);
H5Tclose(array_dt);
- plist = H5Pcreate(H5P_DATASET_XFER);
- H5Pset_preserve(plist, 1);
-
- /*
- * Create a small dataset, and write data into it we write each field
- * in turn so that we are avoid alignment issues at this point
- */
- dim[0] = 1;
- spc = H5Screate_simple(1, dim, NULL);
- set = H5Dcreate(fil, setname, cmp, spc, H5P_DEFAULT);
-
- H5Dwrite(set, cmp1, spc, H5S_ALL, plist, fok);
- H5Dwrite(set, cmp2, spc, H5S_ALL, plist, string5);
- H5Dwrite(set, cmp3, spc, H5S_ALL, plist, fnok);
-
- H5Dclose(set);
-
- /* Now open the set, and read it back in */
- data = malloc(H5Tget_size(fix));
-
- if (!data) {
- perror("malloc() failed");
- abort();
- }
-
- set = H5Dopen(fil, setname);
-
- H5Dread(set, fix, spc, H5S_ALL, H5P_DEFAULT, data);
- fptr = (float *)(data + H5Tget_member_offset(fix, 1));
-
- if (fok[0] != fptr[0] || fok[1] != fptr[1]
- || fnok[0] != fptr[2] || fnok[1] != fptr[3]) {
- result = 1;
- printf("%14s (%2d) %6s = %s\n",
- mname = H5Tget_member_name(fix, 0), (int)H5Tget_member_offset(fix,0),
- string5, (char *)(data + H5Tget_member_offset(fix, 0)));
- free(mname);
- fptr = (float *)(data + H5Tget_member_offset(fix, 1));
- printf("Data comparison:\n"
- "%14s (%2d) %6f = %f\n"
- " %6f = %f\n",
- mname = H5Tget_member_name(fix, 1), (int)H5Tget_member_offset(fix,1),
- fok[0], fptr[0],
- fok[1], fptr[1]);
- free(mname);
- fptr = (float *)(data + H5Tget_member_offset(fix, 2));
- printf("%14s (%2d) %6f = %f\n"
- " %6f = %6f\n",
- mname = H5Tget_member_name(fix, 2), (int)H5Tget_member_offset(fix,2),
- fnok[0], fptr[0],
- fnok[1], fptr[1]);
- free(mname);
-
- fptr = (float *)(data + H5Tget_member_offset(fix, 1));
- printf("\n"
- "Short circuit\n"
- " %6f = %f\n"
- " %6f = %f\n"
- " %6f = %f\n"
- " %6f = %f\n",
- fok[0], fptr[0],
- fok[1], fptr[1],
- fnok[0], fptr[2],
- fnok[1], fptr[3]);
- puts("*FAILED*");
- } else {
- puts(" PASSED");
- }
-
- free(data);
- H5Sclose(spc);
- H5Tclose(cmp);
- H5Tclose(cmp1);
- H5Tclose(cmp2);
- H5Tclose(cmp3);
- H5Pclose(plist);
- H5Fclose(fil);
- unlink(fname);
- fflush(stdout);
- return result;
+ plist = H5Pcreate(H5P_DATASET_XFER);
+ H5Pset_preserve(plist, 1);
+
+ /*
+ * Create a small dataset, and write data into it we write each field
+ * in turn so that we are avoid alignment issues at this point
+ */
+ dim[0] = 1;
+ spc = H5Screate_simple(1, dim, NULL);
+ set = H5Dcreate(fil, setname, cmp, spc, H5P_DEFAULT);
+
+ H5Dwrite(set, cmp1, spc, H5S_ALL, plist, fok);
+ H5Dwrite(set, cmp2, spc, H5S_ALL, plist, string5);
+ H5Dwrite(set, cmp3, spc, H5S_ALL, plist, fnok);
+
+ H5Dclose(set);
+
+ /* Now open the set, and read it back in */
+ data = malloc(H5Tget_size(fix));
+
+ if (!data) {
+ perror("malloc() failed");
+ abort();
+ }
+
+ set = H5Dopen(fil, setname);
+
+ H5Dread(set, fix, spc, H5S_ALL, H5P_DEFAULT, data);
+ fptr = (float *)(data + H5Tget_member_offset(fix, 1));
+
+ if (fok[0] != fptr[0] || fok[1] != fptr[1]
+ || fnok[0] != fptr[2] || fnok[1] != fptr[3]) {
+ result = 1;
+ printf("%14s (%2d) %6s = %s\n",
+ mname = H5Tget_member_name(fix, 0), (int)H5Tget_member_offset(fix,0),
+ string5, (char *)(data + H5Tget_member_offset(fix, 0)));
+ free(mname);
+ fptr = (float *)(data + H5Tget_member_offset(fix, 1));
+ printf("Data comparison:\n"
+ "%14s (%2d) %6f = %f\n"
+ " %6f = %f\n",
+ mname = H5Tget_member_name(fix, 1), (int)H5Tget_member_offset(fix,1),
+ fok[0], fptr[0],
+ fok[1], fptr[1]);
+ free(mname);
+ fptr = (float *)(data + H5Tget_member_offset(fix, 2));
+ printf("%14s (%2d) %6f = %f\n"
+ " %6f = %6f\n",
+ mname = H5Tget_member_name(fix, 2), (int)H5Tget_member_offset(fix,2),
+ fnok[0], fptr[0],
+ fnok[1], fptr[1]);
+ free(mname);
+
+ fptr = (float *)(data + H5Tget_member_offset(fix, 1));
+ printf("\n"
+ "Short circuit\n"
+ " %6f = %f\n"
+ " %6f = %f\n"
+ " %6f = %f\n"
+ " %6f = %f\n",
+ fok[0], fptr[0],
+ fok[1], fptr[1],
+ fnok[0], fptr[2],
+ fnok[1], fptr[3]);
+ puts("*FAILED*");
+ } else {
+ puts(" PASSED");
+ }
+
+ free(data);
+ H5Sclose(spc);
+ H5Tclose(cmp);
+ H5Tclose(cmp1);
+ H5Tclose(cmp2);
+ H5Tclose(cmp3);
+ H5Pclose(plist);
+ H5Fclose(fil);
+ unlink(fname);
+ fflush(stdout);
+ return result;
}
+
diff --git a/tools/misc/h5stat.c b/tools/misc/h5stat.c
index 7d4045e..4577fe9 100644
--- a/tools/misc/h5stat.c
+++ b/tools/misc/h5stat.c
@@ -12,7 +12,6 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include "H5private.h" /* Generic Functions */
@@ -99,7 +98,9 @@ static int display_group = FALSE;
static int display_dset_metadata = FALSE;
static int display_dset = FALSE;
static int display_dtype_metadata = FALSE;
+#ifdef NOT_YET
static int display_dtype = FALSE;
+#endif /* NOT_YET */
static const char *s_opts ="FfhGgDdTV";
static struct long_options l_opts[] = {
diff --git a/tools/testfiles/tarray1.h5.xml b/tools/testfiles/tarray1.h5.xml
index 95e922e..b4d17ca 100644
--- a/tools/testfiles/tarray1.h5.xml
+++ b/tools/testfiles/tarray1.h5.xml
@@ -20,7 +20,7 @@ Expected output for 'h5dump --xml tarray1.h5'
</hdf5:Dataspace>
<hdf5:DataType>
<hdf5:ArrayType Ndims="1">
- <hdf5:ArrayDimension DimSize="4" DimPerm="0"/>
+ <hdf5:ArrayDimension DimSize="4"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:IntegerType ByteOrder="LE" Sign="true" Size="4" />
diff --git a/tools/testfiles/tarray2.h5.xml b/tools/testfiles/tarray2.h5.xml
index 15bb8c6..ac5fe50 100644
--- a/tools/testfiles/tarray2.h5.xml
+++ b/tools/testfiles/tarray2.h5.xml
@@ -20,9 +20,9 @@ Expected output for 'h5dump --xml tarray2.h5'
</hdf5:Dataspace>
<hdf5:DataType>
<hdf5:ArrayType Ndims="3">
- <hdf5:ArrayDimension DimSize="3" DimPerm="0"/>
- <hdf5:ArrayDimension DimSize="4" DimPerm="1"/>
- <hdf5:ArrayDimension DimSize="5" DimPerm="2"/>
+ <hdf5:ArrayDimension DimSize="3"/>
+ <hdf5:ArrayDimension DimSize="4"/>
+ <hdf5:ArrayDimension DimSize="5"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:IntegerType ByteOrder="LE" Sign="true" Size="4" />
diff --git a/tools/testfiles/tarray3.h5.xml b/tools/testfiles/tarray3.h5.xml
index 42ec1ad..d496a46 100644
--- a/tools/testfiles/tarray3.h5.xml
+++ b/tools/testfiles/tarray3.h5.xml
@@ -20,11 +20,11 @@ Expected output for 'h5dump --xml tarray3.h5'
</hdf5:Dataspace>
<hdf5:DataType>
<hdf5:ArrayType Ndims="1">
- <hdf5:ArrayDimension DimSize="4" DimPerm="0"/>
+ <hdf5:ArrayDimension DimSize="4"/>
<hdf5:DataType>
<hdf5:ArrayType Ndims="2">
- <hdf5:ArrayDimension DimSize="6" DimPerm="0"/>
- <hdf5:ArrayDimension DimSize="3" DimPerm="1"/>
+ <hdf5:ArrayDimension DimSize="6"/>
+ <hdf5:ArrayDimension DimSize="3"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:IntegerType ByteOrder="LE" Sign="true" Size="4" />
diff --git a/tools/testfiles/tarray6.h5.xml b/tools/testfiles/tarray6.h5.xml
index ffbd849..cb9b853 100644
--- a/tools/testfiles/tarray6.h5.xml
+++ b/tools/testfiles/tarray6.h5.xml
@@ -20,7 +20,7 @@ Expected output for 'h5dump --xml tarray6.h5'
</hdf5:Dataspace>
<hdf5:DataType>
<hdf5:ArrayType Ndims="1">
- <hdf5:ArrayDimension DimSize="4" DimPerm="0"/>
+ <hdf5:ArrayDimension DimSize="4"/>
<hdf5:DataType>
<hdf5:VLType>
<hdf5:DataType>
diff --git a/tools/testfiles/tarray7.h5.xml b/tools/testfiles/tarray7.h5.xml
index 8b0123f..f9c6611 100644
--- a/tools/testfiles/tarray7.h5.xml
+++ b/tools/testfiles/tarray7.h5.xml
@@ -20,12 +20,12 @@ Expected output for 'h5dump --xml tarray7.h5'
</hdf5:Dataspace>
<hdf5:DataType>
<hdf5:ArrayType Ndims="1">
- <hdf5:ArrayDimension DimSize="4" DimPerm="0"/>
+ <hdf5:ArrayDimension DimSize="4"/>
<hdf5:DataType>
<hdf5:VLType>
<hdf5:DataType>
<hdf5:ArrayType Ndims="1">
- <hdf5:ArrayDimension DimSize="4" DimPerm="0"/>
+ <hdf5:ArrayDimension DimSize="4"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:IntegerType ByteOrder="LE" Sign="false" Size="4" />
diff --git a/tools/testfiles/tcompound.h5.xml b/tools/testfiles/tcompound.h5.xml
index e2e43e2..698b3a4 100644
--- a/tools/testfiles/tcompound.h5.xml
+++ b/tools/testfiles/tcompound.h5.xml
@@ -50,7 +50,7 @@ Expected output for 'h5dump --xml tcompound.h5'
<hdf5:Field FieldName="int_array">
<hdf5:DataType>
<hdf5:ArrayType Ndims="1">
- <hdf5:ArrayDimension DimSize="4" DimPerm="0"/>
+ <hdf5:ArrayDimension DimSize="4"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:IntegerType ByteOrder="BE" Sign="true" Size="4" />
@@ -62,8 +62,8 @@ Expected output for 'h5dump --xml tcompound.h5'
<hdf5:Field FieldName="float_array">
<hdf5:DataType>
<hdf5:ArrayType Ndims="2">
- <hdf5:ArrayDimension DimSize="5" DimPerm="0"/>
- <hdf5:ArrayDimension DimSize="6" DimPerm="1"/>
+ <hdf5:ArrayDimension DimSize="5"/>
+ <hdf5:ArrayDimension DimSize="6"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" />
diff --git a/tools/testfiles/tcompound2.h5.xml b/tools/testfiles/tcompound2.h5.xml
index b6d5800..0abfc55 100644
--- a/tools/testfiles/tcompound2.h5.xml
+++ b/tools/testfiles/tcompound2.h5.xml
@@ -50,7 +50,7 @@ Expected output for 'h5dump --xml tcompound2.h5'
<hdf5:Field FieldName="int_array">
<hdf5:DataType>
<hdf5:ArrayType Ndims="1">
- <hdf5:ArrayDimension DimSize="4" DimPerm="0"/>
+ <hdf5:ArrayDimension DimSize="4"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:IntegerType ByteOrder="BE" Sign="true" Size="4" />
@@ -62,8 +62,8 @@ Expected output for 'h5dump --xml tcompound2.h5'
<hdf5:Field FieldName="float_array">
<hdf5:DataType>
<hdf5:ArrayType Ndims="2">
- <hdf5:ArrayDimension DimSize="5" DimPerm="0"/>
- <hdf5:ArrayDimension DimSize="6" DimPerm="1"/>
+ <hdf5:ArrayDimension DimSize="5"/>
+ <hdf5:ArrayDimension DimSize="6"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" />
diff --git a/tools/testfiles/tcompound_complex.h5.xml b/tools/testfiles/tcompound_complex.h5.xml
index e745046..8300deb 100644
--- a/tools/testfiles/tcompound_complex.h5.xml
+++ b/tools/testfiles/tcompound_complex.h5.xml
@@ -33,7 +33,7 @@ Expected output for 'h5dump --xml tcompound_complex.h5'
<hdf5:Field FieldName="b_name">
<hdf5:DataType>
<hdf5:ArrayType Ndims="1">
- <hdf5:ArrayDimension DimSize="4" DimPerm="0"/>
+ <hdf5:ArrayDimension DimSize="4"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:StringType Cset="H5T_CSET_ASCII" StrSize="H5T_VARIABLE" StrPad="H5T_STR_NULLTERM"/>
@@ -52,8 +52,8 @@ Expected output for 'h5dump --xml tcompound_complex.h5'
<hdf5:Field FieldName="d_name">
<hdf5:DataType>
<hdf5:ArrayType Ndims="2">
- <hdf5:ArrayDimension DimSize="5" DimPerm="0"/>
- <hdf5:ArrayDimension DimSize="6" DimPerm="1"/>
+ <hdf5:ArrayDimension DimSize="5"/>
+ <hdf5:ArrayDimension DimSize="6"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:IntegerType ByteOrder="BE" Sign="true" Size="2" />
@@ -72,7 +72,7 @@ Expected output for 'h5dump --xml tcompound_complex.h5'
<hdf5:Field FieldName="f_name">
<hdf5:DataType>
<hdf5:ArrayType Ndims="1">
- <hdf5:ArrayDimension DimSize="10" DimPerm="0"/>
+ <hdf5:ArrayDimension DimSize="10"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:FloatType ByteOrder="BE" Size="8" SignBitLocation="63" ExponentBits="11" ExponentLocation="52" MantissaBits="52" MantissaLocation="0" />
diff --git a/tools/testfiles/tempty-dtd-2.h5.xml b/tools/testfiles/tempty-dtd-2.h5.xml
index a5a9128..0b89823 100644
--- a/tools/testfiles/tempty-dtd-2.h5.xml
+++ b/tools/testfiles/tempty-dtd-2.h5.xml
@@ -101,7 +101,7 @@ Expected output for 'h5dump --xml -u tempty.h5'
</Dataspace>
<DataType>
<ArrayType Ndims="1">
- <ArrayDimension DimSize="4" DimPerm="0"/>
+ <ArrayDimension DimSize="4"/>
<DataType>
<AtomicType>
<IntegerType ByteOrder="LE" Sign="true" Size="4" />
diff --git a/tools/testfiles/tempty-dtd-uri.h5.xml b/tools/testfiles/tempty-dtd-uri.h5.xml
index 6b2c4bc..29c63bd 100644
--- a/tools/testfiles/tempty-dtd-uri.h5.xml
+++ b/tools/testfiles/tempty-dtd-uri.h5.xml
@@ -101,7 +101,7 @@ Expected output for 'h5dump --xml --use-dtd --xml-dtd=http://somewhere.net tempt
</Dataspace>
<DataType>
<ArrayType Ndims="1">
- <ArrayDimension DimSize="4" DimPerm="0"/>
+ <ArrayDimension DimSize="4"/>
<DataType>
<AtomicType>
<IntegerType ByteOrder="LE" Sign="true" Size="4" />
diff --git a/tools/testfiles/tempty-dtd.h5.xml b/tools/testfiles/tempty-dtd.h5.xml
index 7d20d8d..aa1fa36 100644
--- a/tools/testfiles/tempty-dtd.h5.xml
+++ b/tools/testfiles/tempty-dtd.h5.xml
@@ -101,7 +101,7 @@ Expected output for 'h5dump --xml --use-dtd tempty.h5'
</Dataspace>
<DataType>
<ArrayType Ndims="1">
- <ArrayDimension DimSize="4" DimPerm="0"/>
+ <ArrayDimension DimSize="4"/>
<DataType>
<AtomicType>
<IntegerType ByteOrder="LE" Sign="true" Size="4" />
diff --git a/tools/testfiles/tempty-nons-2.h5.xml b/tools/testfiles/tempty-nons-2.h5.xml
index 31c35fb..528c4d3 100644
--- a/tools/testfiles/tempty-nons-2.h5.xml
+++ b/tools/testfiles/tempty-nons-2.h5.xml
@@ -100,7 +100,7 @@ Expected output for 'h5dump --xml --xml-ns=: tempty.h5'
</Dataspace>
<DataType>
<ArrayType Ndims="1">
- <ArrayDimension DimSize="4" DimPerm="0"/>
+ <ArrayDimension DimSize="4"/>
<DataType>
<AtomicType>
<IntegerType ByteOrder="LE" Sign="true" Size="4" />
diff --git a/tools/testfiles/tempty-nons-uri.h5.xml b/tools/testfiles/tempty-nons-uri.h5.xml
index 8484406..05471e1 100644
--- a/tools/testfiles/tempty-nons-uri.h5.xml
+++ b/tools/testfiles/tempty-nons-uri.h5.xml
@@ -100,7 +100,7 @@ Expected output for 'h5dump --xml --xml-ns=: --xml-dtd=http://somewhere.net temp
</Dataspace>
<DataType>
<ArrayType Ndims="1">
- <ArrayDimension DimSize="4" DimPerm="0"/>
+ <ArrayDimension DimSize="4"/>
<DataType>
<AtomicType>
<IntegerType ByteOrder="LE" Sign="true" Size="4" />
diff --git a/tools/testfiles/tempty-nons.h5.xml b/tools/testfiles/tempty-nons.h5.xml
index e4efee8..64fe60a 100644
--- a/tools/testfiles/tempty-nons.h5.xml
+++ b/tools/testfiles/tempty-nons.h5.xml
@@ -100,7 +100,7 @@ Expected output for 'h5dump --xml -X : tempty.h5'
</Dataspace>
<DataType>
<ArrayType Ndims="1">
- <ArrayDimension DimSize="4" DimPerm="0"/>
+ <ArrayDimension DimSize="4"/>
<DataType>
<AtomicType>
<IntegerType ByteOrder="LE" Sign="true" Size="4" />
diff --git a/tools/testfiles/tempty-ns-2.h5.xml b/tools/testfiles/tempty-ns-2.h5.xml
index 1523fbc..0c7d153 100644
--- a/tools/testfiles/tempty-ns-2.h5.xml
+++ b/tools/testfiles/tempty-ns-2.h5.xml
@@ -100,7 +100,7 @@ Expected output for 'h5dump --xml --xml-ns=thing: tempty.h5'
</thing:Dataspace>
<thing:DataType>
<thing:ArrayType Ndims="1">
- <thing:ArrayDimension DimSize="4" DimPerm="0"/>
+ <thing:ArrayDimension DimSize="4"/>
<thing:DataType>
<thing:AtomicType>
<thing:IntegerType ByteOrder="LE" Sign="true" Size="4" />
diff --git a/tools/testfiles/tempty-ns.h5.xml b/tools/testfiles/tempty-ns.h5.xml
index ec8ca91..200c60a 100644
--- a/tools/testfiles/tempty-ns.h5.xml
+++ b/tools/testfiles/tempty-ns.h5.xml
@@ -100,7 +100,7 @@ Expected output for 'h5dump --xml -X thing: tempty.h5'
</thing:Dataspace>
<thing:DataType>
<thing:ArrayType Ndims="1">
- <thing:ArrayDimension DimSize="4" DimPerm="0"/>
+ <thing:ArrayDimension DimSize="4"/>
<thing:DataType>
<thing:AtomicType>
<thing:IntegerType ByteOrder="LE" Sign="true" Size="4" />
diff --git a/tools/testfiles/tempty.h5.xml b/tools/testfiles/tempty.h5.xml
index 1c7f589..703c395 100644
--- a/tools/testfiles/tempty.h5.xml
+++ b/tools/testfiles/tempty.h5.xml
@@ -100,7 +100,7 @@ Expected output for 'h5dump --xml tempty.h5'
</hdf5:Dataspace>
<hdf5:DataType>
<hdf5:ArrayType Ndims="1">
- <hdf5:ArrayDimension DimSize="4" DimPerm="0"/>
+ <hdf5:ArrayDimension DimSize="4"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:IntegerType ByteOrder="LE" Sign="true" Size="4" />
diff --git a/tools/testfiles/tmany.h5.xml b/tools/testfiles/tmany.h5.xml
index 3bf1021..87f2c15 100644
--- a/tools/testfiles/tmany.h5.xml
+++ b/tools/testfiles/tmany.h5.xml
@@ -29,10 +29,10 @@ Expected output for 'h5dump --xml tmany.h5'
<hdf5:Field FieldName="a_array">
<hdf5:DataType>
<hdf5:ArrayType Ndims="4">
- <hdf5:ArrayDimension DimSize="2" DimPerm="0"/>
- <hdf5:ArrayDimension DimSize="2" DimPerm="1"/>
- <hdf5:ArrayDimension DimSize="2" DimPerm="2"/>
- <hdf5:ArrayDimension DimSize="2" DimPerm="3"/>
+ <hdf5:ArrayDimension DimSize="2"/>
+ <hdf5:ArrayDimension DimSize="2"/>
+ <hdf5:ArrayDimension DimSize="2"/>
+ <hdf5:ArrayDimension DimSize="2"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:IntegerType ByteOrder="BE" Sign="true" Size="4" />
@@ -44,10 +44,10 @@ Expected output for 'h5dump --xml tmany.h5'
<hdf5:Field FieldName="b_array">
<hdf5:DataType>
<hdf5:ArrayType Ndims="4">
- <hdf5:ArrayDimension DimSize="2" DimPerm="0"/>
- <hdf5:ArrayDimension DimSize="2" DimPerm="1"/>
- <hdf5:ArrayDimension DimSize="2" DimPerm="2"/>
- <hdf5:ArrayDimension DimSize="2" DimPerm="3"/>
+ <hdf5:ArrayDimension DimSize="2"/>
+ <hdf5:ArrayDimension DimSize="2"/>
+ <hdf5:ArrayDimension DimSize="2"/>
+ <hdf5:ArrayDimension DimSize="2"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:FloatType ByteOrder="BE" Size="8" SignBitLocation="63" ExponentBits="11" ExponentLocation="52" MantissaBits="52" MantissaLocation="0" />
@@ -59,10 +59,10 @@ Expected output for 'h5dump --xml tmany.h5'
<hdf5:Field FieldName="c_array">
<hdf5:DataType>
<hdf5:ArrayType Ndims="4">
- <hdf5:ArrayDimension DimSize="2" DimPerm="0"/>
- <hdf5:ArrayDimension DimSize="2" DimPerm="1"/>
- <hdf5:ArrayDimension DimSize="2" DimPerm="2"/>
- <hdf5:ArrayDimension DimSize="2" DimPerm="3"/>
+ <hdf5:ArrayDimension DimSize="2"/>
+ <hdf5:ArrayDimension DimSize="2"/>
+ <hdf5:ArrayDimension DimSize="2"/>
+ <hdf5:ArrayDimension DimSize="2"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:FloatType ByteOrder="BE" Size="8" SignBitLocation="63" ExponentBits="11" ExponentLocation="52" MantissaBits="52" MantissaLocation="0" />
diff --git a/tools/testfiles/tnestedcomp.h5.xml b/tools/testfiles/tnestedcomp.h5.xml
index 96a5092..1670180 100644
--- a/tools/testfiles/tnestedcomp.h5.xml
+++ b/tools/testfiles/tnestedcomp.h5.xml
@@ -54,7 +54,7 @@ Expected output for 'h5dump --xml tnestedcomp.h5'
<hdf5:Field FieldName="array_name">
<hdf5:DataType>
<hdf5:ArrayType Ndims="1">
- <hdf5:ArrayDimension DimSize="2" DimPerm="0"/>
+ <hdf5:ArrayDimension DimSize="2"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:FloatType ByteOrder="LE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" />
diff --git a/tools/testfiles/tsaf.h5.xml b/tools/testfiles/tsaf.h5.xml
index 4959366..bd73334 100644
--- a/tools/testfiles/tsaf.h5.xml
+++ b/tools/testfiles/tsaf.h5.xml
@@ -1329,7 +1329,7 @@ Expected output for 'h5dump --xml tsaf.h5'
<hdf5:Field FieldName="_">
<hdf5:DataType>
<hdf5:ArrayType Ndims="1">
- <hdf5:ArrayDimension DimSize="8" DimPerm="0"/>
+ <hdf5:ArrayDimension DimSize="8"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:IntegerType ByteOrder="BE" Sign="true" Size="4" />
@@ -1347,7 +1347,7 @@ Expected output for 'h5dump --xml tsaf.h5'
<hdf5:Field FieldName="_">
<hdf5:DataType>
<hdf5:ArrayType Ndims="1">
- <hdf5:ArrayDimension DimSize="8" DimPerm="0"/>
+ <hdf5:ArrayDimension DimSize="8"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:IntegerType ByteOrder="BE" Sign="true" Size="4" />
@@ -1365,7 +1365,7 @@ Expected output for 'h5dump --xml tsaf.h5'
<hdf5:Field FieldName="_">
<hdf5:DataType>
<hdf5:ArrayType Ndims="1">
- <hdf5:ArrayDimension DimSize="8" DimPerm="0"/>
+ <hdf5:ArrayDimension DimSize="8"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:IntegerType ByteOrder="BE" Sign="true" Size="4" />
@@ -1882,7 +1882,7 @@ Expected output for 'h5dump --xml tsaf.h5'
<hdf5:Field FieldName="_">
<hdf5:DataType>
<hdf5:ArrayType Ndims="1">
- <hdf5:ArrayDimension DimSize="16" DimPerm="0"/>
+ <hdf5:ArrayDimension DimSize="16"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:IntegerType ByteOrder="BE" Sign="true" Size="4" />
diff --git a/tools/testfiles/tstr.h5.xml b/tools/testfiles/tstr.h5.xml
index 8c2f2a7..c82bbc6 100644
--- a/tools/testfiles/tstr.h5.xml
+++ b/tools/testfiles/tstr.h5.xml
@@ -24,8 +24,8 @@ Expected output for 'h5dump --xml tstr.h5'
<hdf5:Field FieldName="int_array">
<hdf5:DataType>
<hdf5:ArrayType Ndims="2">
- <hdf5:ArrayDimension DimSize="8" DimPerm="0"/>
- <hdf5:ArrayDimension DimSize="10" DimPerm="1"/>
+ <hdf5:ArrayDimension DimSize="8"/>
+ <hdf5:ArrayDimension DimSize="10"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:IntegerType ByteOrder="BE" Sign="true" Size="4" />
@@ -37,8 +37,8 @@ Expected output for 'h5dump --xml tstr.h5'
<hdf5:Field FieldName="string">
<hdf5:DataType>
<hdf5:ArrayType Ndims="2">
- <hdf5:ArrayDimension DimSize="3" DimPerm="0"/>
- <hdf5:ArrayDimension DimSize="4" DimPerm="1"/>
+ <hdf5:ArrayDimension DimSize="3"/>
+ <hdf5:ArrayDimension DimSize="4"/>
<hdf5:DataType>
<hdf5:AtomicType>
<hdf5:StringType Cset="H5T_CSET_ASCII" StrSize="32" StrPad="H5T_STR_SPACEPAD"/>