summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-10-04 22:19:07 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-10-04 22:19:07 (GMT)
commit1de51c7bc148b9cb5104936dfd23096a222d0cb8 (patch)
treeb23ea23404fd02a41f4539ebbc8311a1c43fecbe /tools
parent041de441c5d7468812be8af1346b30db6ea94e3a (diff)
downloadhdf5-1de51c7bc148b9cb5104936dfd23096a222d0cb8.zip
hdf5-1de51c7bc148b9cb5104936dfd23096a222d0cb8.tar.gz
hdf5-1de51c7bc148b9cb5104936dfd23096a222d0cb8.tar.bz2
[svn-r14187] Description:
Put H5Acreate() under API versioning, with all internal usage shifted to H5Acreate2(). Add regression tests for H5Acreate1(). Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode
Diffstat (limited to 'tools')
-rw-r--r--tools/h5diff/h5diffgentest.c78
-rw-r--r--tools/h5dump/h5dumpgentest.c184
-rw-r--r--tools/h5jam/h5jamgentest.c8
-rw-r--r--tools/h5repack/h5repack_copy.c101
-rw-r--r--tools/h5repack/h5repack_refs.c4
-rw-r--r--tools/h5repack/h5repacktst.c700
-rw-r--r--tools/h5stat/h5stat_gentest.c2
7 files changed, 535 insertions, 542 deletions
diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c
index dba7fca..ba8b222 100644
--- a/tools/h5diff/h5diffgentest.c
+++ b/tools/h5diff/h5diffgentest.c
@@ -618,7 +618,7 @@ int test_attributes(const char *file,
herr_t status;
/* Create a file */
- if ((fid = H5Fcreate(file, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0)
+ if ((fid = H5Fcreate(file, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
/* Create a 1D dataset */
@@ -682,7 +682,7 @@ int test_datasets(const char *file,
memset(buf,0,sizeof buf);
/* Create a file */
- if ((fid = H5Fcreate(file, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0)
+ if ((fid = H5Fcreate(file, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
/* Create a 1D dataset */
@@ -972,13 +972,13 @@ void write_attr_in(hid_t loc_id,
[ 1 ] 3 0 3
*/
- sid = H5Screate_simple(1,dims,NULL);
+ sid = H5Screate_simple(1, dims, NULL);
tid = H5Tvlen_create(H5T_NATIVE_INT);
- aid = H5Acreate(loc_id,"vlen",tid,sid,H5P_DEFAULT);
- status = H5Awrite(aid,tid,buf5);
- assert(status>=0);
- status = H5Dvlen_reclaim(tid,sid,H5P_DEFAULT,buf5);
- assert(status>=0);
+ aid = H5Acreate2(loc_id, ".", "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Awrite(aid, tid, buf5);
+ assert(status >= 0);
+ status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf5);
+ assert(status >= 0);
status = H5Aclose(aid);
status = H5Tclose(tid);
status = H5Sclose(sid);
@@ -1243,13 +1243,13 @@ position enum2D of </g1> enum2D of </g1> difference
[ 2 1 ] 11 0 11
*/
- sid = H5Screate_simple(2,dims2,NULL);
+ sid = H5Screate_simple(2, dims2, NULL);
tid = H5Tvlen_create(H5T_NATIVE_INT);
- aid = H5Acreate(loc_id,"vlen2D",tid,sid,H5P_DEFAULT);
- status = H5Awrite(aid,tid,buf52);
- assert(status>=0);
- status = H5Dvlen_reclaim(tid,sid,H5P_DEFAULT,buf52);
- assert(status>=0);
+ aid = H5Acreate2(loc_id, ".", "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Awrite(aid, tid, buf52);
+ assert(status >= 0);
+ status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf52);
+ assert(status >= 0);
status = H5Aclose(aid);
status = H5Tclose(tid);
status = H5Sclose(sid);
@@ -1640,13 +1640,13 @@ position vlen3D of </g1> vlen3D of </g1> difference
[ 1 1 0 ] 10 0 10
etc
*/
- sid = H5Screate_simple(3,dims3,NULL);
+ sid = H5Screate_simple(3, dims3, NULL);
tid = H5Tvlen_create(H5T_NATIVE_INT);
- aid = H5Acreate(loc_id,"vlen3D",tid,sid,H5P_DEFAULT);
- status = H5Awrite(aid,tid,buf53);
- assert(status>=0);
- status = H5Dvlen_reclaim(tid,sid,H5P_DEFAULT,buf53);
- assert(status>=0);
+ aid = H5Acreate2(loc_id, ".", "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Awrite(aid, tid, buf53);
+ assert(status >= 0);
+ status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf53);
+ assert(status >= 0);
status = H5Aclose(aid);
status = H5Tclose(tid);
status = H5Sclose(sid);
@@ -2438,19 +2438,19 @@ int test_hyperslab(const char *fname,
/* create */
fid = H5Fcreate (fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- if ((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0)
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto out;
- if (H5Pset_fill_value(dcpl, H5T_NATIVE_CHAR, &fillvalue)<0)
+ if (H5Pset_fill_value(dcpl, H5T_NATIVE_CHAR, &fillvalue) < 0)
goto out;
- if(H5Pset_chunk(dcpl, 1, chunk_dims)<0)
+ if(H5Pset_chunk(dcpl, 1, chunk_dims) < 0)
goto out;
- if ((f_sid = H5Screate_simple(1,dims,NULL))<0)
+ if ((f_sid = H5Screate_simple(1,dims,NULL)) < 0)
goto out;
- if ((did = H5Dcreate(fid,"big",H5T_NATIVE_CHAR,f_sid,dcpl))<0)
+ if ((did = H5Dcreate(fid,"big",H5T_NATIVE_CHAR,f_sid,dcpl)) < 0)
goto out;
- if ((m_sid = H5Screate_simple(1, hs_size, hs_size))<0)
+ if ((m_sid = H5Screate_simple(1, hs_size, hs_size)) < 0)
goto out;
- if ((tid = H5Dget_type(did))<0)
+ if ((tid = H5Dget_type(did)) < 0)
goto out;
if ((size = H5Tget_size(tid))<=0)
goto out;
@@ -2476,13 +2476,13 @@ int test_hyperslab(const char *fname,
}
hs_start[0] = i * GBLL/(1024*1024);
- if (H5Sselect_hyperslab (f_sid,H5S_SELECT_SET,hs_start,NULL,hs_size, NULL)<0)
+ if (H5Sselect_hyperslab (f_sid,H5S_SELECT_SET,hs_start,NULL,hs_size, NULL) < 0)
goto out;
/* write only one hyperslab */
if ( i==512*512)
{
- if (H5Dwrite (did,H5T_NATIVE_CHAR,m_sid,f_sid,H5P_DEFAULT,buf)<0)
+ if (H5Dwrite (did,H5T_NATIVE_CHAR,m_sid,f_sid,H5P_DEFAULT,buf) < 0)
goto out;
}
@@ -2491,13 +2491,13 @@ int test_hyperslab(const char *fname,
buf=NULL;
/* close */
- if(H5Sclose(f_sid)<0)
+ if(H5Sclose(f_sid) < 0)
goto out;
- if(H5Sclose(m_sid)<0)
+ if(H5Sclose(m_sid) < 0)
goto out;
- if(H5Pclose(dcpl)<0)
+ if(H5Pclose(dcpl) < 0)
goto out;
- if(H5Dclose(did)<0)
+ if(H5Dclose(did) < 0)
goto out;
H5Fclose(fid);
@@ -2535,25 +2535,23 @@ int write_attr(hid_t loc_id,
hid_t sid;
/* create a space */
- if (( sid = H5Screate_simple(rank,dims,NULL)) < 0 )
+ if((sid = H5Screate_simple(rank, dims, NULL)) < 0)
goto out;
/* create the attribute */
- if (( aid = H5Acreate(loc_id,name,tid,sid,H5P_DEFAULT)) < 0 )
+ if((aid = H5Acreate2(loc_id, ".", name, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* write */
- if ( buf )
- {
- if ( H5Awrite(aid,tid,buf) < 0 )
+ if(buf)
+ if(H5Awrite(aid, tid, buf) < 0)
goto out;
- }
/* close */
H5Aclose(aid);
H5Sclose(sid);
-return SUCCEED;
+ return SUCCEED;
out:
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index 862ae60..16fe91b 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -379,7 +379,7 @@ gent_attribute(void)
/* attribute 1 */
dims[0] = 24;
space = H5Screate_simple(1, dims, NULL);
- attr = H5Acreate (root, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT);
+ attr = H5Acreate2(root, ".", "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
sprintf(buf, "attribute of root group");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
@@ -388,7 +388,7 @@ gent_attribute(void)
/* attribute 2 */
dims[0] = 10;
space = H5Screate_simple(1, dims, NULL);
- attr = H5Acreate (root, "attr2", H5T_STD_I32BE, space, H5P_DEFAULT);
+ attr = H5Acreate2(root, ".", "attr2", H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
for (i = 0; i < 10; i++) data[i] = i+1;
@@ -399,7 +399,7 @@ gent_attribute(void)
/* attribute 3 */
dims[0] = 10;
space = H5Screate_simple(1, dims, NULL);
- attr = H5Acreate (root, "attr3", H5T_IEEE_F64BE, space, H5P_DEFAULT);
+ attr = H5Acreate2(root, ".", "attr3", H5T_IEEE_F64BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
for (i = 0; i < 10; i++) d[i] = 0.1 * i;
@@ -409,7 +409,7 @@ gent_attribute(void)
/* attribute 4 */
space = H5Screate(H5S_SCALAR);
- attr = H5Acreate (root, "attr4", H5T_STD_I32BE, space, H5P_DEFAULT);
+ attr = H5Acreate2(root, ".", "attr4", H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Awrite(attr, H5T_NATIVE_INT, &point);
H5Sclose(space);
H5Aclose(attr);
@@ -418,7 +418,7 @@ gent_attribute(void)
space = H5Screate(H5S_SCALAR);
type = H5Tcopy(H5T_C_S1);
H5Tset_size(type, 17);
- attr = H5Acreate (root, "attr5", type, space, H5P_DEFAULT);
+ attr = H5Acreate2(root, ".", "attr5", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Awrite(attr, type, string);
H5Tclose(type);
@@ -931,7 +931,7 @@ static void gent_all(void)
dims[0] = 10;
space = H5Screate_simple(1, dims, NULL);
- attr = H5Acreate (group, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT);
+ attr = H5Acreate2(group, ".", "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
sprintf(buf, "abcdefghi");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
@@ -939,7 +939,7 @@ static void gent_all(void)
dims[0] = 2; dims[1] = 2;
space = H5Screate_simple(2, dims, NULL);
- attr = H5Acreate (group, "attr2", H5T_STD_I32BE, space, H5P_DEFAULT);
+ attr = H5Acreate2(group, ".", "attr2", H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
data[0][0] = 0; data[0][1] = 1; data[1][0] = 2; data[1][1] = 3;
H5Awrite(attr, H5T_NATIVE_INT, data);
H5Sclose(space);
@@ -962,7 +962,7 @@ static void gent_all(void)
/* attributes of dset1.1.1 */
dims[0] = 27;
space = H5Screate_simple(1, dims, NULL);
- attr = H5Acreate (dataset, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, ".", "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
sprintf(buf, "1st attribute of dset1.1.1");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
@@ -970,7 +970,7 @@ static void gent_all(void)
dims[0] = 27;
space = H5Screate_simple(1, dims, NULL);
- attr = H5Acreate (dataset, "attr2", H5T_STD_I8BE, space, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, ".", "attr2", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
sprintf(buf, "2nd attribute of dset1.1.1");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
@@ -1165,7 +1165,7 @@ static void gent_many(void)
/* add attributes to dset1 */
dims[0] = 10;
space2 = H5Screate_simple(1, dims, NULL);
- attr = H5Acreate (dataset, "attr1", H5T_STD_I8BE, space2, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, ".", "attr1", H5T_STD_I8BE, space2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
sprintf(buf, "abcdefghi");
H5Awrite(attr, H5T_NATIVE_CHAR, buf);
H5Sclose(space2);
@@ -1173,7 +1173,7 @@ static void gent_many(void)
dims[0] = 2; dims[1] = 2;
space2 = H5Screate_simple(2, dims, NULL);
- attr = H5Acreate (dataset, "attr2", H5T_STD_I32BE, space2, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, ".", "attr2", H5T_STD_I32BE, space2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
data[0][0] = 0; data[0][1] = 1; data[1][0] = 2; data[1][1] = 3;
H5Awrite(attr, H5T_NATIVE_INT, data);
H5Sclose(space2);
@@ -1181,7 +1181,7 @@ static void gent_many(void)
dims[0] = 10;
space2 = H5Screate_simple(1, dims, NULL);
- attr = H5Acreate (dataset, "attr3", H5T_IEEE_F64BE, space2, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, ".", "attr3", H5T_IEEE_F64BE, space2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
for (i = 0; i < 10; i++)
d[i] = 0.1 * i;
H5Awrite(attr, H5T_NATIVE_DOUBLE, d);
@@ -1489,7 +1489,7 @@ hsize_t sdim;
dims[0] = 3;
space2 = H5Screate_simple(1, dims, NULL);
- attr = H5Acreate (dataset, "attr1", fxdlenstr2, space2, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, ".", "attr1", fxdlenstr2, space2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
sprintf(&(buf2[0*LENSTR2]), "0123456789");
sprintf(&(buf2[1*LENSTR2]), "abcdefghij");
sprintf(&(buf2[2*LENSTR2]), "ABCDEFGHIJ");
@@ -2950,7 +2950,7 @@ void gent_split_file(void)
dims[0] = 1;
space = H5Screate_simple(1, dims, NULL);
- attr = H5Acreate(root, "Metadata", atype, space, H5P_DEFAULT);
+ attr = H5Acreate2(root, ".", "Metadata", atype, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Awrite(attr, atype, meta);
H5Tclose(atype);
H5Sclose(space);
@@ -3120,7 +3120,7 @@ static void gent_vlstr(void)
root = H5Gopen2(fid1, "/", H5P_DEFAULT);
dataspace = H5Screate(H5S_SCALAR);
- att = H5Acreate(root, "test_scalar", tid1, dataspace, H5P_DEFAULT);
+ att = H5Acreate2(root, ".", "test_scalar", tid1, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Awrite(att, tid1, &string_att);
/* Close */
@@ -3312,20 +3312,20 @@ static void write_attr_in(hid_t loc_id,
/* Allocate and initialize VL dataset to write */
buf5[0].len = 1;
- buf5[0].p = malloc( 1 * sizeof(int));
- ((int *)buf5[0].p)[0]=1;
+ buf5[0].p = malloc(1 * sizeof(int));
+ ((int *)buf5[0].p)[0] = 1;
buf5[1].len = 2;
- buf5[1].p = malloc( 2 * sizeof(int));
- ((int *)buf5[1].p)[0]=2;
- ((int *)buf5[1].p)[1]=3;
+ buf5[1].p = malloc(2 * sizeof(int));
+ ((int *)buf5[1].p)[0] = 2;
+ ((int *)buf5[1].p)[1] = 3;
- sid = H5Screate_simple(1,dims,NULL);
+ sid = H5Screate_simple(1, dims, NULL);
tid = H5Tvlen_create(H5T_NATIVE_INT);
- aid = H5Acreate(loc_id,"vlen",tid,sid,H5P_DEFAULT);
- status = H5Awrite(aid,tid,buf5);
- assert(status>=0);
- status = H5Dvlen_reclaim(tid,sid,H5P_DEFAULT,buf5);
- assert(status>=0);
+ aid = H5Acreate2(loc_id, ".", "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Awrite(aid, tid, buf5);
+ assert(status >= 0);
+ status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf5);
+ assert(status >= 0);
status = H5Aclose(aid);
status = H5Tclose(tid);
status = H5Sclose(sid);
@@ -3419,23 +3419,24 @@ static void write_attr_in(hid_t loc_id,
/* Allocate and initialize VL dataset to write */
n=0;
- for (i = 0; i < 3; i++) {
- for (j = 0; j < 2; j++) {
+ for(i = 0; i < 3; i++) {
+ for(j = 0; j < 2; j++) {
int l;
+
buf52[i][j].p = malloc((i + 1) * sizeof(int));
buf52[i][j].len = i + 1;
- for (l = 0; l < i + 1; l++)
- ((int *)buf52[i][j].p)[l] = n++;
+ for(l = 0; l < i + 1; l++)
+ ((int *)buf52[i][j].p)[l] = n++;
}
}
- sid = H5Screate_simple(2,dims2,NULL);
+ sid = H5Screate_simple(2, dims2, NULL);
tid = H5Tvlen_create(H5T_NATIVE_INT);
- aid = H5Acreate(loc_id,"vlen2D",tid,sid,H5P_DEFAULT);
- status = H5Awrite(aid,tid,buf52);
- assert(status>=0);
- status = H5Dvlen_reclaim(tid,sid,H5P_DEFAULT,buf52);
- assert(status>=0);
+ aid = H5Acreate2(loc_id, ".", "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Awrite(aid, tid, buf52);
+ assert(status >= 0);
+ status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf52);
+ assert(status >= 0);
status = H5Aclose(aid);
status = H5Tclose(tid);
status = H5Sclose(sid);
@@ -3548,26 +3549,27 @@ static void write_attr_in(hid_t loc_id,
*/
/* Allocate and initialize VL dataset to write */
- n=0;
- for (i = 0; i < 4; i++) {
- for (j = 0; j < 3; j++) {
- for (k = 0; k < 2; k++) {
+ n = 0;
+ for(i = 0; i < 4; i++) {
+ for(j = 0; j < 3; j++) {
+ for(k = 0; k < 2; k++) {
int l;
+
buf53[i][j][k].p = malloc((i + 1) * sizeof(int));
buf53[i][j][k].len = i + 1;
- for (l = 0; l < i + 1; l++)
- ((int *)buf53[i][j][k].p)[l] = n++;
+ for(l = 0; l < i + 1; l++)
+ ((int *)buf53[i][j][k].p)[l] = n++;
}
}
}
- sid = H5Screate_simple(3,dims3,NULL);
+ sid = H5Screate_simple(3, dims3, NULL);
tid = H5Tvlen_create(H5T_NATIVE_INT);
- aid = H5Acreate(loc_id,"vlen3D",tid,sid,H5P_DEFAULT);
- status = H5Awrite(aid,tid,buf53);
- assert(status>=0);
- status = H5Dvlen_reclaim(tid,sid,H5P_DEFAULT,buf53);
- assert(status>=0);
+ aid = H5Acreate2(loc_id, ".", "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Awrite(aid, tid, buf53);
+ assert(status >= 0);
+ status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf53);
+ assert(status >= 0);
status = H5Aclose(aid);
status = H5Tclose(tid);
status = H5Sclose(sid);
@@ -4154,18 +4156,19 @@ int write_attr(hid_t loc_id, int rank, hsize_t *dims, const char *attr_name,
herr_t status;
/* Create a buf space */
- sid = H5Screate_simple(rank,dims,NULL);
+ sid = H5Screate_simple(rank, dims, NULL);
/* Create the attribute */
- aid = H5Acreate(loc_id,attr_name,tid,sid,H5P_DEFAULT);
+ aid = H5Acreate2(loc_id, ".", attr_name, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Write the buf */
- if ( buf )
- status = H5Awrite(aid,tid,buf);
+ if(buf)
+ status = H5Awrite(aid, tid, buf);
/* Close */
status = H5Aclose(aid);
status = H5Sclose(sid);
+
return status;
}
@@ -4417,16 +4420,16 @@ static void gent_named_dtype_attr(void)
assert(ret >= 0);
/* Create a scalar dataspace used for all objects */
- sid=H5Screate(H5S_SCALAR);
- assert(sid>0);
+ sid = H5Screate(H5S_SCALAR);
+ assert(sid > 0);
/* Create attribute on commited datatype */
- aid=H5Acreate(tid,F42_ATTRNAME,H5T_STD_I32LE,sid,H5P_DEFAULT);
- assert(aid>0);
+ aid = H5Acreate2(tid, ".", F42_ATTRNAME, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ assert(aid > 0);
/* Write data into the attribute */
- ret=H5Awrite(aid,H5T_NATIVE_INT,&data);
- assert(ret>=0);
+ ret = H5Awrite(aid, H5T_NATIVE_INT, &data);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* dataset
@@ -4434,16 +4437,16 @@ static void gent_named_dtype_attr(void)
*/
/* Create dataset */
- did=H5Dcreate(fid,F42_DSETNAME,tid,sid,H5P_DEFAULT);
- assert(did>0);
+ did = H5Dcreate(fid, F42_DSETNAME, tid, sid, H5P_DEFAULT);
+ assert(did > 0);
/* Create attribute on dataset */
- aid=H5Acreate(did,F42_ATTRNAME,tid,sid,H5P_DEFAULT);
- assert(aid>0);
+ aid = H5Acreate2(did, ".", F42_ATTRNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ assert(aid > 0);
/* Write data into the attribute */
- ret=H5Awrite(aid,H5T_NATIVE_INT,&data);
- assert(ret>=0);
+ ret = H5Awrite(aid, H5T_NATIVE_INT, &data);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* group
@@ -4452,15 +4455,15 @@ static void gent_named_dtype_attr(void)
/* Create a group */
gid = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- assert(gid>0);
+ assert(gid > 0);
/* Create attribute on group */
- aid=H5Acreate(gid,F42_ATTRNAME,tid,sid,H5P_DEFAULT);
- assert(aid>0);
+ aid = H5Acreate2(gid, ".", F42_ATTRNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ assert(aid > 0);
/* Write data into the attribute */
- ret=H5Awrite(aid,H5T_NATIVE_INT,&data);
- assert(ret>=0);
+ ret = H5Awrite(aid, H5T_NATIVE_INT, &data);
+ assert(ret >= 0);
/*-------------------------------------------------------------------------
* close
@@ -4513,7 +4516,7 @@ static void gent_null_space(void)
H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &dset_buf);
/* attribute */
- attr = H5Acreate (root, "attr", H5T_NATIVE_UINT, space, H5P_DEFAULT);
+ attr = H5Acreate2(root, ".", "attr", H5T_NATIVE_UINT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Awrite(attr, H5T_NATIVE_INT, &point); /* Nothing can be written */
H5Dclose(dataset);
@@ -5762,7 +5765,7 @@ gent_hyperslab(void)
*-------------------------------------------------------------------------
*/
static void
-gent_group_creation_order()
+gent_group_creation_order(void)
{
hid_t fid; /* file ID */
hid_t gid; /* group ID */
@@ -5902,7 +5905,7 @@ out:
*-------------------------------------------------------------------------
*/
static void
-gent_attr_creation_order()
+gent_attr_creation_order(void)
{
hid_t fid; /* file id */
hid_t gid; /* group id */
@@ -5910,11 +5913,11 @@ gent_attr_creation_order()
hid_t sid; /* space id */
hid_t aid; /* attribute id */
hid_t gcpl_id; /* group creation property list ID */
- hid_t dcpl_id; /* dataset creation property list ID */
+ hid_t dcpl_id; /* dataset creation property list ID */
int i;
- char *attr_name[3] = {"c", "b", "a" };
+ const char *attr_name[3] = {"c", "b", "a" };
- if ((fid = H5Fcreate(FILE59, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((fid = H5Fcreate(FILE59, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* create group creation property list */
@@ -5939,23 +5942,21 @@ gent_attr_creation_order()
*/
/* create dataspace for dataset */
- if ((sid = H5Screate(H5S_SCALAR)) < 0)
+ if((sid = H5Screate(H5S_SCALAR)) < 0)
goto out;
/* create a dataset */
- if ((did = H5Dcreate(fid, "dset", H5T_NATIVE_UCHAR, sid, dcpl_id)) < 0)
+ if((did = H5Dcreate(fid, "dset", H5T_NATIVE_UCHAR, sid, dcpl_id)) < 0)
goto out;
/* add attributes */
- for(i = 0; i < 3; i++)
- {
- if ((aid = H5Acreate(did, attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT)) < 0)
+ for(i = 0; i < 3; i++) {
+ if((aid = H5Acreate2(did, ".", attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* close attribute */
- if (H5Aclose(aid) < 0)
+ if(H5Aclose(aid) < 0)
goto out;
-
} /* end for */
if (H5Dclose(did) < 0)
@@ -5967,33 +5968,30 @@ gent_attr_creation_order()
*-------------------------------------------------------------------------
*/
- if ((gid = H5Gcreate2(fid, "g", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
+ if((gid = H5Gcreate2(fid, "g", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
goto out;
/* add attributes */
- for(i = 0; i < 3; i++)
- {
- if ((aid = H5Acreate(gid, attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT)) < 0)
+ for(i = 0; i < 3; i++) {
+ if((aid = H5Acreate2(gid, ".", attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* close attribute */
- if (H5Aclose(aid) < 0)
+ if(H5Aclose(aid) < 0)
goto out;
-
} /* end for */
if (H5Gclose(gid) < 0)
goto out;
-
/* close */
- if (H5Sclose(sid) < 0)
+ if(H5Sclose(sid) < 0)
goto out;
- if (H5Pclose(dcpl_id) < 0)
+ if(H5Pclose(dcpl_id) < 0)
goto out;
- if (H5Pclose(gcpl_id) < 0)
+ if(H5Pclose(gcpl_id) < 0)
goto out;
- if (H5Fclose(fid) < 0)
+ if(H5Fclose(fid) < 0)
goto out;
return;
diff --git a/tools/h5jam/h5jamgentest.c b/tools/h5jam/h5jamgentest.c
index 96f9bc7..846d300 100644
--- a/tools/h5jam/h5jamgentest.c
+++ b/tools/h5jam/h5jamgentest.c
@@ -207,7 +207,7 @@ gent_ub(const char * filename, size_t ub_size, size_t ub_fill)
dims[0] = 10;
space = H5Screate_simple(1, dims, NULL);
- attr = H5Acreate (group, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT);
+ attr = H5Acreate2(group, ".", "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
sprintf(buf, "abcdefghi");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
@@ -215,7 +215,7 @@ gent_ub(const char * filename, size_t ub_size, size_t ub_fill)
dims[0] = 2; dims[1] = 2;
space = H5Screate_simple(2, dims, NULL);
- attr = H5Acreate (group, "attr2", H5T_STD_I32BE, space, H5P_DEFAULT);
+ attr = H5Acreate2(group, ".", "attr2", H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
data[0][0] = 0; data[0][1] = 1; data[1][0] = 2; data[1][1] = 3;
H5Awrite(attr, H5T_NATIVE_INT, data);
H5Sclose(space);
@@ -238,7 +238,7 @@ gent_ub(const char * filename, size_t ub_size, size_t ub_fill)
/* attributes of dset1.1.1 */
dims[0] = 27;
space = H5Screate_simple(1, dims, NULL);
- attr = H5Acreate (dataset, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, ".", "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
sprintf(buf, "1st attribute of dset1.1.1");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
@@ -246,7 +246,7 @@ gent_ub(const char * filename, size_t ub_size, size_t ub_fill)
dims[0] = 27;
space = H5Screate_simple(1, dims, NULL);
- attr = H5Acreate (dataset, "attr2", H5T_STD_I8BE, space, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, ".", "attr2", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
sprintf(buf, "2nd attribute of dset1.1.1");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index 677d9fd..4a84ea6 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -417,16 +417,16 @@ int do_copy_objects(hid_t fidin,
* copy attrs
*-------------------------------------------------------------------------
*/
- if (copy_attr(grp_in,grp_out,options)<0)
+ if (copy_attr(grp_in,grp_out,options) < 0)
goto error;
if (gcpl_id>0) {
- if (H5Pclose(gcpl_id)<0)
+ if (H5Pclose(gcpl_id) < 0)
goto error;
}
- if (H5Gclose(grp_out)<0)
+ if (H5Gclose(grp_out) < 0)
goto error;
- if (H5Gclose(grp_in)<0)
+ if (H5Gclose(grp_in) < 0)
goto error;
break;
@@ -440,15 +440,15 @@ int do_copy_objects(hid_t fidin,
has_filter = 0;
/* early detection of references */
- if ((dset_in=H5Dopen(fidin,travt->objs[i].name))<0)
+ if ((dset_in=H5Dopen(fidin,travt->objs[i].name)) < 0)
goto error;
- if ((ftype_id=H5Dget_type (dset_in))<0)
+ if ((ftype_id=H5Dget_type (dset_in)) < 0)
goto error;
if (H5T_REFERENCE==H5Tget_class(ftype_id))
is_ref=1;
- if (H5Tclose(ftype_id)<0)
+ if (H5Tclose(ftype_id) < 0)
goto error;
- if (H5Dclose(dset_in)<0)
+ if (H5Dclose(dset_in) < 0)
goto error;
@@ -466,20 +466,20 @@ int do_copy_objects(hid_t fidin,
{
int j;
- if ((dset_in=H5Dopen(fidin,travt->objs[i].name))<0)
+ if ((dset_in=H5Dopen(fidin,travt->objs[i].name)) < 0)
goto error;
- if ((f_space_id=H5Dget_space(dset_in))<0)
+ if ((f_space_id=H5Dget_space(dset_in)) < 0)
goto error;
- if ((ftype_id=H5Dget_type (dset_in))<0)
+ if ((ftype_id=H5Dget_type (dset_in)) < 0)
goto error;
- if ((dcpl_id=H5Dget_create_plist(dset_in))<0)
+ if ((dcpl_id=H5Dget_create_plist(dset_in)) < 0)
goto error;
- if ((dcpl_out = H5Pcopy (dcpl_id))<0)
+ if ((dcpl_out = H5Pcopy (dcpl_id)) < 0)
goto error;
- if ( (rank=H5Sget_simple_extent_ndims(f_space_id))<0)
+ if ( (rank=H5Sget_simple_extent_ndims(f_space_id)) < 0)
goto error;
HDmemset(dims, 0, sizeof dims);
- if ( H5Sget_simple_extent_dims(f_space_id,dims,NULL)<0)
+ if ( H5Sget_simple_extent_dims(f_space_id,dims,NULL) < 0)
goto error;
nelmts=1;
for (j=0; j<rank; j++)
@@ -522,7 +522,7 @@ int do_copy_objects(hid_t fidin,
/* apply the filter */
if (apply_s) {
- if (apply_filters(travt->objs[i].name,rank,dims,dcpl_out,options,&has_filter)<0)
+ if (apply_filters(travt->objs[i].name,rank,dims,dcpl_out,options,&has_filter) < 0)
goto error;
}
@@ -537,7 +537,7 @@ int do_copy_objects(hid_t fidin,
} H5E_END_TRY;
if (dset_out==FAIL)
{
- if ((dset_out=H5Dcreate(fidout,travt->objs[i].name,wtype_id,f_space_id,dcpl_id))<0)
+ if ((dset_out=H5Dcreate(fidout,travt->objs[i].name,wtype_id,f_space_id,dcpl_id)) < 0)
goto error;
apply_f=0;
}
@@ -554,9 +554,9 @@ int do_copy_objects(hid_t fidin,
if (buf != NULL )
{
- if (H5Dread(dset_in,wtype_id,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf)<0)
+ if (H5Dread(dset_in,wtype_id,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf) < 0)
goto error;
- if (H5Dwrite(dset_out,wtype_id,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf)<0)
+ if (H5Dwrite(dset_out,wtype_id,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf) < 0)
goto error;
}
@@ -616,9 +616,9 @@ int do_copy_objects(hid_t fidin,
hs_nelmts *= hs_size[k];
}
- if (H5Sselect_hyperslab(f_space_id, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL)<0)
+ if (H5Sselect_hyperslab(f_space_id, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0)
goto error;
- if (H5Sselect_hyperslab(sm_space, H5S_SELECT_SET, zero, NULL, &hs_nelmts, NULL)<0)
+ if (H5Sselect_hyperslab(sm_space, H5S_SELECT_SET, zero, NULL, &hs_nelmts, NULL) < 0)
goto error;
}
else
@@ -693,11 +693,11 @@ int do_copy_objects(hid_t fidin,
* copy attrs
*-------------------------------------------------------------------------
*/
- if (copy_attr(dset_in,dset_out,options)<0)
+ if (copy_attr(dset_in,dset_out,options) < 0)
goto error;
/*close */
- if (H5Dclose(dset_out)<0)
+ if (H5Dclose(dset_out) < 0)
goto error;
}/*!H5T_REFERENCE*/
@@ -708,17 +708,17 @@ int do_copy_objects(hid_t fidin,
* close
*-------------------------------------------------------------------------
*/
- if (H5Tclose(ftype_id)<0)
+ if (H5Tclose(ftype_id) < 0)
goto error;
- if (H5Tclose(wtype_id)<0)
+ if (H5Tclose(wtype_id) < 0)
goto error;
- if (H5Pclose(dcpl_id)<0)
+ if (H5Pclose(dcpl_id) < 0)
goto error;
- if (H5Pclose(dcpl_out)<0)
+ if (H5Pclose(dcpl_out) < 0)
goto error;
- if (H5Sclose(f_space_id)<0)
+ if (H5Sclose(f_space_id) < 0)
goto error;
- if (H5Dclose(dset_in)<0)
+ if (H5Dclose(dset_in) < 0)
goto error;
}
@@ -748,11 +748,11 @@ int do_copy_objects(hid_t fidin,
fidout, /* Destination file or group identifier */
travt->objs[i].name, /* Name of the destination object */
pid, /* Properties which apply to the copy */
- H5P_DEFAULT)<0) /* Properties which apply to the new hard link */
+ H5P_DEFAULT) < 0) /* Properties which apply to the new hard link */
goto error;
/* close property */
- if (H5Pclose(pid)<0)
+ if (H5Pclose(pid) < 0)
goto error;
@@ -760,15 +760,15 @@ int do_copy_objects(hid_t fidin,
* copy attrs manually
*-------------------------------------------------------------------------
*/
- if ((dset_in=H5Dopen(fidin,travt->objs[i].name))<0)
+ if ((dset_in=H5Dopen(fidin,travt->objs[i].name)) < 0)
goto error;
- if ((dset_out=H5Dopen(fidout,travt->objs[i].name))<0)
+ if ((dset_out=H5Dopen(fidout,travt->objs[i].name)) < 0)
goto error;
- if (copy_attr(dset_in,dset_out,options)<0)
+ if (copy_attr(dset_in,dset_out,options) < 0)
goto error;
- if (H5Dclose(dset_in)<0)
+ if (H5Dclose(dset_in) < 0)
goto error;
- if (H5Dclose(dset_out)<0)
+ if (H5Dclose(dset_out) < 0)
goto error;
} /* end do we have request for filter/chunking */
@@ -923,7 +923,7 @@ int copy_attr(hid_t loc_in,
goto error;
/* get name */
- if (H5Aget_name( attr_id, (size_t)255, name )<0)
+ if (H5Aget_name( attr_id, (size_t)255, name ) < 0)
goto error;
/* get the file datatype */
@@ -969,12 +969,12 @@ int copy_attr(hid_t loc_in,
*-------------------------------------------------------------------------
*/
- buf=(void *) HDmalloc((size_t)(nelmts*msize));
- if ( buf==NULL){
+ buf = (void *)HDmalloc((size_t)(nelmts * msize));
+ if(buf == NULL) {
error_msg(progname, "cannot read into memory\n" );
goto error;
}
- if (H5Aread(attr_id,wtype_id,buf)<0)
+ if(H5Aread(attr_id, wtype_id, buf) < 0)
goto error;
/*-------------------------------------------------------------------------
@@ -982,24 +982,23 @@ int copy_attr(hid_t loc_in,
*-------------------------------------------------------------------------
*/
- if ((attr_out=H5Acreate(loc_out,name,ftype_id,space_id,H5P_DEFAULT))<0)
+ if((attr_out = H5Acreate2(loc_out, ".", name, ftype_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
- if(H5Awrite(attr_out,wtype_id,buf)<0)
+ if(H5Awrite(attr_out, wtype_id, buf) < 0)
goto error;
/*close*/
- if (H5Aclose(attr_out)<0)
+ if(H5Aclose(attr_out) < 0)
goto error;
- if (buf)
+ if(buf)
free(buf);
-
} /*H5T_REFERENCE*/
- if (options->verbose)
+ if(options->verbose)
printf(FORMAT_OBJ_ATTR, "attr", name);
/*-------------------------------------------------------------------------
@@ -1007,10 +1006,10 @@ int copy_attr(hid_t loc_in,
*-------------------------------------------------------------------------
*/
- if (H5Tclose(ftype_id)<0) goto error;
- if (H5Tclose(wtype_id)<0) goto error;
- if (H5Sclose(space_id)<0) goto error;
- if (H5Aclose(attr_id)<0) goto error;
+ if (H5Tclose(ftype_id) < 0) goto error;
+ if (H5Tclose(wtype_id) < 0) goto error;
+ if (H5Sclose(space_id) < 0) goto error;
+ if (H5Aclose(attr_id) < 0) goto error;
} /* u */
@@ -1059,7 +1058,7 @@ static void print_dataset_info(hid_t dcpl_id,
strcpy(strfilter,"\0");
/* get information about input filters */
- if ((nfilters = H5Pget_nfilters(dcpl_id))<0)
+ if ((nfilters = H5Pget_nfilters(dcpl_id)) < 0)
return;
for ( i=0; i<nfilters; i++)
diff --git a/tools/h5repack/h5repack_refs.c b/tools/h5repack/h5repack_refs.c
index 9a6b3ae..1f078c3 100644
--- a/tools/h5repack/h5repack_refs.c
+++ b/tools/h5repack/h5repack_refs.c
@@ -522,7 +522,7 @@ static int copy_refs_attr(hid_t loc_in,
* copy
*-------------------------------------------------------------------------
*/
- if((attr_out = H5Acreate(loc_out, name, ftype_id, space_id, H5P_DEFAULT)) < 0)
+ if((attr_out = H5Acreate2(loc_out, ".", name, ftype_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if(nelmts)
if(H5Awrite(attr_out, mtype_id, refbuf) < 0)
@@ -602,7 +602,7 @@ static int copy_refs_attr(hid_t loc_in,
* copy
*-------------------------------------------------------------------------
*/
- if((attr_out = H5Acreate(loc_out, name, ftype_id, space_id, H5P_DEFAULT)) < 0)
+ if((attr_out = H5Acreate2(loc_out, ".", name, ftype_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if(nelmts)
if(H5Awrite(attr_out, mtype_id, refbuf) < 0)
diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c
index fd38eed..16ed995 100644
--- a/tools/h5repack/h5repacktst.c
+++ b/tools/h5repack/h5repacktst.c
@@ -157,7 +157,7 @@ int main (void)
/* make the test files */
TESTING(" generating datasets");
- if (make_testfiles()<0)
+ if (make_testfiles() < 0)
GOERROR;
PASSED();
@@ -175,7 +175,7 @@ int main (void)
*/
TESTING(" copy of datasets (fill values)");
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
if (h5repack(FNAME0,FNAME0OUT,&pack_options) < 0)
GOERROR;
@@ -185,7 +185,7 @@ int main (void)
GOERROR;
if (h5repack_cmpdcpl(FNAME0,FNAME0OUT)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -195,7 +195,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" copy of datasets (all datatypes)");
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
if (h5repack(FNAME1,FNAME1OUT,&pack_options) < 0)
GOERROR;
@@ -205,7 +205,7 @@ int main (void)
GOERROR;
if (h5repack_cmpdcpl(FNAME1,FNAME1OUT)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -215,7 +215,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" copy of datasets (attributes)");
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
if (h5repack(FNAME2,FNAME2OUT,&pack_options) < 0)
GOERROR;
@@ -225,7 +225,7 @@ int main (void)
GOERROR;
if (h5repack_cmpdcpl(FNAME2,FNAME2OUT)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -234,7 +234,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" copy of datasets (hardlinks)");
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
if (h5repack(FNAME3,FNAME3OUT,&pack_options) < 0)
GOERROR;
@@ -244,7 +244,7 @@ int main (void)
GOERROR;
if (h5repack_cmpdcpl(FNAME3,FNAME3OUT)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -254,7 +254,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" copy of allocation early file");
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
if (h5repack(FNAME5,FNAME5OUT,&pack_options) < 0)
GOERROR;
@@ -262,7 +262,7 @@ int main (void)
GOERROR;
if (h5repack_verify(FNAME5OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -284,11 +284,11 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addfilter("dset1:GZIP=9",&pack_options)<0)
+ if (h5repack_addfilter("dset1:GZIP=9",&pack_options) < 0)
GOERROR;
- if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options)<0)
+ if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -296,7 +296,7 @@ int main (void)
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
#else
@@ -312,11 +312,11 @@ int main (void)
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addfilter("GZIP=1",&pack_options)<0)
+ if (h5repack_addfilter("GZIP=1",&pack_options) < 0)
GOERROR;
- if (h5repack_addlayout("CHUNK=20x10",&pack_options)<0)
+ if (h5repack_addlayout("CHUNK=20x10",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -324,7 +324,7 @@ int main (void)
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -350,11 +350,11 @@ if (h5tools_can_encode(H5Z_FILTER_SZIP) >0) {
*/
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addfilter("dset2:SZIP=8,EC",&pack_options)<0)
+ if (h5repack_addfilter("dset2:SZIP=8,EC",&pack_options) < 0)
GOERROR;
- if (h5repack_addlayout("dset2:CHUNK=20x10",&pack_options)<0)
+ if (h5repack_addlayout("dset2:CHUNK=20x10",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -362,7 +362,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -382,9 +382,9 @@ TESTING(" adding szip filter to all");
#if defined (H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addfilter("SZIP=8,NN",&pack_options)<0)
+ if (h5repack_addfilter("SZIP=8,NN",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -392,7 +392,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -413,11 +413,11 @@ if (szip_can_encode) {
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addfilter("dset1:SHUF",&pack_options)<0)
+ if (h5repack_addfilter("dset1:SHUF",&pack_options) < 0)
GOERROR;
- if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options)<0)
+ if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -425,7 +425,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -442,11 +442,11 @@ TESTING(" addding shuffle filter to all");
#ifdef H5_HAVE_FILTER_SHUFFLE
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addfilter("SHUF",&pack_options)<0)
+ if (h5repack_addfilter("SHUF",&pack_options) < 0)
GOERROR;
- if (h5repack_addlayout("CHUNK=20x10",&pack_options)<0)
+ if (h5repack_addlayout("CHUNK=20x10",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -454,7 +454,7 @@ TESTING(" addding shuffle filter to all");
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -471,11 +471,11 @@ TESTING(" addding shuffle filter to all");
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addfilter("dset1:FLET",&pack_options)<0)
+ if (h5repack_addfilter("dset1:FLET",&pack_options) < 0)
GOERROR;
- if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options)<0)
+ if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -483,7 +483,7 @@ TESTING(" addding shuffle filter to all");
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -501,11 +501,11 @@ TESTING(" addding shuffle filter to all");
#ifdef H5_HAVE_FILTER_FLETCHER32
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addfilter("FLET",&pack_options)<0)
+ if (h5repack_addfilter("FLET",&pack_options) < 0)
GOERROR;
- if (h5repack_addlayout("CHUNK=20x10",&pack_options)<0)
+ if (h5repack_addlayout("CHUNK=20x10",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -513,7 +513,7 @@ TESTING(" addding shuffle filter to all");
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -529,30 +529,30 @@ TESTING(" addding shuffle filter to all");
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addlayout("dset1:CHUNK 20x10",&pack_options)<0)
+ if (h5repack_addlayout("dset1:CHUNK 20x10",&pack_options) < 0)
GOERROR;
#if defined (H5_HAVE_FILTER_FLETCHER32)
- if (h5repack_addfilter("dset1:FLET",&pack_options)<0)
+ if (h5repack_addfilter("dset1:FLET",&pack_options) < 0)
GOERROR;
#endif
#ifdef H5_HAVE_FILTER_SHUFFLE
- if (h5repack_addfilter("dset1:SHUF",&pack_options)<0)
+ if (h5repack_addfilter("dset1:SHUF",&pack_options) < 0)
GOERROR;
#endif
#if defined (H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_addfilter("dset1:SZIP=8,NN",&pack_options)<0)
+ if (h5repack_addfilter("dset1:SZIP=8,NN",&pack_options) < 0)
GOERROR;
}
#endif
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_addfilter("dset1:GZIP=1",&pack_options)<0)
+ if (h5repack_addfilter("dset1:GZIP=1",&pack_options) < 0)
GOERROR;
#endif
@@ -562,7 +562,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -575,9 +575,9 @@ if (szip_can_encode) {
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options)<0)
+ if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -585,7 +585,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -595,9 +595,9 @@ if (szip_can_encode) {
*/
TESTING(" adding layout chunked to all");
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addlayout("CHUNK=20x10",&pack_options)<0)
+ if (h5repack_addlayout("CHUNK=20x10",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -605,7 +605,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -616,9 +616,9 @@ if (szip_can_encode) {
* test an individual object option
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addlayout("dset1:CONTI",&pack_options)<0)
+ if (h5repack_addlayout("dset1:CONTI",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -626,7 +626,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -637,9 +637,9 @@ if (szip_can_encode) {
* test all objects option
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addlayout("CONTI",&pack_options)<0)
+ if (h5repack_addlayout("CONTI",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -647,7 +647,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -659,9 +659,9 @@ if (szip_can_encode) {
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addlayout("dset1:COMPA",&pack_options)<0)
+ if (h5repack_addlayout("dset1:COMPA",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -669,7 +669,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -680,9 +680,9 @@ if (szip_can_encode) {
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addlayout("COMPA",&pack_options)<0)
+ if (h5repack_addlayout("COMPA",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -690,7 +690,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -702,9 +702,9 @@ if (szip_can_encode) {
* layout compact to contiguous conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addlayout("dset_compact:CONTI",&pack_options)<0)
+ if (h5repack_addlayout("dset_compact:CONTI",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -712,7 +712,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -722,9 +722,9 @@ if (szip_can_encode) {
* layout compact to chunk conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addlayout("dset_compact:CHUNK=2x5",&pack_options)<0)
+ if (h5repack_addlayout("dset_compact:CHUNK=2x5",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -732,7 +732,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -742,9 +742,9 @@ if (szip_can_encode) {
* layout compact to compact conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addlayout("dset_compact:COMPA",&pack_options)<0)
+ if (h5repack_addlayout("dset_compact:COMPA",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -752,7 +752,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -761,9 +761,9 @@ if (szip_can_encode) {
* layout contiguous to compact conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addlayout("dset_contiguous:COMPA",&pack_options)<0)
+ if (h5repack_addlayout("dset_contiguous:COMPA",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -771,7 +771,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -780,9 +780,9 @@ if (szip_can_encode) {
* layout contiguous to chunk conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addlayout("dset_contiguous:CHUNK=3x6",&pack_options)<0)
+ if (h5repack_addlayout("dset_contiguous:CHUNK=3x6",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -790,7 +790,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -800,9 +800,9 @@ if (szip_can_encode) {
* layout contiguous to contiguous conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addlayout("dset_contiguous:CONTI",&pack_options)<0)
+ if (h5repack_addlayout("dset_contiguous:CONTI",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -810,7 +810,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -819,9 +819,9 @@ if (szip_can_encode) {
* layout chunked to compact conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addlayout("dset_chunk:COMPA",&pack_options)<0)
+ if (h5repack_addlayout("dset_chunk:COMPA",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -829,7 +829,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -839,9 +839,9 @@ if (szip_can_encode) {
* layout chunked to contiguous conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addlayout("dset_chunk:CONTI",&pack_options)<0)
+ if (h5repack_addlayout("dset_chunk:CONTI",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -849,7 +849,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -858,9 +858,9 @@ if (szip_can_encode) {
* layout chunked to chunked conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addlayout("dset_chunk:CHUNK=18x13",&pack_options)<0)
+ if (h5repack_addlayout("dset_chunk:CHUNK=18x13",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
GOERROR;
@@ -868,7 +868,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -888,7 +888,7 @@ if (szip_can_encode) {
#if defined (H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
if (h5repack(FNAME7,FNAME7OUT,&pack_options) < 0)
GOERROR;
@@ -896,7 +896,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME7OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -911,9 +911,9 @@ if (szip_can_encode) {
#if defined (H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addfilter("dset_szip:NONE",&pack_options)<0)
+ if (h5repack_addfilter("dset_szip:NONE",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME7,FNAME7OUT,&pack_options) < 0)
GOERROR;
@@ -921,7 +921,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME7OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -936,7 +936,7 @@ if (szip_can_encode) {
TESTING(" copy of deflate filter");
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
if (h5repack(FNAME8,FNAME8OUT,&pack_options) < 0)
GOERROR;
@@ -944,7 +944,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME8OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -956,9 +956,9 @@ if (szip_can_encode) {
TESTING(" removing deflate filter");
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addfilter("dset_deflate:NONE",&pack_options)<0)
+ if (h5repack_addfilter("dset_deflate:NONE",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME8,FNAME8OUT,&pack_options) < 0)
GOERROR;
@@ -966,7 +966,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME8OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -979,7 +979,7 @@ if (szip_can_encode) {
TESTING(" copy of shuffle filter");
#ifdef H5_HAVE_FILTER_SHUFFLE
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
if (h5repack(FNAME9,FNAME9OUT,&pack_options) < 0)
GOERROR;
@@ -987,7 +987,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME9OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -998,9 +998,9 @@ if (szip_can_encode) {
TESTING(" removing shuffle filter");
#ifdef H5_HAVE_FILTER_SHUFFLE
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addfilter("dset_shuffle:NONE",&pack_options)<0)
+ if (h5repack_addfilter("dset_shuffle:NONE",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME9,FNAME9OUT,&pack_options) < 0)
GOERROR;
@@ -1008,7 +1008,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME9OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -1019,7 +1019,7 @@ if (szip_can_encode) {
TESTING(" copy of fletcher filter");
#ifdef H5_HAVE_FILTER_FLETCHER32
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
if (h5repack(FNAME10,FNAME10OUT,&pack_options) < 0)
GOERROR;
@@ -1027,7 +1027,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME10OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -1038,9 +1038,9 @@ if (szip_can_encode) {
TESTING(" removing fletcher filter");
#ifdef H5_HAVE_FILTER_FLETCHER32
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addfilter("dset_fletcher32:NONE",&pack_options)<0)
+ if (h5repack_addfilter("dset_fletcher32:NONE",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME10,FNAME10OUT,&pack_options) < 0)
GOERROR;
@@ -1048,7 +1048,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME10OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -1060,7 +1060,7 @@ if (szip_can_encode) {
TESTING(" copy of nbit filter");
#ifdef H5_HAVE_FILTER_NBIT
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
if (h5repack(FNAME12,FNAME12OUT,&pack_options) < 0)
GOERROR;
@@ -1068,7 +1068,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME12OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -1079,9 +1079,9 @@ if (szip_can_encode) {
TESTING(" removing nbit filter");
#ifdef H5_HAVE_FILTER_NBIT
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addfilter("dset_nbit:NONE",&pack_options)<0)
+ if (h5repack_addfilter("dset_nbit:NONE",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME12,FNAME12OUT,&pack_options) < 0)
GOERROR;
@@ -1089,7 +1089,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME12OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -1100,9 +1100,9 @@ if (szip_can_encode) {
TESTING(" adding nbit filter");
#ifdef H5_HAVE_FILTER_NBIT
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addfilter("dset_int31:NBIT",&pack_options)<0)
+ if (h5repack_addfilter("dset_int31:NBIT",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME12,FNAME12OUT,&pack_options) < 0)
GOERROR;
@@ -1110,7 +1110,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME12OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -1120,7 +1120,7 @@ if (szip_can_encode) {
TESTING(" copy of scaleoffset filter");
#ifdef H5_HAVE_FILTER_SCALEOFFSET
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
if (h5repack(FNAME13,FNAME13OUT,&pack_options) < 0)
GOERROR;
@@ -1128,7 +1128,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME13OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -1139,9 +1139,9 @@ if (szip_can_encode) {
TESTING(" removing scaleoffset filter");
#ifdef H5_HAVE_FILTER_SCALEOFFSET
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addfilter("dset_scaleoffset:NONE",&pack_options)<0)
+ if (h5repack_addfilter("dset_scaleoffset:NONE",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME13,FNAME13OUT,&pack_options) < 0)
GOERROR;
@@ -1149,7 +1149,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME13OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -1161,9 +1161,9 @@ if (szip_can_encode) {
TESTING(" adding scaleoffset filter");
#ifdef H5_HAVE_FILTER_SCALEOFFSET
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addfilter("dset_none:SOFF=31,IN",&pack_options)<0)
+ if (h5repack_addfilter("dset_none:SOFF=31,IN",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME13,FNAME13OUT,&pack_options) < 0)
GOERROR;
@@ -1171,7 +1171,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME13OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -1197,9 +1197,9 @@ if (szip_can_encode) {
&& defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addfilter("dset_deflate:SZIP=8,NN",&pack_options)<0)
+ if (h5repack_addfilter("dset_deflate:SZIP=8,NN",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME11,FNAME11OUT,&pack_options) < 0)
GOERROR;
@@ -1207,7 +1207,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME11OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -1225,9 +1225,9 @@ if (szip_can_encode) {
&& defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addfilter("dset_szip:GZIP=1",&pack_options)<0)
+ if (h5repack_addfilter("dset_szip:GZIP=1",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME11,FNAME11OUT,&pack_options) < 0)
GOERROR;
@@ -1235,7 +1235,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME11OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -1257,9 +1257,9 @@ if (szip_can_encode) {
#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE) \
&& defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE)
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
- if (h5repack_addfilter("NONE",&pack_options)<0)
+ if (h5repack_addfilter("NONE",&pack_options) < 0)
GOERROR;
if (h5repack(FNAME11,FNAME11OUT,&pack_options) < 0)
GOERROR;
@@ -1267,7 +1267,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME11OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -1280,7 +1280,7 @@ if (szip_can_encode) {
*-------------------------------------------------------------------------
*/
TESTING(" big file");
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
if (h5repack(FNAME14,FNAME14OUT,&pack_options) < 0)
GOERROR;
@@ -1288,7 +1288,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME14OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -1297,7 +1297,7 @@ if (szip_can_encode) {
*-------------------------------------------------------------------------
*/
TESTING(" external datasets");
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
if (h5repack(FNAME15,FNAME15OUT,&pack_options) < 0)
GOERROR;
@@ -1305,7 +1305,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME15OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -1333,7 +1333,7 @@ if (szip_can_encode) {
*-------------------------------------------------------------------------
*/
TESTING(" latest file format options");
- if (h5repack_init (&pack_options, 0)<0)
+ if (h5repack_init (&pack_options, 0) < 0)
GOERROR;
pack_options.latest=1;
pack_options.grp_compact=10;
@@ -1349,7 +1349,7 @@ if (szip_can_encode) {
GOERROR;
if (h5repack_verify(FNAME1OUT,&pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options)<0)
+ if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
@@ -1396,60 +1396,60 @@ int make_testfiles(void)
* create a file for general copy test
*-------------------------------------------------------------------------
*/
- if((loc_id = H5Fcreate(FNAME0,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
+ if((loc_id = H5Fcreate(FNAME0,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
return -1;
- if (make_fill(loc_id)<0)
+ if (make_fill(loc_id) < 0)
goto out;
- if(H5Fclose(loc_id)<0)
+ if(H5Fclose(loc_id) < 0)
return -1;
/*-------------------------------------------------------------------------
* create another file for general copy test (all datatypes)
*-------------------------------------------------------------------------
*/
- if((loc_id = H5Fcreate(FNAME1,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
+ if((loc_id = H5Fcreate(FNAME1,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
return -1;
- if (make_all_objects(loc_id)<0)
+ if (make_all_objects(loc_id) < 0)
goto out;
- if(H5Fclose(loc_id)<0)
+ if(H5Fclose(loc_id) < 0)
return -1;
/*-------------------------------------------------------------------------
* create a file for attributes copy test
*-------------------------------------------------------------------------
*/
- if((loc_id = H5Fcreate(FNAME2,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
+ if((loc_id = H5Fcreate(FNAME2,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
return -1;
- if (make_attributes(loc_id)<0)
+ if (make_attributes(loc_id) < 0)
goto out;
- if(H5Fclose(loc_id)<0)
+ if(H5Fclose(loc_id) < 0)
return -1;
/*-------------------------------------------------------------------------
* create a file for hard links test
*-------------------------------------------------------------------------
*/
- if((loc_id = H5Fcreate(FNAME3,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
+ if((loc_id = H5Fcreate(FNAME3,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
return -1;
- if (make_hlinks(loc_id)<0)
+ if (make_hlinks(loc_id) < 0)
goto out;
- if(H5Fclose(loc_id)<0)
+ if(H5Fclose(loc_id) < 0)
return -1;
/*-------------------------------------------------------------------------
* create a file for layouts test
*-------------------------------------------------------------------------
*/
- if((loc_id = H5Fcreate(FNAME4,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
+ if((loc_id = H5Fcreate(FNAME4,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
return -1;
- if (make_layout(loc_id)<0)
+ if (make_layout(loc_id) < 0)
goto out;
- if(H5Fclose(loc_id)<0)
+ if(H5Fclose(loc_id) < 0)
return -1;
/*-------------------------------------------------------------------------
* create a file for the H5D_ALLOC_TIME_EARLY test
*-------------------------------------------------------------------------
*/
- if (make_early()<0)
+ if (make_early() < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -1457,11 +1457,11 @@ int make_testfiles(void)
*-------------------------------------------------------------------------
*/
#ifdef H5_HAVE_FILTER_SZIP
- if((loc_id = H5Fcreate(FNAME7,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
+ if((loc_id = H5Fcreate(FNAME7,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
return -1;
- if (make_szip(loc_id)<0)
+ if (make_szip(loc_id) < 0)
goto out;
- if(H5Fclose(loc_id)<0)
+ if(H5Fclose(loc_id) < 0)
return -1;
#endif /* H5_HAVE_FILTER_SZIP */
@@ -1469,88 +1469,88 @@ int make_testfiles(void)
* create a file with the deflate filter
*-------------------------------------------------------------------------
*/
- if((loc_id = H5Fcreate(FNAME8,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
+ if((loc_id = H5Fcreate(FNAME8,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
return -1;
- if (make_deflate(loc_id)<0)
+ if (make_deflate(loc_id) < 0)
goto out;
- if(H5Fclose(loc_id)<0)
+ if(H5Fclose(loc_id) < 0)
return -1;
/*-------------------------------------------------------------------------
* create a file with the shuffle filter
*-------------------------------------------------------------------------
*/
- if((loc_id = H5Fcreate(FNAME9,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
+ if((loc_id = H5Fcreate(FNAME9,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
return -1;
- if (make_shuffle(loc_id)<0)
+ if (make_shuffle(loc_id) < 0)
goto out;
- if(H5Fclose(loc_id)<0)
+ if(H5Fclose(loc_id) < 0)
return -1;
/*-------------------------------------------------------------------------
* create a file with the fletcher32 filter
*-------------------------------------------------------------------------
*/
- if((loc_id = H5Fcreate(FNAME10,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
+ if((loc_id = H5Fcreate(FNAME10,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
return -1;
- if (make_fletcher32(loc_id)<0)
+ if (make_fletcher32(loc_id) < 0)
goto out;
- if(H5Fclose(loc_id)<0)
+ if(H5Fclose(loc_id) < 0)
return -1;
/*-------------------------------------------------------------------------
* create a file with all the filters
*-------------------------------------------------------------------------
*/
- if((loc_id = H5Fcreate(FNAME11,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
+ if((loc_id = H5Fcreate(FNAME11,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
return -1;
- if (make_all(loc_id)<0)
+ if (make_all(loc_id) < 0)
goto out;
- if(H5Fclose(loc_id)<0)
+ if(H5Fclose(loc_id) < 0)
return -1;
/*-------------------------------------------------------------------------
* create a file with the nbit filter
*-------------------------------------------------------------------------
*/
- if((loc_id = H5Fcreate(FNAME12,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
+ if((loc_id = H5Fcreate(FNAME12,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
return -1;
- if (make_nbit(loc_id)<0)
+ if (make_nbit(loc_id) < 0)
goto out;
- if(H5Fclose(loc_id)<0)
+ if(H5Fclose(loc_id) < 0)
return -1;
/*-------------------------------------------------------------------------
* create a file with the scaleoffset filter
*-------------------------------------------------------------------------
*/
- if((loc_id = H5Fcreate(FNAME13,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
+ if((loc_id = H5Fcreate(FNAME13,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
return -1;
- if (make_scaleoffset(loc_id)<0)
+ if (make_scaleoffset(loc_id) < 0)
goto out;
- if(H5Fclose(loc_id)<0)
+ if(H5Fclose(loc_id) < 0)
return -1;
/*-------------------------------------------------------------------------
* create a big dataset
*-------------------------------------------------------------------------
*/
- if((loc_id = H5Fcreate(FNAME14,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
+ if((loc_id = H5Fcreate(FNAME14,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
return -1;
- if (make_big(loc_id)<0)
+ if (make_big(loc_id) < 0)
goto out;
- if(H5Fclose(loc_id)<0)
+ if(H5Fclose(loc_id) < 0)
return -1;
/*-------------------------------------------------------------------------
* create a file with external dataset
*-------------------------------------------------------------------------
*/
- if((loc_id = H5Fcreate(FNAME15,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
+ if((loc_id = H5Fcreate(FNAME15,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
return -1;
- if (make_external(loc_id)<0)
+ if (make_external(loc_id) < 0)
goto out;
- if(H5Fclose(loc_id)<0)
+ if(H5Fclose(loc_id) < 0)
return -1;
/*-------------------------------------------------------------------------
@@ -1779,13 +1779,13 @@ int make_szip(hid_t loc_id)
}
}
/* create a space */
- if((sid = H5Screate_simple(RANK, dims, NULL))<0)
+ if((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
return -1;
/* create a dcpl */
- if ((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0)
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto out;
/* set up chunk */
- if(H5Pset_chunk(dcpl, RANK, chunk_dims)<0)
+ if(H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -1798,17 +1798,17 @@ if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) {
}
if (szip_can_encode) {
/* set szip data */
- if(H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block)<0)
+ if(H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block) < 0)
goto out;
- if (make_dset(loc_id,"dset_szip",sid,dcpl,buf)<0)
+ if (make_dset(loc_id,"dset_szip",sid,dcpl,buf) < 0)
goto out;
} else {
/* WARNING? SZIP is decoder only, can't generate test files */
}
- if(H5Sclose(sid)<0)
+ if(H5Sclose(sid) < 0)
goto out;
- if(H5Pclose(dcpl)<0)
+ if(H5Pclose(dcpl) < 0)
goto out;
return 0;
@@ -1849,13 +1849,13 @@ int make_deflate(hid_t loc_id)
}
/* create a space */
- if((sid = H5Screate_simple(RANK, dims, NULL))<0)
+ if((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
return -1;
/* create a dcpl */
- if ((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0)
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto out;
/* set up chunk */
- if(H5Pset_chunk(dcpl, RANK, chunk_dims)<0)
+ if(H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
goto out;
/*-------------------------------------------------------------------------
* GZIP
@@ -1863,16 +1863,16 @@ int make_deflate(hid_t loc_id)
*/
#if defined (H5_HAVE_FILTER_DEFLATE)
/* set deflate data */
- if(H5Pset_deflate(dcpl, 9)<0)
+ if(H5Pset_deflate(dcpl, 9) < 0)
goto out;
- if (make_dset(loc_id,"dset_deflate",sid,dcpl,buf)<0)
+ if (make_dset(loc_id,"dset_deflate",sid,dcpl,buf) < 0)
goto out;
/* create a reference to the dataset, test second seeep of file for references */
- if (H5Rcreate(&bufref[0],loc_id,"dset_deflate",H5R_OBJECT,-1)<0)
+ if (H5Rcreate(&bufref[0],loc_id,"dset_deflate",H5R_OBJECT,-1) < 0)
goto out;
- if (write_dset(loc_id,1,dims1r,"ref",H5T_STD_REF_OBJ,bufref)<0)
+ if (write_dset(loc_id,1,dims1r,"ref",H5T_STD_REF_OBJ,bufref) < 0)
goto out;
#endif
@@ -1880,9 +1880,9 @@ int make_deflate(hid_t loc_id)
* close space and dcpl
*-------------------------------------------------------------------------
*/
- if(H5Sclose(sid)<0)
+ if(H5Sclose(sid) < 0)
goto out;
- if(H5Pclose(dcpl)<0)
+ if(H5Pclose(dcpl) < 0)
goto out;
return 0;
@@ -1918,13 +1918,13 @@ int make_shuffle(hid_t loc_id)
}
}
/* create a space */
- if((sid = H5Screate_simple(RANK, dims, NULL))<0)
+ if((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
return -1;
/* create a dcpl */
- if ((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0)
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto out;
/* set up chunk */
- if(H5Pset_chunk(dcpl, RANK, chunk_dims)<0)
+ if(H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -1933,9 +1933,9 @@ int make_shuffle(hid_t loc_id)
*/
#if defined (H5_HAVE_FILTER_SHUFFLE)
/* set the shuffle filter */
- if (H5Pset_shuffle(dcpl)<0)
+ if (H5Pset_shuffle(dcpl) < 0)
goto out;
- if (make_dset(loc_id,"dset_shuffle",sid,dcpl,buf)<0)
+ if (make_dset(loc_id,"dset_shuffle",sid,dcpl,buf) < 0)
goto out;
#endif
@@ -1943,9 +1943,9 @@ int make_shuffle(hid_t loc_id)
* close space and dcpl
*-------------------------------------------------------------------------
*/
- if(H5Sclose(sid)<0)
+ if(H5Sclose(sid) < 0)
goto out;
- if(H5Pclose(dcpl)<0)
+ if(H5Pclose(dcpl) < 0)
goto out;
return 0;
@@ -1980,13 +1980,13 @@ int make_fletcher32(hid_t loc_id)
}
}
/* create a space */
- if((sid = H5Screate_simple(RANK, dims, NULL))<0)
+ if((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
return -1;
/* create a dataset creation property list; the same DCPL is used for all dsets */
- if ((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0)
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto out;
/* set up chunk */
- if(H5Pset_chunk(dcpl, RANK, chunk_dims)<0)
+ if(H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
goto out;
@@ -1996,12 +1996,12 @@ int make_fletcher32(hid_t loc_id)
*/
#if defined (H5_HAVE_FILTER_FLETCHER32)
/* remove the filters from the dcpl */
- if (H5Premove_filter(dcpl,H5Z_FILTER_ALL)<0)
+ if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0)
goto out;
/* set the checksum filter */
- if (H5Pset_fletcher32(dcpl)<0)
+ if (H5Pset_fletcher32(dcpl) < 0)
goto out;
- if (make_dset(loc_id,"dset_fletcher32",sid,dcpl,buf)<0)
+ if (make_dset(loc_id,"dset_fletcher32",sid,dcpl,buf) < 0)
goto out;
#endif
@@ -2009,9 +2009,9 @@ int make_fletcher32(hid_t loc_id)
* close space and dcpl
*-------------------------------------------------------------------------
*/
- if(H5Sclose(sid)<0)
+ if(H5Sclose(sid) < 0)
goto out;
- if(H5Pclose(dcpl)<0)
+ if(H5Pclose(dcpl) < 0)
goto out;
return 0;
@@ -2049,13 +2049,13 @@ int make_nbit(hid_t loc_id)
}
}
/* create a space */
- if((sid = H5Screate_simple(RANK, dims, NULL))<0)
+ if((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
return -1;
/* create a dataset creation property list; the same DCPL is used for all dsets */
- if ((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0)
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto out;
/* set up chunk */
- if(H5Pset_chunk(dcpl, RANK, chunk_dims)<0)
+ if(H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
goto out;
dtid = H5Tcopy(H5T_NATIVE_INT);
@@ -2067,39 +2067,39 @@ int make_nbit(hid_t loc_id)
#if defined (H5_HAVE_FILTER_NBIT)
/* remove the filters from the dcpl */
- if (H5Premove_filter(dcpl,H5Z_FILTER_ALL)<0)
+ if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0)
{
H5Tclose(dtid);
goto out;
}
- if (H5Pset_nbit(dcpl)<0)
+ if (H5Pset_nbit(dcpl) < 0)
{
H5Tclose(dtid);
goto out;
}
- if((dsid = H5Dcreate (loc_id,"dset_nbit",dtid,sid,dcpl))<0)
+ if((dsid = H5Dcreate (loc_id,"dset_nbit",dtid,sid,dcpl)) < 0)
{
H5Tclose(dtid);
goto out;
}
- if(H5Dwrite(dsid,dtid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf)<0)
+ if(H5Dwrite(dsid,dtid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf) < 0)
{
H5Tclose(dtid);
goto out;
}
H5Dclose(dsid);
- if (H5Premove_filter(dcpl,H5Z_FILTER_ALL)<0)
+ if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0)
{
H5Tclose(dtid);
goto out;
}
- if((dsid = H5Dcreate (loc_id,"dset_int31",dtid,sid,dcpl))<0)
+ if((dsid = H5Dcreate (loc_id,"dset_int31",dtid,sid,dcpl)) < 0)
{
H5Tclose(dtid);
goto out;
}
- if(H5Dwrite(dsid,dtid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf)<0)
+ if(H5Dwrite(dsid,dtid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf) < 0)
{
H5Tclose(dtid);
goto out;
@@ -2111,11 +2111,11 @@ int make_nbit(hid_t loc_id)
* close
*-------------------------------------------------------------------------
*/
- if(H5Sclose(sid)<0)
+ if(H5Sclose(sid) < 0)
goto out;
- if(H5Pclose(dcpl)<0)
+ if(H5Pclose(dcpl) < 0)
goto out;
- if (H5Tclose(dtid)<0)
+ if (H5Tclose(dtid) < 0)
goto out;
return 0;
@@ -2153,46 +2153,46 @@ int make_scaleoffset(hid_t loc_id)
}
}
/* create a space */
- if((sid = H5Screate_simple(RANK, dims, NULL))<0)
+ if((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
return -1;
/* create a dataset creation property list; the same DCPL is used for all dsets */
- if ((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0)
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto out;
/* set up chunk */
- if(H5Pset_chunk(dcpl, RANK, chunk_dims)<0)
+ if(H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
goto out;
dtid = H5Tcopy(H5T_NATIVE_INT);
#if defined (H5_HAVE_FILTER_SCALEOFFSET)
/* remove the filters from the dcpl */
- if (H5Premove_filter(dcpl,H5Z_FILTER_ALL)<0)
+ if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0)
{
H5Tclose(dtid);
goto out;
}
- if (H5Pset_scaleoffset(dcpl,H5Z_SO_INT,31)<0)
+ if (H5Pset_scaleoffset(dcpl,H5Z_SO_INT,31) < 0)
{
H5Tclose(dtid);
goto out;
}
- if((dsid = H5Dcreate (loc_id,"dset_scaleoffset",dtid,sid,dcpl))<0)
+ if((dsid = H5Dcreate (loc_id,"dset_scaleoffset",dtid,sid,dcpl)) < 0)
{
H5Tclose(dtid);
goto out;
}
- if(H5Dwrite(dsid,dtid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf)<0)
+ if(H5Dwrite(dsid,dtid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf) < 0)
{
H5Tclose(dtid);
goto out;
}
H5Dclose(dsid);
- if((dsid = H5Dcreate (loc_id,"dset_none",dtid,sid,H5P_DEFAULT))<0)
+ if((dsid = H5Dcreate (loc_id,"dset_none",dtid,sid,H5P_DEFAULT)) < 0)
{
H5Tclose(dtid);
goto out;
}
- if(H5Dwrite(dsid,dtid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf)<0)
+ if(H5Dwrite(dsid,dtid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf) < 0)
{
H5Tclose(dtid);
goto out;
@@ -2205,9 +2205,9 @@ int make_scaleoffset(hid_t loc_id)
* close space and dcpl
*-------------------------------------------------------------------------
*/
- if(H5Sclose(sid)<0)
+ if(H5Sclose(sid) < 0)
goto out;
- if(H5Pclose(dcpl)<0)
+ if(H5Pclose(dcpl) < 0)
goto out;
return 0;
@@ -2254,24 +2254,24 @@ int make_all(hid_t loc_id)
}
}
/* create a space */
- if((sid = H5Screate_simple(RANK, dims, NULL))<0)
+ if((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
return -1;
/* create a dataset creation property list; the same DCPL is used for all dsets */
- if ((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0)
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto out;
/* set up chunk */
- if(H5Pset_chunk(dcpl, RANK, chunk_dims)<0)
+ if(H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
goto out;
#if defined (H5_HAVE_FILTER_SHUFFLE)
/* set the shuffle filter */
- if (H5Pset_shuffle(dcpl)<0)
+ if (H5Pset_shuffle(dcpl) < 0)
goto out;
#endif
#if defined (H5_HAVE_FILTER_FLETCHER32)
/* set the checksum filter */
- if (H5Pset_fletcher32(dcpl)<0)
+ if (H5Pset_fletcher32(dcpl) < 0)
goto out;
#endif
@@ -2281,7 +2281,7 @@ if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) {
}
if (szip_can_encode) {
/* set szip data */
- if(H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block)<0)
+ if(H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block) < 0)
goto out;
} else {
/* WARNING? SZIP is decoder only, can't generate test data using szip */
@@ -2290,11 +2290,11 @@ if (szip_can_encode) {
#if defined (H5_HAVE_FILTER_DEFLATE)
/* set deflate data */
- if(H5Pset_deflate(dcpl, 9)<0)
+ if(H5Pset_deflate(dcpl, 9) < 0)
goto out;
#endif
- if (make_dset(loc_id,"dset_all",sid,dcpl,buf)<0)
+ if (make_dset(loc_id,"dset_all",sid,dcpl,buf) < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -2303,12 +2303,12 @@ if (szip_can_encode) {
*/
#if defined (H5_HAVE_FILTER_FLETCHER32)
/* remove the filters from the dcpl */
- if (H5Premove_filter(dcpl,H5Z_FILTER_ALL)<0)
+ if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0)
goto out;
/* set the checksum filter */
- if (H5Pset_fletcher32(dcpl)<0)
+ if (H5Pset_fletcher32(dcpl) < 0)
goto out;
- if (make_dset(loc_id,"dset_fletcher32",sid,dcpl,buf)<0)
+ if (make_dset(loc_id,"dset_fletcher32",sid,dcpl,buf) < 0)
goto out;
#endif
@@ -2320,12 +2320,12 @@ if (szip_can_encode) {
#if defined (H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
/* remove the filters from the dcpl */
- if (H5Premove_filter(dcpl,H5Z_FILTER_ALL)<0)
+ if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0)
goto out;
/* set szip data */
- if(H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block)<0)
+ if(H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block) < 0)
goto out;
- if (make_dset(loc_id,"dset_szip",sid,dcpl,buf)<0)
+ if (make_dset(loc_id,"dset_szip",sid,dcpl,buf) < 0)
goto out;
} else {
/* WARNING? SZIP is decoder only, can't generate test dataset */
@@ -2338,12 +2338,12 @@ if (szip_can_encode) {
*/
#if defined (H5_HAVE_FILTER_SHUFFLE)
/* remove the filters from the dcpl */
- if (H5Premove_filter(dcpl,H5Z_FILTER_ALL)<0)
+ if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0)
goto out;
/* set the shuffle filter */
- if (H5Pset_shuffle(dcpl)<0)
+ if (H5Pset_shuffle(dcpl) < 0)
goto out;
- if (make_dset(loc_id,"dset_shuffle",sid,dcpl,buf)<0)
+ if (make_dset(loc_id,"dset_shuffle",sid,dcpl,buf) < 0)
goto out;
#endif
@@ -2353,12 +2353,12 @@ if (szip_can_encode) {
*/
#if defined (H5_HAVE_FILTER_DEFLATE)
/* remove the filters from the dcpl */
- if (H5Premove_filter(dcpl,H5Z_FILTER_ALL)<0)
+ if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0)
goto out;
/* set deflate data */
- if(H5Pset_deflate(dcpl, 1)<0)
+ if(H5Pset_deflate(dcpl, 1) < 0)
goto out;
- if (make_dset(loc_id,"dset_deflate",sid,dcpl,buf)<0)
+ if (make_dset(loc_id,"dset_deflate",sid,dcpl,buf) < 0)
goto out;
#endif
@@ -2369,22 +2369,22 @@ if (szip_can_encode) {
*/
#if defined (H5_HAVE_FILTER_NBIT)
/* remove the filters from the dcpl */
- if (H5Premove_filter(dcpl,H5Z_FILTER_ALL)<0)
+ if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0)
goto out;
/* set the shuffle filter */
- if (H5Pset_nbit(dcpl)<0)
+ if (H5Pset_nbit(dcpl) < 0)
goto out;
dtid = H5Tcopy(H5T_NATIVE_INT);
H5Tset_precision(dtid,(H5Tget_precision(dtid)-1));
- if((dsid = H5Dcreate (loc_id,"dset_nbit",dtid,sid,dcpl))<0)
+ if((dsid = H5Dcreate (loc_id,"dset_nbit",dtid,sid,dcpl)) < 0)
goto out;
- if(H5Dwrite(dsid,dtid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf)<0)
+ if(H5Dwrite(dsid,dtid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf) < 0)
goto out;
/* close */
- if(H5Tclose(dtid)<0)
+ if(H5Tclose(dtid) < 0)
return -1;
- if(H5Dclose(dsid)<0)
+ if(H5Dclose(dsid) < 0)
return -1;
#endif
@@ -2392,9 +2392,9 @@ if (szip_can_encode) {
* close space and dcpl
*-------------------------------------------------------------------------
*/
- if(H5Sclose(sid)<0)
+ if(H5Sclose(sid) < 0)
goto out;
- if(H5Pclose(dcpl)<0)
+ if(H5Pclose(dcpl) < 0)
goto out;
return 0;
@@ -2533,7 +2533,7 @@ int make_layout(hid_t loc_id)
for (i=0; i<4; i++)
{
sprintf(name,"dset%d",i+1);
- if (write_dset(loc_id,RANK,dims,name,H5T_NATIVE_INT,buf)<0)
+ if (write_dset(loc_id,RANK,dims,name,H5T_NATIVE_INT,buf) < 0)
return -1;
}
@@ -2543,46 +2543,46 @@ int make_layout(hid_t loc_id)
*-------------------------------------------------------------------------
*/
/* create a space */
- if((sid = H5Screate_simple(RANK, dims, NULL))<0)
+ if((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
return -1;
/* create a dataset creation property list; the same DCPL is used for all dsets */
- if ((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0)
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto out;
/*-------------------------------------------------------------------------
* H5D_COMPACT
*-------------------------------------------------------------------------
*/
- if(H5Pset_layout (dcpl,H5D_COMPACT)<0)
+ if(H5Pset_layout (dcpl,H5D_COMPACT) < 0)
goto out;
- if (make_dset(loc_id,"dset_compact",sid,dcpl,buf)<0)
+ if (make_dset(loc_id,"dset_compact",sid,dcpl,buf) < 0)
goto out;
/*-------------------------------------------------------------------------
* H5D_CONTIGUOUS
*-------------------------------------------------------------------------
*/
- if(H5Pset_layout (dcpl,H5D_CONTIGUOUS)<0)
+ if(H5Pset_layout (dcpl,H5D_CONTIGUOUS) < 0)
goto out;
- if (make_dset(loc_id,"dset_contiguous",sid,dcpl,buf)<0)
+ if (make_dset(loc_id,"dset_contiguous",sid,dcpl,buf) < 0)
goto out;
/*-------------------------------------------------------------------------
* H5D_CHUNKED
*-------------------------------------------------------------------------
*/
- if(H5Pset_chunk(dcpl, RANK, chunk_dims)<0)
+ if(H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
goto out;
- if (make_dset(loc_id,"dset_chunk",sid,dcpl,buf)<0)
+ if (make_dset(loc_id,"dset_chunk",sid,dcpl,buf) < 0)
goto out;
/*-------------------------------------------------------------------------
* close space and dcpl
*-------------------------------------------------------------------------
*/
- if(H5Sclose(sid)<0)
+ if(H5Sclose(sid) < 0)
goto out;
- if(H5Pclose(dcpl)<0)
+ if(H5Pclose(dcpl) < 0)
goto out;
return 0;
@@ -2615,23 +2615,23 @@ int make_fill(hid_t loc_id)
* H5T_INTEGER, write a fill value
*-------------------------------------------------------------------------
*/
- if ((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0)
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto out;
- if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillvalue)<0)
+ if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillvalue) < 0)
goto out;
- if ((sid = H5Screate_simple(2,dims,NULL))<0)
+ if ((sid = H5Screate_simple(2,dims,NULL)) < 0)
goto out;
- if ((did = H5Dcreate(loc_id,"dset_fill",H5T_NATIVE_INT,sid,dcpl))<0)
+ if ((did = H5Dcreate(loc_id,"dset_fill",H5T_NATIVE_INT,sid,dcpl)) < 0)
goto out;
- if (H5Dwrite(did,H5T_NATIVE_INT,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf)<0)
+ if (H5Dwrite(did,H5T_NATIVE_INT,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf) < 0)
goto out;
/* close */
- if(H5Sclose(sid)<0)
+ if(H5Sclose(sid) < 0)
goto out;
- if(H5Pclose(dcpl)<0)
+ if(H5Pclose(dcpl) < 0)
goto out;
- if(H5Dclose(did)<0)
+ if(H5Dclose(did) < 0)
goto out;
return 0;
@@ -2676,19 +2676,19 @@ int make_big(hid_t loc_id)
hs_size[0] = 1024;
/* create */
- if ((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0)
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto out;
- if (H5Pset_fill_value(dcpl, H5T_NATIVE_SCHAR, &fillvalue)<0)
+ if (H5Pset_fill_value(dcpl, H5T_NATIVE_SCHAR, &fillvalue) < 0)
goto out;
- if(H5Pset_chunk(dcpl, 1, chunk_dims)<0)
+ if(H5Pset_chunk(dcpl, 1, chunk_dims) < 0)
goto out;
- if ((f_sid = H5Screate_simple(1,dims,NULL))<0)
+ if ((f_sid = H5Screate_simple(1,dims,NULL)) < 0)
goto out;
- if ((did = H5Dcreate(loc_id,"dset",H5T_NATIVE_SCHAR,f_sid,dcpl))<0)
+ if ((did = H5Dcreate(loc_id,"dset",H5T_NATIVE_SCHAR,f_sid,dcpl)) < 0)
goto out;
- if ((m_sid = H5Screate_simple(1, hs_size, hs_size))<0)
+ if ((m_sid = H5Screate_simple(1, hs_size, hs_size)) < 0)
goto out;
- if ((tid = H5Dget_type(did))<0)
+ if ((tid = H5Dget_type(did)) < 0)
goto out;
if ((size = H5Tget_size(tid))<=0)
goto out;
@@ -2696,22 +2696,22 @@ int make_big(hid_t loc_id)
/* initialize buffer to 0 */
buf=(signed char *) calloc( nelmts, size);
- if (H5Sselect_hyperslab (f_sid,H5S_SELECT_SET,hs_start,NULL,hs_size, NULL)<0)
+ if (H5Sselect_hyperslab (f_sid,H5S_SELECT_SET,hs_start,NULL,hs_size, NULL) < 0)
goto out;
- if (H5Dwrite (did,H5T_NATIVE_SCHAR,m_sid,f_sid,H5P_DEFAULT,buf)<0)
+ if (H5Dwrite (did,H5T_NATIVE_SCHAR,m_sid,f_sid,H5P_DEFAULT,buf) < 0)
goto out;
free(buf);
buf=NULL;
/* close */
- if(H5Sclose(f_sid)<0)
+ if(H5Sclose(f_sid) < 0)
goto out;
- if(H5Sclose(m_sid)<0)
+ if(H5Sclose(m_sid) < 0)
goto out;
- if(H5Pclose(dcpl)<0)
+ if(H5Pclose(dcpl) < 0)
goto out;
- if(H5Dclose(did)<0)
+ if(H5Dclose(did) < 0)
goto out;
return 0;
@@ -2750,23 +2750,23 @@ int make_external(hid_t loc_id)
size = max_size[0] * sizeof(int);
/* create */
- if ((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0)
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto out;
- if (H5Pset_external(dcpl, H5REPACK_EXTFILE, (off_t)0, size)<0)
+ if (H5Pset_external(dcpl, H5REPACK_EXTFILE, (off_t)0, size) < 0)
goto out;
- if ((sid = H5Screate_simple(1,cur_size, max_size))<0)
+ if ((sid = H5Screate_simple(1,cur_size, max_size)) < 0)
goto out;
- if ((did = H5Dcreate(loc_id,"external",H5T_NATIVE_INT,sid,dcpl))<0)
+ if ((did = H5Dcreate(loc_id,"external",H5T_NATIVE_INT,sid,dcpl)) < 0)
goto out;
- if (H5Dwrite(did,H5T_NATIVE_INT,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf)<0)
+ if (H5Dwrite(did,H5T_NATIVE_INT,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf) < 0)
goto out;
/* close */
- if(H5Sclose(sid)<0)
+ if(H5Sclose(sid) < 0)
goto out;
- if(H5Pclose(dcpl)<0)
+ if(H5Pclose(dcpl) < 0)
goto out;
- if(H5Dclose(did)<0)
+ if(H5Dclose(did) < 0)
goto out;
return 0;
@@ -3827,15 +3827,15 @@ void write_attr_in(hid_t loc_id,
buf5[0].p = malloc( 1 * sizeof(int));
((int *)buf5[0].p)[0]=1;
buf5[1].len = 2;
- buf5[1].p = malloc( 2 * sizeof(int));
- ((int *)buf5[1].p)[0]=2;
- ((int *)buf5[1].p)[1]=3;
+ buf5[1].p = malloc(2 * sizeof(int));
+ ((int *)buf5[1].p)[0] = 2;
+ ((int *)buf5[1].p)[1] = 3;
- if (make_diffs)
+ if(make_diffs)
{
- ((int *)buf5[0].p)[0]=0;
- ((int *)buf5[1].p)[0]=0;
- ((int *)buf5[1].p)[1]=0;
+ ((int *)buf5[0].p)[0] = 0;
+ ((int *)buf5[1].p)[0] = 0;
+ ((int *)buf5[1].p)[1] = 0;
}
/*
$h5diff file7.h5 file6.h5 g1 g1 -v
@@ -3847,13 +3847,13 @@ void write_attr_in(hid_t loc_id,
[ 1 ] 3 0 3
*/
- space_id = H5Screate_simple(1,dims,NULL);
+ space_id = H5Screate_simple(1, dims, NULL);
type_id = H5Tvlen_create(H5T_NATIVE_INT);
- attr_id = H5Acreate(loc_id,"vlen",type_id,space_id,H5P_DEFAULT);
- status = H5Awrite(attr_id,type_id,buf5);
- assert(status>=0);
- status = H5Dvlen_reclaim(type_id,space_id,H5P_DEFAULT,buf5);
- assert(status>=0);
+ attr_id = H5Acreate2(loc_id, ".", "vlen", type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Awrite(attr_id, type_id, buf5);
+ assert(status >= 0);
+ status = H5Dvlen_reclaim(type_id, space_id, H5P_DEFAULT, buf5);
+ assert(status >= 0);
status = H5Aclose(attr_id);
status = H5Tclose(type_id);
status = H5Sclose(space_id);
@@ -4118,13 +4118,13 @@ position enum2D of </g1> enum2D of </g1> difference
[ 2 1 ] 11 0 11
*/
- space_id = H5Screate_simple(2,dims2,NULL);
+ space_id = H5Screate_simple(2, dims2, NULL);
type_id = H5Tvlen_create(H5T_NATIVE_INT);
- attr_id = H5Acreate(loc_id,"vlen2D",type_id,space_id,H5P_DEFAULT);
- status = H5Awrite(attr_id,type_id,buf52);
- assert(status>=0);
- status = H5Dvlen_reclaim(type_id,space_id,H5P_DEFAULT,buf52);
- assert(status>=0);
+ attr_id = H5Acreate2(loc_id, ".", "vlen2D", type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Awrite(attr_id, type_id, buf52);
+ assert(status >= 0);
+ status = H5Dvlen_reclaim(type_id, space_id, H5P_DEFAULT, buf52);
+ assert(status >= 0);
status = H5Aclose(attr_id);
status = H5Tclose(type_id);
status = H5Sclose(space_id);
@@ -4517,13 +4517,13 @@ position vlen3D of </g1> vlen3D of </g1> difference
[ 1 1 0 ] 10 0 10
etc
*/
- space_id = H5Screate_simple(3,dims3,NULL);
+ space_id = H5Screate_simple(3, dims3, NULL);
type_id = H5Tvlen_create(H5T_NATIVE_INT);
- attr_id = H5Acreate(loc_id,"vlen3D",type_id,space_id,H5P_DEFAULT);
- status = H5Awrite(attr_id,type_id,buf53);
- assert(status>=0);
- status = H5Dvlen_reclaim(type_id,space_id,H5P_DEFAULT,buf53);
- assert(status>=0);
+ attr_id = H5Acreate2(loc_id, ".", "vlen3D", type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Awrite(attr_id, type_id, buf53);
+ assert(status >= 0);
+ status = H5Dvlen_reclaim(type_id, space_id, H5P_DEFAULT, buf53);
+ assert(status >= 0);
status = H5Aclose(attr_id);
status = H5Tclose(type_id);
status = H5Sclose(space_id);
@@ -4617,15 +4617,15 @@ int make_dset(hid_t loc_id,
hid_t dsid;
/* create the dataset */
- if((dsid = H5Dcreate (loc_id,name,H5T_NATIVE_INT,sid,dcpl))<0)
+ if((dsid = H5Dcreate (loc_id,name,H5T_NATIVE_INT,sid,dcpl)) < 0)
return -1;
/* write */
- if(H5Dwrite(dsid,H5T_NATIVE_INT,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf)<0)
+ if(H5Dwrite(dsid,H5T_NATIVE_INT,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf) < 0)
goto out;
/* close */
- if(H5Dclose(dsid)<0)
+ if(H5Dclose(dsid) < 0)
return -1;
return 0;
@@ -4660,22 +4660,22 @@ int write_dset( hid_t loc_id,
hid_t space_id;
/* Create a buf space */
- if ((space_id = H5Screate_simple(rank,dims,NULL))<0)
+ if ((space_id = H5Screate_simple(rank,dims,NULL)) < 0)
return -1;
/* Create a dataset */
- if ((dset_id = H5Dcreate(loc_id,dset_name,type_id,space_id,H5P_DEFAULT))<0)
+ if ((dset_id = H5Dcreate(loc_id,dset_name,type_id,space_id,H5P_DEFAULT)) < 0)
return -1;
/* Write the buf */
if ( buf )
- if (H5Dwrite(dset_id,type_id,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf)<0)
+ if (H5Dwrite(dset_id,type_id,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf) < 0)
return -1;
/* Close */
- if (H5Dclose(dset_id)<0)
+ if (H5Dclose(dset_id) < 0)
return -1;
- if (H5Sclose(space_id)<0)
+ if (H5Sclose(space_id) < 0)
return -1;
return 0;
@@ -4706,19 +4706,17 @@ int make_attr(hid_t loc_id,
hid_t space_id;
/* create a space */
- if ((space_id = H5Screate_simple(rank,dims,NULL))<0)
+ if((space_id = H5Screate_simple(rank, dims, NULL)) < 0)
return -1;
/* create the attribute */
- if ((attr_id = H5Acreate(loc_id,attr_name,type_id,space_id,H5P_DEFAULT))<0)
+ if((attr_id = H5Acreate2(loc_id, ".", attr_name, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* write the buffer */
- if ( buf )
- {
- if (H5Awrite(attr_id,type_id,buf)<0)
- goto out;
- }
+ if(buf)
+ if(H5Awrite(attr_id, type_id, buf) < 0)
+ goto out;
/* close */
H5Aclose(attr_id);
diff --git a/tools/h5stat/h5stat_gentest.c b/tools/h5stat/h5stat_gentest.c
index 6d82e43..9c8b22f 100644
--- a/tools/h5stat/h5stat_gentest.c
+++ b/tools/h5stat/h5stat_gentest.c
@@ -66,7 +66,7 @@ static void gen_file(void)
dset_id = H5Dcreate(file, DATASET_NAME, type_id, space_id, H5P_DEFAULT);
for(i = 1; i <= NUM_ATTRS; i++) {
sprintf(attrname, "%s%d", ATTR_NAME,i);
- attr_id = H5Acreate(dset_id, attrname, type_id, space_id, H5P_DEFAULT);
+ attr_id = H5Acreate2(dset_id, ".", attrname, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
ret = H5Aclose(attr_id);
}