diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-09-26 02:50:31 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-09-26 02:50:31 (GMT) |
commit | 3706d53f155e3ac86bc8547c9287bcd857c4eca8 (patch) | |
tree | 346b21f5faf06429015d0587bcbff063ab669d1c /test | |
parent | 8f84b136fc7a9eff4354416307ae3acc8f73d038 (diff) | |
download | hdf5-3706d53f155e3ac86bc8547c9287bcd857c4eca8.zip hdf5-3706d53f155e3ac86bc8547c9287bcd857c4eca8.tar.gz hdf5-3706d53f155e3ac86bc8547c9287bcd857c4eca8.tar.bz2 |
[svn-r14156] Description:
Add API versioning to H5Tcommit()
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 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
AIX/32 5.3 (copper) w/FORTRAN, w/parallel, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Diffstat (limited to 'test')
-rw-r--r-- | test/dangle.c | 78 | ||||
-rw-r--r-- | test/dt_arith.c | 40 | ||||
-rw-r--r-- | test/dtypes.c | 182 | ||||
-rw-r--r-- | test/enum.c | 6 | ||||
-rw-r--r-- | test/getname.c | 39 | ||||
-rw-r--r-- | test/links.c | 8 | ||||
-rw-r--r-- | test/mount.c | 2 | ||||
-rw-r--r-- | test/ntypes.c | 12 | ||||
-rwxr-xr-x | test/objcopy.c | 24 | ||||
-rw-r--r-- | test/tattr.c | 22 | ||||
-rw-r--r-- | test/tfile.c | 20 | ||||
-rw-r--r-- | test/th5o.c | 16 | ||||
-rw-r--r-- | test/titerate.c | 12 | ||||
-rw-r--r-- | test/tmisc.c | 92 | ||||
-rw-r--r-- | test/trefer.c | 8 | ||||
-rw-r--r-- | test/tsohm.c | 4 | ||||
-rw-r--r-- | test/ttime.c | 16 | ||||
-rw-r--r-- | test/tunicode.c | 4 | ||||
-rw-r--r-- | test/tvlstr.c | 4 | ||||
-rw-r--r-- | test/unlink.c | 8 |
20 files changed, 297 insertions, 300 deletions
diff --git a/test/dangle.c b/test/dangle.c index 2f6ad7b..7b657ac 100644 --- a/test/dangle.c +++ b/test/dangle.c @@ -243,70 +243,70 @@ static int test_dangle_datatype1(H5F_close_degree_t degree) { char filename[1024]; - hid_t fid; /* File ID */ - hid_t fapl; /* File access property list */ - hid_t tid; /* Datatype ID */ - unsigned u; /* Local index variable */ + hid_t fid; /* File ID */ + hid_t fapl; /* File access property list */ + hid_t tid; /* Datatype ID */ + unsigned u; /* Local index variable */ TESTING(" dangling named datatype IDs"); - if(H5open()<0) + if(H5open() < 0) TEST_ERROR; /* Create file access property list */ - if((fapl=H5Pcreate(H5P_FILE_ACCESS))<0) + if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR; /* Set file close degree */ - if(H5Pset_fclose_degree(fapl,degree)<0) + if(H5Pset_fclose_degree(fapl, degree) < 0) TEST_ERROR; h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof filename); - if((fid = H5Fcreate (filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) + if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR; - if((tid = H5Tcopy (H5T_NATIVE_INT))<0) + if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR; - if(H5Tcommit(fid,TYPENAME,tid)<0) + if(H5Tcommit2(fid, TYPENAME, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR; - if(H5Tclose(tid)<0) + if(H5Tclose(tid) < 0) TEST_ERROR; /* Try creating duplicate named datatype */ if((tid = H5Tcopy (H5T_NATIVE_INT))<0) TEST_ERROR; H5E_BEGIN_TRY { - if(H5Tcommit(fid,TYPENAME,tid)>=0) + if(H5Tcommit2(fid, TYPENAME, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) >= 0) TEST_ERROR; } H5E_END_TRY; - if(H5Tclose(tid)<0) + if(H5Tclose(tid) < 0) TEST_ERROR; /* Leave open a _lot_ of objects */ - for(u=0; u<MAX_DANGLE; u++) { - if((tid = H5Topen (fid, TYPENAME))<0) + for(u = 0; u < MAX_DANGLE; u++) { + if((tid = H5Topen(fid, TYPENAME)) < 0) TEST_ERROR; } /* end for */ - if(degree==H5F_CLOSE_SEMI) { + if(degree == H5F_CLOSE_SEMI) { H5E_BEGIN_TRY { - if(H5Fclose(fid)>=0) + if(H5Fclose(fid) >= 0) TEST_ERROR; } H5E_END_TRY; } /* end if */ else - if(H5Fclose(fid)<0) + if(H5Fclose(fid) < 0) TEST_ERROR; - if(H5Pclose(fapl)<0) + if(H5Pclose(fapl) < 0) TEST_ERROR; - if(H5close()<0) + if(H5close() < 0) TEST_ERROR; - if(h5_get_file_size(filename)<0) + if(h5_get_file_size(filename) < 0) TEST_ERROR; /* Clean up temporary file */ @@ -340,33 +340,33 @@ static int test_dangle_datatype2(H5F_close_degree_t degree) { char filename[1024]; - hid_t fid; /* File ID */ - hid_t fapl; /* File access property list */ - hid_t did; /* Dataset ID */ - hid_t sid; /* Dataspace ID */ - hid_t tid; /* Datatype ID */ + hid_t fid; /* File ID */ + hid_t fapl; /* File access property list */ + hid_t did; /* Dataset ID */ + hid_t sid; /* Dataspace ID */ + hid_t tid; /* Datatype ID */ TESTING(" dangling named datatype ID used by dataset"); - if(H5open()<0) + if(H5open() < 0) TEST_ERROR; /* Create file access property list */ - if((fapl=H5Pcreate(H5P_FILE_ACCESS))<0) + if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR; /* Set file close degree */ - if(H5Pset_fclose_degree(fapl,degree)<0) + if(H5Pset_fclose_degree(fapl, degree) < 0) TEST_ERROR; h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof filename); - if((fid = H5Fcreate (filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) + if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR; - if((tid = H5Tcopy (H5T_NATIVE_INT))<0) + if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR; - if(H5Tcommit(fid,TYPENAME,tid)<0) + if(H5Tcommit2(fid, TYPENAME, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR; /* Create a dataset that uses the named datatype & leave it open */ @@ -374,26 +374,26 @@ test_dangle_datatype2(H5F_close_degree_t degree) TEST_ERROR; if((did = H5Dcreate(fid, DSETNAME, tid, sid, H5P_DEFAULT)) < 0) TEST_ERROR; - if(H5Sclose(sid)<0) + if(H5Sclose(sid) < 0) TEST_ERROR; - if(degree==H5F_CLOSE_SEMI) { + if(degree == H5F_CLOSE_SEMI) { H5E_BEGIN_TRY { - if(H5Fclose(fid)>=0) + if(H5Fclose(fid) >= 0) TEST_ERROR; } H5E_END_TRY; } /* end if */ else - if(H5Fclose(fid)<0) + if(H5Fclose(fid) < 0) TEST_ERROR; - if(H5Pclose(fapl)<0) + if(H5Pclose(fapl) < 0) TEST_ERROR; - if(H5close()<0) + if(H5close() < 0) TEST_ERROR; - if(h5_get_file_size(filename)<0) + if(h5_get_file_size(filename) < 0) TEST_ERROR; /* Clean up temporary file */ diff --git a/test/dt_arith.c b/test/dt_arith.c index 52fd5bf..e27176d 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -979,29 +979,29 @@ test_derived_flt(void) goto error; } - if(H5Tset_ebias(tid1, 511)<0) { + if(H5Tset_ebias(tid1, 511) < 0) { H5_FAILED(); printf("Can't set exponent bias\n"); goto error; } - if(H5Tset_pad(tid1, H5T_PAD_ZERO, H5T_PAD_ZERO)<0) { + if(H5Tset_pad(tid1, H5T_PAD_ZERO, H5T_PAD_ZERO) < 0) { H5_FAILED(); printf("Can't set padding\n"); goto error; } - if(H5Tcommit(file, "new float type 1", tid1)<0) { + if(H5Tcommit2(file, "new float type 1", tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) { H5_FAILED(); printf("Can't set inpad\n"); goto error; } - if(H5Tclose(tid1)<0) { + if(H5Tclose(tid1) < 0) { H5_FAILED(); printf("Can't close datatype\n"); goto error; } - if((tid1 = H5Topen(file, "new float type 1"))<0) { + if((tid1 = H5Topen(file, "new float type 1")) < 0) { H5_FAILED(); printf("Can't open datatype\n"); goto error; @@ -1141,29 +1141,29 @@ test_derived_flt(void) printf("Can't set size\n"); goto error; } - if(H5Tset_ebias(tid2, 63)<0) { + if(H5Tset_ebias(tid2, 63) < 0) { H5_FAILED(); printf("Can't set size\n"); goto error; } - if(H5Tset_pad(tid2, H5T_PAD_ZERO, H5T_PAD_ZERO)<0) { + if(H5Tset_pad(tid2, H5T_PAD_ZERO, H5T_PAD_ZERO) < 0) { H5_FAILED(); printf("Can't set padding\n"); goto error; } - if(H5Tcommit(file, "new float type 2", tid2)<0) { + if(H5Tcommit2(file, "new float type 2", tid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) { H5_FAILED(); printf("Can't set inpad\n"); goto error; } - if(H5Tclose(tid2)<0) { + if(H5Tclose(tid2) < 0) { H5_FAILED(); printf("Can't close datatype\n"); goto error; } - if((tid2 = H5Topen(file, "new float type 2"))<0) { + if((tid2 = H5Topen(file, "new float type 2")) < 0) { H5_FAILED(); printf("Can't open datatype\n"); goto error; @@ -1403,31 +1403,31 @@ test_derived_integer(void) goto error; } - if(H5Tset_precision(tid1,24)<0) { + if(H5Tset_precision(tid1, 24) < 0) { H5_FAILED(); printf("Can't set precision\n"); goto error; } - if(H5Tset_order(tid1, H5T_ORDER_BE)<0) { + if(H5Tset_order(tid1, H5T_ORDER_BE) < 0) { H5_FAILED(); printf("Can't set order\n"); goto error; } - if(H5Tcommit(file, "new integer type 1", tid1)<0) { + if(H5Tcommit2(file, "new integer type 1", tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) { H5_FAILED(); printf("Can't commit data type\n"); goto error; } - if(H5Tclose(tid1)<0) { + if(H5Tclose(tid1) < 0) { H5_FAILED(); printf("Can't close datatype\n"); goto error; } - if((tid1 = H5Topen(file, "new integer type 1"))<0) { + if((tid1 = H5Topen(file, "new integer type 1")) < 0) { H5_FAILED(); printf("Can't open datatype\n"); goto error; @@ -1468,31 +1468,31 @@ test_derived_integer(void) goto error; } - if(H5Tset_offset(tid2,10)<0) { + if(H5Tset_offset(tid2, 10) < 0) { H5_FAILED(); printf("Can't set offset\n"); goto error; } - if(H5Tset_sign(tid2,H5T_SGN_2)<0) { + if(H5Tset_sign(tid2, H5T_SGN_2) < 0) { H5_FAILED(); printf("Can't set offset\n"); goto error; } - if(H5Tcommit(file, "new integer type 2", tid2)<0) { + if(H5Tcommit2(file, "new integer type 2", tid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) { H5_FAILED(); printf("Can't commit data type\n"); goto error; } - if(H5Tclose(tid2)<0) { + if(H5Tclose(tid2) < 0) { H5_FAILED(); printf("Can't close datatype\n"); goto error; } - if((tid2 = H5Topen(file, "new integer type 2"))<0) { + if((tid2 = H5Topen(file, "new integer type 2")) < 0) { H5_FAILED(); printf("Can't open datatype\n"); goto error; diff --git a/test/dtypes.c b/test/dtypes.c index 2783f2d..f12be8c 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -1560,31 +1560,31 @@ test_compound_9(void) goto error; } /* end if */ - if(H5Tinsert(cmpd_tid,"vl_string",HOFFSET(cmpd_struct,str),str_id)<0) { + if(H5Tinsert(cmpd_tid, "vl_string", HOFFSET(cmpd_struct, str), str_id) < 0) { H5_FAILED(); AT(); printf("Can't insert field 'i1'\n"); goto error; } /* end if */ - if(H5Tinsert(cmpd_tid,"i2",HOFFSET(struct cmpd_struct,i2),H5T_NATIVE_INT)<0) { + if(H5Tinsert(cmpd_tid, "i2", HOFFSET(struct cmpd_struct, i2), H5T_NATIVE_INT) < 0) { H5_FAILED(); AT(); printf("Can't insert field 'i2'\n"); goto error; } /* end if */ - if(H5Tcommit(file,"compound",cmpd_tid)<0) { + if(H5Tcommit2(file, "compound", cmpd_tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) { H5_FAILED(); AT(); printf("Can't commit datatype\n"); goto error; } /* end if */ - if(H5Tclose(cmpd_tid)<0) { + if(H5Tclose(cmpd_tid) < 0) { H5_FAILED(); AT(); printf("Can't close datatype\n"); goto error; } /* end if */ - if((cmpd_tid = H5Topen(file, "compound"))<0) { + if((cmpd_tid = H5Topen(file, "compound")) < 0) { H5_FAILED(); AT(); printf("Can't open datatype\n"); goto error; @@ -2301,60 +2301,60 @@ test_query(void) } /* end if */ /* Query member number and member index by member name, for enumeration type. */ - if(H5Tget_nmembers(tid2)!=5) { + if(H5Tget_nmembers(tid2) != 5) { H5_FAILED(); printf("Can't get member number\n"); goto error; } /* end if */ - if(H5Tget_member_index(tid2, "ORANGE")!=3) { + if(H5Tget_member_index(tid2, "ORANGE") != 3) { H5_FAILED(); printf("Can't get correct index number\n"); goto error; } /* end if */ /* Commit compound datatype and close it */ - if(H5Tcommit(file, compnd_type, tid1)<0) { + if(H5Tcommit2(file, compnd_type, tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) { H5_FAILED(); printf("Can't commit compound datatype\n"); goto error; } /* end if */ - if(H5Tclose(tid1)<0) { + if(H5Tclose(tid1) < 0) { H5_FAILED(); printf("Can't close datatype\n"); goto error; } /* end if */ /* Commit enumeration datatype and close it */ - if(H5Tcommit(file, enum_type, tid2)<0) { + if(H5Tcommit2(file, enum_type, tid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) { H5_FAILED(); printf("Can't commit compound datatype\n"); goto error; } /* end if */ - if(H5Tclose(tid2)<0) { + if(H5Tclose(tid2) < 0) { H5_FAILED(); printf("Can't close datatype\n"); goto error; } /* end if */ /* Open the dataytpe for query */ - if((tid1=H5Topen(file, compnd_type))<0) { + if((tid1 = H5Topen(file, compnd_type)) < 0) { H5_FAILED(); printf("Can't open datatype\n"); goto error; } /* end if */ - if((tid2=H5Topen(file, enum_type))<0) { + if((tid2 = H5Topen(file, enum_type)) < 0) { H5_FAILED(); printf("Can't open datatype\n"); goto error; } /* end if */ /* Query member number and member index by name, for compound type */ - if(H5Tget_nmembers(tid1)!=4) { + if(H5Tget_nmembers(tid1) != 4) { H5_FAILED(); printf("Can't get member number\n"); goto error; } /* end if */ - if(H5Tget_member_index(tid1, "c")!=2) { + if(H5Tget_member_index(tid1, "c") != 2) { H5_FAILED(); printf("Can't get correct index number\n"); goto error; @@ -2603,20 +2603,19 @@ test_named (hid_t fapl) /* Predefined types cannot be committed */ H5E_BEGIN_TRY { - status = H5Tcommit (file, "test_named_1 (should not exist)", - H5T_NATIVE_INT); + status = H5Tcommit2(file, "test_named_1 (should not exist)", H5T_NATIVE_INT, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); } H5E_END_TRY; - if (status>=0) { + if(status >= 0) { H5_FAILED(); HDputs (" Predefined types should not be committable!"); goto error; } /* Copy a predefined data type and commit the copy */ - if ((type = H5Tcopy (H5T_NATIVE_INT))<0) goto error; - if (H5Tcommit (file, "native-int", type)<0) goto error; - if ((status=H5Tcommitted (type))<0) goto error; - if (0==status) { + if((type = H5Tcopy(H5T_NATIVE_INT)) < 0) goto error; + if(H5Tcommit2(file, "native-int", type, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) goto error; + if((status = H5Tcommitted(type)) < 0) goto error; + if(0 == status) { H5_FAILED(); HDputs (" H5Tcommitted() returned false!"); goto error; @@ -2634,72 +2633,71 @@ test_named (hid_t fapl) /* We should not be able to re-commit a committed type */ H5E_BEGIN_TRY { - status = H5Tcommit(file, "test_named_2 (should not exist)", type); + status = H5Tcommit2(file, "test_named_2 (should not exist)", type, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); } H5E_END_TRY; - if (status>=0) { + if(status >= 0) { H5_FAILED(); HDputs (" Committed types should not be recommitted!"); goto error; } /* It should be possible to define an attribute for the named type */ - if ((attr1=H5Acreate (type, "attr1", H5T_NATIVE_UCHAR, space, - H5P_DEFAULT))<0) goto error; - for (i=0; i<(size_t)ds_size[0]; i++) - for (j=0; j<(size_t)ds_size[1]; j++) - attr_data[i][j] = (int)(i*ds_size[1]+j); - if (H5Awrite(attr1, H5T_NATIVE_UINT, attr_data)<0) goto error; - if (H5Aclose (attr1)<0) goto error; + if((attr1 = H5Acreate (type, "attr1", H5T_NATIVE_UCHAR, space, + H5P_DEFAULT)) < 0) goto error; + for(i = 0; i < (size_t)ds_size[0]; i++) + for(j = 0; j < (size_t)ds_size[1]; j++) + attr_data[i][j] = (int)(i * ds_size[1] + j); + if(H5Awrite(attr1, H5T_NATIVE_UINT, attr_data) < 0) goto error; + if(H5Aclose(attr1) < 0) goto error; /* * Copying a committed type should result in a transient type which is * not locked. */ - if ((t2 = H5Tcopy (type))<0) goto error; - if ((status=H5Tcommitted (t2))<0) goto error; - if (status) { + if((t2 = H5Tcopy(type)) < 0) goto error; + if((status = H5Tcommitted(t2)) < 0) goto error; + if(status) { H5_FAILED(); HDputs (" Copying a named type should result in a transient type!"); goto error; } - if (H5Tset_precision (t2, 256)<0) goto error; - if (H5Tclose (t2)<0) goto error; + if(H5Tset_precision(t2, 256) < 0) goto error; + if(H5Tclose(t2) < 0) goto error; /* * Close the committed type and reopen it. It should return a named type. */ - if (H5Tclose (type)<0) goto error; - if ((type=H5Topen (file, "native-int"))<0) goto error; - if ((status=H5Tcommitted (type))<0) goto error; - if (!status) { + if(H5Tclose(type) < 0) goto error; + if((type = H5Topen(file, "native-int")) < 0) goto error; + if((status = H5Tcommitted(type)) < 0) goto error; + if(!status) { H5_FAILED(); HDputs (" Opened named types should be named types!"); goto error; } /* Create a dataset that uses the named type */ - if ((dset = H5Dcreate (file, "dset1", type, space, H5P_DEFAULT))<0) { + if((dset = H5Dcreate(file, "dset1", type, space, H5P_DEFAULT)) < 0) goto error; - } /* Get the dataset's data type and make sure it's a named type */ - if ((t2 = H5Dget_type (dset))<0) goto error; - if ((status=H5Tcommitted (t2))<0) goto error; - if (!status) { + if((t2 = H5Dget_type(dset)) < 0) goto error; + if((status = H5Tcommitted(t2)) < 0) goto error; + if(!status) { H5_FAILED(); HDputs (" Dataset type should be a named type!"); goto error; } /* Close the dataset, then close its type, then reopen the dataset */ - if (H5Dclose (dset)<0) goto error; - if (H5Tclose (t2)<0) goto error; - if ((dset = H5Dopen (file, "dset1"))<0) goto error; + if(H5Dclose(dset) < 0) goto error; + if(H5Tclose(t2) < 0) goto error; + if((dset = H5Dopen(file, "dset1")) < 0) goto error; /* Get the dataset's type and make sure it's named */ - if ((t2 = H5Dget_type (dset))<0) goto error; - if ((status=H5Tcommitted (t2))<0) goto error; - if (!status) { + if((t2 = H5Dget_type(dset)) < 0) goto error; + if((status = H5Tcommitted(t2)) < 0) goto error; + if(!status) { H5_FAILED(); HDputs (" Dataset type should be a named type!"); goto error; @@ -2709,67 +2707,67 @@ test_named (hid_t fapl) * Close the dataset and create another with the type returned from the * first dataset. */ - if (H5Dclose (dset)<0) goto error; - if ((dset=H5Dcreate (file, "dset2", t2, space, H5P_DEFAULT))<0) goto error; + if(H5Dclose(dset) < 0) goto error; + if((dset = H5Dcreate(file, "dset2", t2, space, H5P_DEFAULT)) < 0) goto error; /* Reopen the second dataset and make sure the type is shared */ - if (H5Tclose (t2)<0) goto error; - if (H5Dclose (dset)<0) goto error; - if ((dset = H5Dopen (file, "dset2"))<0) goto error; - if ((t2 = H5Dget_type (dset))<0) goto error; - if ((status=H5Tcommitted (t2))<0) goto error; - if (!status) { + if(H5Tclose(t2) < 0) goto error; + if(H5Dclose(dset) < 0) goto error; + if((dset = H5Dopen(file, "dset2")) < 0) goto error; + if((t2 = H5Dget_type(dset)) < 0) goto error; + if((status = H5Tcommitted(t2)) < 0) goto error; + if(!status) { H5_FAILED(); HDputs (" Dataset type should be a named type!"); goto error; } - if (H5Tclose (t2)<0) goto error; + if(H5Tclose(t2) < 0) goto error; /* * Get the dataset data type by applying H5Tcopy() to the dataset. The * result should be modifiable. */ - if ((t2=H5Tcopy (dset))<0) goto error; - if (H5Tset_precision (t2, 256)<0) goto error; - if (H5Tclose (t2)<0) goto error; - if (H5Dclose (dset)<0) goto error; + if((t2 = H5Tcopy(dset)) < 0) goto error; + if(H5Tset_precision(t2, 256) < 0) goto error; + if(H5Tclose(t2) < 0) goto error; + if(H5Dclose(dset) < 0) goto error; /* * Copy of committed type used as dataset type should not be name type */ - if ((t2 = H5Tcopy (type))<0) goto error; - if ((status=H5Tcommitted (t2))<0) goto error; - if (status) { + if((t2 = H5Tcopy(type)) < 0) goto error; + if((status = H5Tcommitted(t2)) < 0) goto error; + if(status) { H5_FAILED(); HDputs (" Copied type should not be a named type!"); goto error; } - if ((dset=H5Dcreate (file, "dset3", t2, space, H5P_DEFAULT))<0) goto error; - if ((t3 = H5Dget_type (dset))<0) goto error; - if ((status=H5Tcommitted (t3))<0) goto error; - if (status) { + if((dset = H5Dcreate(file, "dset3", t2, space, H5P_DEFAULT)) < 0) goto error; + if((t3 = H5Dget_type(dset)) < 0) goto error; + if((status = H5Tcommitted(t3)) < 0) goto error; + if(status) { H5_FAILED(); HDputs (" Datatype from dataset using copied type should not be a named type!"); goto error; } - if (H5Tclose (t3)<0) goto error; - if (H5Dclose (dset)<0) goto error; + if(H5Tclose(t3) < 0) goto error; + if(H5Dclose(dset) < 0) goto error; /* Clean up */ - if (H5Tclose (type)<0) goto error; - if (H5Sclose (space)<0) goto error; - if (H5Fclose (file)<0) goto error; + if(H5Tclose(type) < 0) goto error; + if(H5Sclose(space) < 0) goto error; + if(H5Fclose(file) < 0) goto error; PASSED(); return 0; - error: +error: H5E_BEGIN_TRY { - H5Tclose (t3); - H5Tclose (t2); - H5Tclose (type); - H5Sclose (space); - H5Dclose (dset); - H5Fclose (file); + H5Tclose(t3); + H5Tclose(t2); + H5Tclose(type); + H5Sclose(space); + H5Dclose(dset); + H5Fclose(file); } H5E_END_TRY; return 1; } @@ -4139,7 +4137,7 @@ test_encode(void) printf("Can't get member number\n"); goto error; } /* end if */ - if(H5Tget_member_index(decoded_tid2, "ORANGE")!=3) { + if(H5Tget_member_index(decoded_tid2, "ORANGE") != 3) { H5_FAILED(); printf("Can't get correct index number\n"); goto error; @@ -4150,17 +4148,17 @@ test_encode(void) *----------------------------------------------------------------------- */ /* Commit compound datatype and close it */ - if(H5Tcommit(file, compnd_type, tid1)<0) { + if(H5Tcommit2(file, compnd_type, tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) { H5_FAILED(); printf("Can't commit compound datatype\n"); goto error; } /* end if */ - if(H5Tclose(tid1)<0) { + if(H5Tclose(tid1) < 0) { H5_FAILED(); printf("Can't close datatype\n"); goto error; } /* end if */ - if(H5Tclose(decoded_tid1)<0) { + if(H5Tclose(decoded_tid1) < 0) { H5_FAILED(); printf("Can't close datatype\n"); goto error; @@ -4169,17 +4167,17 @@ test_encode(void) cmpd_buf_size = 0; /* Commit enumeration datatype and close it */ - if(H5Tcommit(file, enum_type, tid2)<0) { + if(H5Tcommit2(file, enum_type, tid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) { H5_FAILED(); printf("Can't commit compound datatype\n"); goto error; } /* end if */ - if(H5Tclose(tid2)<0) { + if(H5Tclose(tid2) < 0) { H5_FAILED(); printf("Can't close datatype\n"); goto error; } /* end if */ - if(H5Tclose(decoded_tid2)<0) { + if(H5Tclose(decoded_tid2) < 0) { H5_FAILED(); printf("Can't close datatype\n"); goto error; @@ -4392,7 +4390,7 @@ test_latest(void) FAIL_STACK_ERROR /* Commit compound datatype */ - if(H5Tcommit(file, compnd_type, tid2) < 0) + if(H5Tcommit2(file, compnd_type, tid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Get information about datatype on disk */ @@ -4453,7 +4451,7 @@ test_latest(void) FAIL_STACK_ERROR /* Commit compound datatype */ - if(H5Tcommit(file, compnd_type, tid2) < 0) + if(H5Tcommit2(file, compnd_type, tid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Get information about datatype on disk */ diff --git a/test/enum.c b/test/enum.c index 5f73969..bb50d11 100644 --- a/test/enum.c +++ b/test/enum.c @@ -67,7 +67,7 @@ test_named(hid_t file) if(H5Tenum_insert(type, "BLUE", CPTR(val, E1_BLUE )) < 0) FAIL_STACK_ERROR if(H5Tenum_insert(type, "WHITE", CPTR(val, E1_WHITE)) < 0) FAIL_STACK_ERROR if(H5Tenum_insert(type, "BLACK", CPTR(val, E1_BLACK)) < 0) FAIL_STACK_ERROR - if(H5Tcommit(cwg, "e1_a", type) < 0) FAIL_STACK_ERROR + if(H5Tcommit2(cwg, "e1_a", type, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5Tclose(type) < 0) FAIL_STACK_ERROR /* A smaller type */ @@ -77,7 +77,7 @@ test_named(hid_t file) if(H5Tenum_insert(type, "BLUE", CPTR(val8, E1_BLUE )) < 0) FAIL_STACK_ERROR if(H5Tenum_insert(type, "WHITE", CPTR(val8, E1_WHITE)) < 0) FAIL_STACK_ERROR if(H5Tenum_insert(type, "BLACK", CPTR(val8, E1_BLACK)) < 0) FAIL_STACK_ERROR - if(H5Tcommit(cwg, "e1_b", type) < 0) FAIL_STACK_ERROR + if(H5Tcommit2(cwg, "e1_b", type, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5Tclose(type) < 0) FAIL_STACK_ERROR /* A non-native type */ @@ -91,7 +91,7 @@ test_named(hid_t file) if(H5Tenum_insert(type, "BLUE", CPTR(val8, E1_BLUE )) < 0) FAIL_STACK_ERROR if(H5Tenum_insert(type, "WHITE", CPTR(val8, E1_WHITE)) < 0) FAIL_STACK_ERROR if(H5Tenum_insert(type, "BLACK", CPTR(val8, E1_BLACK)) < 0) FAIL_STACK_ERROR - if(H5Tcommit(cwg, "e1_c", type) < 0) FAIL_STACK_ERROR + if(H5Tcommit2(cwg, "e1_c", type, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5Tclose(type) < 0) FAIL_STACK_ERROR if(H5Gclose(cwg) < 0) FAIL_STACK_ERROR diff --git a/test/getname.c b/test/getname.c index e3be2de..b6d13d3 100644 --- a/test/getname.c +++ b/test/getname.c @@ -286,23 +286,23 @@ test_main(hid_t file_id, hid_t fapl) PASSED(); -/*------------------------------------------------------------------------- - * Test H5Iget_name with H5Tcommit - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * Test H5Iget_name with H5Tcommit2 + *------------------------------------------------------------------------- + */ - TESTING("H5Iget_name with H5Tcommit"); + TESTING("H5Iget_name with H5Tcommit2"); /* Create a datatype */ if((type_id = H5Tcreate(H5T_COMPOUND, sizeof(s1_t))) < 0) TEST_ERROR /* Insert fields */ - if(H5Tinsert(type_id, "a", HOFFSET(s1_t,a), H5T_NATIVE_INT) < 0) TEST_ERROR - if(H5Tinsert(type_id, "b", HOFFSET(s1_t,b), H5T_NATIVE_INT) < 0) TEST_ERROR - if(H5Tinsert(type_id, "c", HOFFSET(s1_t,c), H5T_NATIVE_FLOAT) < 0) TEST_ERROR + if(H5Tinsert(type_id, "a", HOFFSET(s1_t, a), H5T_NATIVE_INT) < 0) TEST_ERROR + if(H5Tinsert(type_id, "b", HOFFSET(s1_t, b), H5T_NATIVE_INT) < 0) TEST_ERROR + if(H5Tinsert(type_id, "c", HOFFSET(s1_t, c), H5T_NATIVE_FLOAT) < 0) TEST_ERROR /* Save datatype for later */ - if(H5Tcommit(file_id, "t1", type_id) < 0) TEST_ERROR + if(H5Tcommit2(file_id, "t1", type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR /* Verify */ if(check_name(type_id, "/t1", "/t1") < 0) TEST_ERROR @@ -976,15 +976,15 @@ test_main(hid_t file_id, hid_t fapl) if((type_id = H5Tcreate(H5T_COMPOUND, sizeof(s1_t))) < 0) TEST_ERROR /* Insert fields */ - if(H5Tinsert(type_id, "a", HOFFSET(s1_t,a), H5T_NATIVE_INT) < 0) TEST_ERROR - if(H5Tinsert(type_id, "b", HOFFSET(s1_t,b), H5T_NATIVE_INT) < 0) TEST_ERROR - if(H5Tinsert(type_id, "c", HOFFSET(s1_t,c), H5T_NATIVE_FLOAT) < 0) TEST_ERROR + if(H5Tinsert(type_id, "a", HOFFSET(s1_t, a), H5T_NATIVE_INT) < 0) TEST_ERROR + if(H5Tinsert(type_id, "b", HOFFSET(s1_t, b), H5T_NATIVE_INT) < 0) TEST_ERROR + if(H5Tinsert(type_id, "c", HOFFSET(s1_t, c), H5T_NATIVE_FLOAT) < 0) TEST_ERROR /* Create group "g17" */ if((group_id = H5Gcreate2(file_id, "g17", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR /* Save datatype for later */ - if(H5Tcommit(group_id, "t", type_id) < 0) TEST_ERROR + if(H5Tcommit2(group_id, "t", type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR /* Create a dataspace */ if((space_id = H5Screate_simple(1, dims, NULL)) < 0) TEST_ERROR @@ -1257,10 +1257,9 @@ test_main(hid_t file_id, hid_t fapl) /* Also create a dataset and a datatype */ if((space_id = H5Screate_simple(1, dims, NULL)) < 0) TEST_ERROR if((type_id = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR - if((dataset_id = H5Dcreate(file_id, "g18/d2", type_id, space_id, - H5P_DEFAULT)) < 0) TEST_ERROR + if((dataset_id = H5Dcreate(file_id, "g18/d2", type_id, space_id, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Tcommit(file_id, "g18/t2", type_id) <0) TEST_ERROR + if(H5Tcommit2(file_id, "g18/t2", type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR /* Create second file and group "/g3/g4/g5" in it */ file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); @@ -2430,15 +2429,15 @@ test_obj_ref(hid_t fapl) FAIL_STACK_ERROR /* Insert fields */ - if(H5Tinsert(tid1, "a", HOFFSET(s1_t,a), H5T_NATIVE_INT) < 0) + if(H5Tinsert(tid1, "a", HOFFSET(s1_t, a), H5T_NATIVE_INT) < 0) FAIL_STACK_ERROR - if(H5Tinsert(tid1, "b", HOFFSET(s1_t,b), H5T_NATIVE_INT) < 0) + if(H5Tinsert(tid1, "b", HOFFSET(s1_t, b), H5T_NATIVE_INT) < 0) FAIL_STACK_ERROR - if(H5Tinsert(tid1, "c", HOFFSET(s1_t,c), H5T_NATIVE_FLOAT) < 0) + if(H5Tinsert(tid1, "c", HOFFSET(s1_t, c), H5T_NATIVE_FLOAT) < 0) FAIL_STACK_ERROR /* Save datatype for later */ - if(H5Tcommit(group, "Datatype1", tid1) < 0) + if(H5Tcommit2(group, "Datatype1", tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Close datatype */ diff --git a/test/links.c b/test/links.c index 176792e..30509b4 100644 --- a/test/links.c +++ b/test/links.c @@ -3410,7 +3410,7 @@ external_link_closing(hid_t fapl, hbool_t new_format) /* Test creating each kind of object */ if((gid = H5Gcreate2(fid1, "elink/elink/elink/group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Tcommit(fid1, "elink/elink/elink/type1", tid) < 0) TEST_ERROR + if(H5Tcommit2(fid1, "elink/elink/elink/type1", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR if((did = H5Dcreate(fid1, "elink/elink/elink/dataset1", tid2, sid, H5P_DEFAULT)) < 0) TEST_ERROR /* Close objects */ if(H5Gclose(gid) < 0) TEST_ERROR @@ -5081,7 +5081,7 @@ lapl_nlinks(hid_t fapl, hbool_t new_format) /* Create a datatype and dataset as targets inside the group */ if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR - if(H5Tcommit(gid, "datatype", tid) < 0) TEST_ERROR + if(H5Tcommit2(gid, "datatype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR dims[0] = 2; @@ -5196,14 +5196,14 @@ linkinfo(hid_t fapl, hbool_t new_format) /* Set up filename and create file*/ h5_fixname(FILENAME[0], fapl, filename, sizeof filename); - if((fid=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR + if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR /* Register a couple of user-defined link classes with the library */ if(H5Lregister(UD_plist_class) < 0) TEST_ERROR /* Create an object of each type */ if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR - if(H5Tcommit(fid, "datatype", tid) < 0) TEST_ERROR + if(H5Tcommit2(fid, "datatype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR if((gid = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR if(H5Lcreate_soft("group", fid, "softlink", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR diff --git a/test/mount.c b/test/mount.c index f68589d..0009503 100644 --- a/test/mount.c +++ b/test/mount.c @@ -871,7 +871,7 @@ test_interlink(hid_t fapl) /* Try an interfile hard link by sharing a data type */ if((type = H5Tcopy(H5T_NATIVE_INT)) < 0) FAIL_STACK_ERROR - if(H5Tcommit(file1, "/type1", type) < 0) FAIL_STACK_ERROR + if(H5Tcommit2(file1, "/type1", type, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if((space = H5Screate_simple(1, cur_dims, NULL)) < 0) FAIL_STACK_ERROR H5E_BEGIN_TRY { dset = H5Dcreate(file1, "/mnt1/file2/dset", type, space, H5P_DEFAULT); diff --git a/test/ntypes.c b/test/ntypes.c index a7713cb..dc1538b 100644 --- a/test/ntypes.c +++ b/test/ntypes.c @@ -1918,26 +1918,26 @@ test_refer_dtype(hid_t file) if(H5Tinsert (tid1, "a", HOFFSET(s1_t,a), H5T_NATIVE_INT)<0) TEST_ERROR; - if(H5Tinsert (tid1, "b", HOFFSET(s1_t,b), H5T_NATIVE_INT)<0) + if(H5Tinsert (tid1, "b", HOFFSET(s1_t, b), H5T_NATIVE_INT) < 0) TEST_ERROR; - if(H5Tinsert (tid1, "c", HOFFSET(s1_t,c), H5T_NATIVE_FLOAT)<0) + if(H5Tinsert(tid1, "c", HOFFSET(s1_t, c), H5T_NATIVE_FLOAT) < 0) TEST_ERROR; /* Save datatype for later */ - if(H5Tcommit (group, "Datatype1", tid1)<0) + if(H5Tcommit2(group, "Datatype1", tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR; /* Close datatype */ - if(H5Tclose(tid1)<0) + if(H5Tclose(tid1) < 0) TEST_ERROR; /* Close group */ - if(H5Gclose(group)<0) + if(H5Gclose(group) < 0) TEST_ERROR; /* Create a dataset */ - if((dataset=H5Dcreate(file,"Dataset3",H5T_STD_REF_OBJ,sid1,H5P_DEFAULT))<0) + if((dataset = H5Dcreate(file, "Dataset3", H5T_STD_REF_OBJ, sid1, H5P_DEFAULT)) < 0) TEST_ERROR; /* Create reference to named datatype */ diff --git a/test/objcopy.c b/test/objcopy.c index d6740a4..ef35c54 100755 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -1412,7 +1412,7 @@ test_copy_named_datatype(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR /* create named datatype */ - if((H5Tcommit(fid_src, NAME_DATATYPE_SIMPLE, tid)) < 0) TEST_ERROR + if((H5Tcommit2(fid_src, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* close the datatype */ if(H5Tclose(tid) < 0) TEST_ERROR @@ -1505,7 +1505,7 @@ test_copy_named_datatype_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) if((tid = H5Tvlen_create(H5T_NATIVE_INT)) < 0) TEST_ERROR /* create named datatype */ - if((H5Tcommit(fid_src, NAME_DATATYPE_VL, tid)) < 0) TEST_ERROR + if((H5Tcommit2(fid_src, NAME_DATATYPE_VL, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* close the datatype */ if(H5Tclose(tid) < 0) TEST_ERROR @@ -1601,7 +1601,7 @@ test_copy_named_datatype_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) if((tid2 = H5Tvlen_create(tid)) < 0) TEST_ERROR /* create named datatype */ - if((H5Tcommit(fid_src, NAME_DATATYPE_VL_VL, tid2)) < 0) TEST_ERROR + if((H5Tcommit2(fid_src, NAME_DATATYPE_VL_VL, tid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* close the first datatype */ if(H5Tclose(tid) < 0) TEST_ERROR @@ -2838,7 +2838,7 @@ test_copy_dataset_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* create named datatype */ if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR - if((H5Tcommit(fid_src, NAME_DATATYPE_SIMPLE, tid)) < 0) TEST_ERROR + if((H5Tcommit2(fid_src, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* create dataset at SRC file */ if((did = H5Dcreate(fid_src, NAME_DATASET_NAMED_DTYPE, tid, sid, H5P_DEFAULT)) < 0) TEST_ERROR @@ -2963,7 +2963,7 @@ test_copy_dataset_named_dtype_hier(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* create named datatype _inside_ hierarchy to copy */ if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR - if((H5Tcommit(gid, NAME_DATATYPE_SIMPLE, tid)) < 0) TEST_ERROR + if((H5Tcommit2(gid, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* create first dataset at SRC file */ if((did = H5Dcreate(gid, NAME_DATASET_NAMED_DTYPE, tid, sid, H5P_DEFAULT)) < 0) TEST_ERROR @@ -3102,7 +3102,7 @@ test_copy_dataset_named_dtype_hier_outside(hid_t fcpl_src, hid_t fcpl_dst, hid_t /* create named datatype _outside_ hierarchy to copy */ if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR - if((H5Tcommit(fid_src, NAME_DATATYPE_SIMPLE, tid)) < 0) TEST_ERROR + if((H5Tcommit2(fid_src, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* create first dataset at SRC file */ if((did = H5Dcreate(gid, NAME_DATASET_NAMED_DTYPE, tid, sid, H5P_DEFAULT)) < 0) TEST_ERROR @@ -3374,7 +3374,7 @@ test_copy_dataset_attr_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* create named datatype _outside_ hierarchy to copy */ if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR - if((H5Tcommit(fid_src, NAME_DATATYPE_SIMPLE, tid)) < 0) TEST_ERROR + if((H5Tcommit2(fid_src, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* create first dataset at SRC file */ if((did = H5Dcreate(gid, NAME_DATASET_MULTI_OHDR, tid, sid, H5P_DEFAULT)) < 0) TEST_ERROR @@ -5549,7 +5549,7 @@ test_copy_same_file_named_datatype(hid_t fcpl_src, hid_t fapl) if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR /* create named datatype */ - if((H5Tcommit(fid, NAME_DATATYPE_SIMPLE, tid)) < 0) TEST_ERROR + if((H5Tcommit2(fid, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* copy the datatype from SRC to DST */ @@ -5732,7 +5732,7 @@ test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) if((tid_copy = H5Tcopy(tid)) < 0)TEST_ERROR /* named data type */ - if((H5Tcommit(fid_src, NAME_DATATYPE_VL, tid)) < 0) TEST_ERROR + if((H5Tcommit2(fid_src, NAME_DATATYPE_VL, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* create and set compact plist */ if((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR @@ -5879,7 +5879,7 @@ test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) if((tid_copy = H5Tcopy(tid)) < 0)TEST_ERROR /* named data type */ - if((H5Tcommit(fid_src, NAME_DATATYPE_VL, tid)) < 0) TEST_ERROR + if((H5Tcommit2(fid_src, NAME_DATATYPE_VL, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* create dataset at SRC file */ if((did = H5Dcreate(fid_src, NAME_DATASET_VL, tid, sid, H5P_DEFAULT)) < 0) TEST_ERROR @@ -6020,7 +6020,7 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) if((tid_copy = H5Tcopy(tid)) < 0)TEST_ERROR /* named data type */ - if((H5Tcommit(fid_src, NAME_DATATYPE_VL, tid)) < 0) TEST_ERROR + if((H5Tcommit2(fid_src, NAME_DATATYPE_VL, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* create and set chunk plist */ if((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR @@ -6169,7 +6169,7 @@ test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl if((tid_copy = H5Tcopy(tid)) < 0)TEST_ERROR /* named data type */ - if((H5Tcommit(fid_src, NAME_DATATYPE_VL, tid)) < 0) TEST_ERROR + if((H5Tcommit2(fid_src, NAME_DATATYPE_VL, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* create and set chunk plist */ if((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR diff --git a/test/tattr.c b/test/tattr.c index c708fff..c85931c 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -1628,13 +1628,13 @@ test_attr_dtype_shared(hid_t fapl) CHECK(type_id, FAIL, "H5Tcopy"); /* Commit datatype to file */ - ret = H5Tcommit(file_id, TYPE1_NAME, type_id); - CHECK(ret, FAIL, "H5Tcommit"); + ret = H5Tcommit2(file_id, TYPE1_NAME, type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); /* Check reference count on named datatype */ ret = H5Oget_info(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 1, "H5Tcommit"); + VERIFY(oinfo.rc, 1, "H5Oget_info"); /* Create dataspace for dataset */ space_id = H5Screate(H5S_SCALAR); @@ -6693,8 +6693,8 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl) /* Commit datatype to file */ if(test_shared == 2) { - ret = H5Tcommit(fid, TYPE1_NAME, attr_tid); - CHECK(ret, FAIL, "H5Tcommit"); + ret = H5Tcommit2(fid, TYPE1_NAME, attr_tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); } /* end if */ /* Set up to query the object creation properties */ @@ -7019,8 +7019,8 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl) /* Commit datatype to file */ if(test_shared == 2) { - ret = H5Tcommit(fid, TYPE1_NAME, attr_tid); - CHECK(ret, FAIL, "H5Tcommit"); + ret = H5Tcommit2(fid, TYPE1_NAME, attr_tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); } /* end if */ /* Set up to query the object creation properties */ @@ -7460,8 +7460,8 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl) /* Commit datatype to file */ if(test_shared == 2) { - ret = H5Tcommit(fid, TYPE1_NAME, attr_tid); - CHECK(ret, FAIL, "H5Tcommit"); + ret = H5Tcommit2(fid, TYPE1_NAME, attr_tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); } /* end if */ /* Set up to query the object creation properties */ @@ -7824,8 +7824,8 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl) /* Commit datatype to file */ if(test_shared == 2) { - ret = H5Tcommit(fid, TYPE1_NAME, attr_tid); - CHECK(ret, FAIL, "H5Tcommit"); + ret = H5Tcommit2(fid, TYPE1_NAME, attr_tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); } /* end if */ /* Set up to query the object creation properties */ diff --git a/test/tfile.c b/test/tfile.c index 12f09b8..26a92fa 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -963,8 +963,8 @@ test_get_file_id(void) datatype_id=H5Tcopy(H5T_NATIVE_INT); CHECK(ret, FAIL, "H5Acreate"); - ret = H5Tcommit(fid, TYPE_NAME, datatype_id); - CHECK(ret, FAIL, "H5Tcommit"); + ret = H5Tcommit2(fid, TYPE_NAME, datatype_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); /* Test H5Iget_file_id() */ check_file_id(fid, datatype_id); @@ -1408,15 +1408,15 @@ test_file_open_dot(void) /* Create a named datatype with no name using the file ID */ H5E_BEGIN_TRY { - ret = H5Tcommit(fid, ".", tid); + ret = H5Tcommit2(fid, ".", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); } H5E_END_TRY; - VERIFY(ret, FAIL, "H5Tcommit"); + VERIFY(ret, FAIL, "H5Tcommit2"); /* Create a named datatype with no name using the group ID */ H5E_BEGIN_TRY { - ret = H5Tcommit(gid, ".", tid); + ret = H5Tcommit2(gid, ".", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); } H5E_END_TRY; - VERIFY(ret, FAIL, "H5Tcommit"); + VERIFY(ret, FAIL, "H5Tcommit2"); /* Open a named datatype with no name using the file ID */ H5E_BEGIN_TRY { @@ -1641,8 +1641,8 @@ test_file_getname(void) CHECK(ret, FAIL, "H5Tinsert"); /* Save it on file */ - ret = H5Tcommit(file_id, TESTA_DTYPENAME, type_id); - CHECK(ret, FAIL, "H5Tcommit"); + ret = H5Tcommit2(file_id, TESTA_DTYPENAME, type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); /* Get and verify file name */ name_len = H5Fget_name(type_id, name, (size_t)TESTA_NAME_BUF_SIZE); @@ -1820,8 +1820,8 @@ test_file_double_datatype_open(void) type1_id = H5Tcopy(H5T_NATIVE_INT); CHECK(type1_id, FAIL, "H5Tcopy"); - ret = H5Tcommit(file1_id, TYPE_NAME, type1_id); - CHECK(ret, FAIL, "H5Tcommit"); + ret = H5Tcommit2(file1_id, TYPE_NAME, type1_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); type2_id = H5Topen(file2_id, TYPE_NAME); CHECK(type2_id, FAIL, "H5Topen"); diff --git a/test/th5o.c b/test/th5o.c index 291c73c..49f982a 100644 --- a/test/th5o.c +++ b/test/th5o.c @@ -65,8 +65,8 @@ test_h5o_open(void) /* Commit the type inside the group */ dtype = H5Tcopy(H5T_NATIVE_INT); CHECK(dtype, FAIL, "H5Tcopy"); - ret = H5Tcommit(fid, "group/datatype", dtype); - CHECK(ret, FAIL, "H5Tcommit"); + ret = H5Tcommit2(fid, "group/datatype", dtype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); ret = H5Tclose(dtype); CHECK(ret, FAIL, "H5Tclose"); @@ -171,8 +171,8 @@ test_h5o_close(void) /* Commit the type inside the group */ dtype = H5Tcopy(H5T_NATIVE_INT); CHECK(dtype, FAIL, "H5Tcopy"); - ret = H5Tcommit(fid, "group/datatype", dtype); - CHECK(ret, FAIL, "H5Tcommit"); + ret = H5Tcommit2(fid, "group/datatype", dtype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); ret = H5Oclose(dtype); CHECK(ret, FAIL, "H5Oclose"); @@ -267,8 +267,8 @@ test_h5o_open_by_addr(void) /* Commit the type inside the group */ dtype = H5Tcopy(H5T_NATIVE_INT); CHECK(dtype, FAIL, "H5Tcopy"); - ret = H5Tcommit(fid, "group/datatype", dtype); - CHECK(ret, FAIL, "H5Tcommit"); + ret = H5Tcommit2(fid, "group/datatype", dtype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); ret = H5Tclose(dtype); CHECK(ret, FAIL, "H5Tclose"); @@ -394,8 +394,8 @@ test_h5o_refcount(void) /* Commit the type inside the group */ dtype = H5Tcopy(H5T_NATIVE_INT); CHECK(dtype, FAIL, "H5Tcopy"); - ret = H5Tcommit(fid, "datatype", dtype); - CHECK(ret, FAIL, "H5Tcommit"); + ret = H5Tcommit2(fid, "datatype", dtype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); /* Create the data space for the dataset. */ dims[0] = DIM0; diff --git a/test/titerate.c b/test/titerate.c index a8e0f39..175a5a9 100644 --- a/test/titerate.c +++ b/test/titerate.c @@ -174,8 +174,8 @@ test_iter_group(hid_t fapl, hbool_t new_format) lnames[NDATASETS] = HDstrdup("grp"); CHECK(lnames[NDATASETS], NULL, "strdup"); - ret = H5Tcommit(file, "dtype", datatype); - CHECK(ret, FAIL, "H5Tcommit"); + ret = H5Tcommit2(file, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); lnames[NDATASETS + 1] = HDstrdup("dtype"); CHECK(lnames[NDATASETS], NULL, "strdup"); @@ -652,8 +652,8 @@ test_iter_group_large(hid_t fapl) CHECK(ret, FAIL, "H5Tinsert"); /* Save datatype for later */ - ret = H5Tcommit(file, "Datatype1", tid); - CHECK(ret, FAIL, "H5Tcommit"); + ret = H5Tcommit2(file, "Datatype1", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); /* Add the name to the list of objects in the root group */ HDstrcpy(names[ITER_NGROUPS + 1].name, "Datatype1"); @@ -738,8 +738,8 @@ static void test_grp_memb_funcs(hid_t fapl) dnames[NDATASETS] = HDstrdup("grp"); CHECK(dnames[NDATASETS], NULL, "strdup"); - ret = H5Tcommit(file, "dtype", datatype); - CHECK(ret, FAIL, "H5Tcommit"); + ret = H5Tcommit2(file, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); dnames[NDATASETS + 1] = HDstrdup("dtype"); CHECK(dnames[NDATASETS], NULL, "strdup"); diff --git a/test/tmisc.c b/test/tmisc.c index f9abada..7882120 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -1100,83 +1100,83 @@ test_misc7(void) /* Attempt to commit a non-sensible datatype */ /* Create the file */ - fid=H5Fcreate(MISC7_FILE,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT); - CHECK(fid,FAIL,"H5Fcreate"); + fid = H5Fcreate(MISC7_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + CHECK(fid, FAIL, "H5Fcreate"); /* Create the dataspace */ - sid=H5Screate(H5S_SCALAR); - CHECK(sid,FAIL,"H5Screate"); + sid = H5Screate(H5S_SCALAR); + CHECK(sid, FAIL, "H5Screate"); /* Create the compound datatype to commit*/ tid = H5Tcreate(H5T_COMPOUND, (size_t)32); CHECK(tid, FAIL, "H5Tcreate"); /* Attempt to commit an empty compound datatype */ - ret=H5Tcommit(fid,MISC7_TYPENAME1,tid); - VERIFY(ret,FAIL,"H5Tcommit"); + ret = H5Tcommit2(fid, MISC7_TYPENAME1, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + VERIFY(ret, FAIL, "H5Tcommit2"); /* Attempt to use empty compound datatype to create dataset */ - did=H5Dcreate(fid,MISC7_DSETNAME1,tid,sid,H5P_DEFAULT); - VERIFY(ret,FAIL,"H5Dcreate"); + did = H5Dcreate(fid, MISC7_DSETNAME1, tid, sid, H5P_DEFAULT); + VERIFY(ret, FAIL, "H5Dcreate"); /* Add a field to the compound datatype */ ret = H5Tinsert(tid, "a", (size_t)0, H5T_NATIVE_INT); CHECK(ret, FAIL, "H5Tinsert"); /* Attempt to commit the compound datatype now - should work */ - ret=H5Tcommit(fid,MISC7_TYPENAME1,tid); - CHECK(ret,FAIL,"H5Tcommit"); + ret = H5Tcommit2(fid, MISC7_TYPENAME1, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); /* Attempt to use compound datatype to create dataset now - should work */ - did=H5Dcreate(fid,MISC7_DSETNAME1,tid,sid,H5P_DEFAULT); - CHECK(did,FAIL,"H5Dcreate"); + did = H5Dcreate(fid, MISC7_DSETNAME1, tid, sid, H5P_DEFAULT); + CHECK(did, FAIL, "H5Dcreate"); /* Close dataset */ - ret=H5Dclose(did); + ret = H5Dclose(did); CHECK(ret, FAIL, "H5Dclose"); /* Close compound datatype */ - ret=H5Tclose(tid); + ret = H5Tclose(tid); CHECK(ret, FAIL, "H5Tclose"); /* Create the enum datatype to commit*/ - tid=H5Tenum_create(H5T_NATIVE_INT); - CHECK(tid,FAIL,"H5Tenum_create"); + tid = H5Tenum_create(H5T_NATIVE_INT); + CHECK(tid, FAIL, "H5Tenum_create"); /* Attempt to commit an empty enum datatype */ - ret=H5Tcommit(fid,MISC7_TYPENAME2,tid); - VERIFY(ret,FAIL,"H5Tcommit"); + ret = H5Tcommit2(fid, MISC7_TYPENAME2, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + VERIFY(ret, FAIL, "H5Tcommit2"); /* Attempt to use empty enum datatype to create dataset */ - did=H5Dcreate(fid,MISC7_DSETNAME2,tid,sid,H5P_DEFAULT); + did = H5Dcreate(fid, MISC7_DSETNAME2, tid, sid, H5P_DEFAULT); VERIFY(did,FAIL,"H5Dcreate"); /* Add a member to the enum datatype */ - ret=H5Tenum_insert(tid,"a",&enum_value); + ret = H5Tenum_insert(tid, "a", &enum_value); CHECK(ret,FAIL,"H5Tenum_insert"); /* Attempt to commit the enum datatype now - should work */ - ret=H5Tcommit(fid,MISC7_TYPENAME2,tid); - CHECK(ret,FAIL,"H5Tcommit"); + ret = H5Tcommit2(fid, MISC7_TYPENAME2, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); /* Attempt to use enum datatype to create dataset now - should work */ - did=H5Dcreate(fid,MISC7_DSETNAME2,tid,sid,H5P_DEFAULT); - CHECK(did,FAIL,"H5Dcreate"); + did = H5Dcreate(fid, MISC7_DSETNAME2, tid, sid, H5P_DEFAULT); + CHECK(did, FAIL, "H5Dcreate"); /* Close dataset */ - ret=H5Dclose(did); + ret = H5Dclose(did); CHECK(ret, FAIL, "H5Dclose"); /* Close enum datatype */ - ret=H5Tclose(tid); + ret = H5Tclose(tid); CHECK(ret, FAIL, "H5Tclose"); /* Close dataspace */ - ret=H5Sclose(sid); + ret = H5Sclose(sid); CHECK(ret, FAIL, "H5Sclose"); /* Close file */ - ret=H5Fclose(fid); + ret = H5Fclose(fid); CHECK(ret, FAIL, "H5Fclose"); } /* end test_misc7() */ @@ -2152,27 +2152,27 @@ create_hdf_file(const char *name) CHECK(ret, FAIL, "H5Pset_layout"); /* Use chunked storage for this DCPL */ - chunk_dims[0]=MISC13_CHUNK_DIM1; - chunk_dims[1]=MISC13_CHUNK_DIM2; - ret = H5Pset_chunk(dcpl,MISC13_RANK,chunk_dims); + chunk_dims[0] = MISC13_CHUNK_DIM1; + chunk_dims[1] = MISC13_CHUNK_DIM2; + ret = H5Pset_chunk(dcpl, MISC13_RANK, chunk_dims); CHECK(ret, FAIL, "H5Pset_chunk"); /* Create contiguous dataset in root group */ - create_dataset(fid,MISC13_DSET1_NAME,H5P_DEFAULT); + create_dataset(fid, MISC13_DSET1_NAME, H5P_DEFAULT); /* Create chunked dataset in root group */ - create_dataset(fid,MISC13_DSET2_NAME,dcpl); + create_dataset(fid, MISC13_DSET2_NAME, dcpl); /* Create a datatype to commit to the file */ - tid=H5Tcopy(H5T_NATIVE_INT); + tid = H5Tcopy(H5T_NATIVE_INT); CHECK(tid, FAIL, "H5Tcopy"); /* Create a named datatype in the root group */ - ret=H5Tcommit(fid,MISC13_DTYPE_NAME,tid); - CHECK(ret, FAIL, "H5Tcommit"); + ret = H5Tcommit2(fid, MISC13_DTYPE_NAME, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); /* Close named datatype */ - ret=H5Tclose(tid); + ret = H5Tclose(tid); CHECK(ret, FAIL, "H5Tclose"); /* Create a group in the root group */ @@ -2188,21 +2188,21 @@ create_hdf_file(const char *name) CHECK(ret, FAIL, "H5Gclose"); /* Create contiguous dataset in new group */ - create_dataset(gid,MISC13_DSET1_NAME,H5P_DEFAULT); + create_dataset(gid, MISC13_DSET1_NAME, H5P_DEFAULT); /* Create chunked dataset in new group */ - create_dataset(gid,MISC13_DSET2_NAME,dcpl); + create_dataset(gid, MISC13_DSET2_NAME, dcpl); /* Create a datatype to commit to the new group */ - tid=H5Tcopy(H5T_NATIVE_INT); + tid = H5Tcopy(H5T_NATIVE_INT); CHECK(tid, FAIL, "H5Tcopy"); /* Create a named datatype in the new group */ - ret=H5Tcommit(gid,MISC13_DTYPE_NAME,tid); - CHECK(ret, FAIL, "H5Tcommit"); + ret = H5Tcommit2(gid, MISC13_DTYPE_NAME, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); /* Close named datatype */ - ret=H5Tclose(tid); + ret = H5Tclose(tid); CHECK(ret, FAIL, "H5Tclose"); /* Close the first group */ @@ -2215,7 +2215,7 @@ create_hdf_file(const char *name) /* Close the file */ ret = H5Fclose(fid); - assert(ret>=0); + assert(ret >= 0); CHECK(ret, FAIL, "H5Fclose"); } @@ -4051,8 +4051,8 @@ test_misc24(void) type_id = H5Tcopy(H5T_NATIVE_INT); CHECK(type_id, FAIL, "H5Tcopy"); - ret = H5Tcommit(file_id, MISC24_DATATYPE_NAME, type_id); - CHECK(ret, FAIL, "H5Tcommit"); + ret = H5Tcommit2(file_id, MISC24_DATATYPE_NAME, type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); /* Create soft links to the objects created */ ret = H5Lcreate_soft(MISC24_GROUP_NAME, file_id, MISC24_GROUP_LINK, H5P_DEFAULT, H5P_DEFAULT); diff --git a/test/trefer.c b/test/trefer.c index 233d65e..2b2c96e 100644 --- a/test/trefer.c +++ b/test/trefer.c @@ -152,8 +152,8 @@ test_reference_obj(void) CHECK(ret, FAIL, "H5Tinsert"); /* Save datatype for later */ - ret = H5Tcommit(group, "Datatype1", tid1); - CHECK(ret, FAIL, "H5Tcommit"); + ret = H5Tcommit2(group, "Datatype1", tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); /* Close datatype */ ret = H5Tclose(tid1); @@ -1196,8 +1196,8 @@ test_reference_compat(void) CHECK(ret, FAIL, "H5Tinsert"); /* Save datatype for later */ - ret = H5Tcommit(group, "Datatype1", tid1); - CHECK(ret, FAIL, "H5Tcommit"); + ret = H5Tcommit2(group, "Datatype1", tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); /* Close datatype */ ret = H5Tclose(tid1); diff --git a/test/tsohm.c b/test/tsohm.c index f5b5235..e0ddc8c 100644 --- a/test/tsohm.c +++ b/test/tsohm.c @@ -1028,8 +1028,8 @@ static void sohm_attr_helper(hid_t fcpl_id) /* Repeat with a committed datatype */ type_id = H5Tcopy(H5T_NATIVE_INT); CHECK_I(type_id, "H5Tcopy"); - ret = H5Tcommit(file_id, "datatype", type_id); - CHECK_I(ret, "H5Tcommit"); + ret = H5Tcommit2(file_id, "datatype", type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK_I(ret, "H5Tcommit2"); /* Create and verify an attribute */ group_id = H5Gcreate2(file_id, "another_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); diff --git a/test/ttime.c b/test/ttime.c index 326b401..927d68a 100644 --- a/test/ttime.c +++ b/test/ttime.c @@ -48,29 +48,29 @@ test_time_commit(void) tid = H5Tcopy (H5T_UNIX_D32LE); CHECK(tid, FAIL, "H5Tcopy"); - status = H5Tcommit(file_id, "Committed D32LE type", tid); - CHECK(status, FAIL, "H5Tcommit"); + status = H5Tcommit2(file_id, "Committed D32LE type", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(status, FAIL, "H5Tcommit2"); status = H5Tclose (tid); CHECK(status, FAIL, "H5Tclose"); tid = H5Tcopy (H5T_UNIX_D32BE); CHECK(tid, FAIL, "H5Tcopy"); - status = H5Tcommit(file_id, "Committed D32BE type", tid); - CHECK(status, FAIL, "H5Tcommit"); + status = H5Tcommit2(file_id, "Committed D32BE type", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(status, FAIL, "H5Tcommit2"); status = H5Tclose (tid); CHECK(status, FAIL, "H5Tclose"); tid = H5Tcopy (H5T_UNIX_D64LE); CHECK(tid, FAIL, "H5Tcopy"); - status = H5Tcommit(file_id, "Committed D64LE type", tid); - CHECK(status, FAIL, "H5Tcommit"); + status = H5Tcommit2(file_id, "Committed D64LE type", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(status, FAIL, "H5Tcommit2"); status = H5Tclose (tid); CHECK(status, FAIL, "H5Tclose"); tid = H5Tcopy (H5T_UNIX_D64BE); CHECK(tid, FAIL, "H5Tcopy"); - status = H5Tcommit(file_id, "Committed D64BE type", tid); - CHECK(status, FAIL, "H5Tcommit"); + status = H5Tcommit2(file_id, "Committed D64BE type", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(status, FAIL, "H5Tcommit2"); status = H5Tclose (tid); CHECK(status, FAIL, "H5Tclose"); diff --git a/test/tunicode.c b/test/tunicode.c index 66432a3..de22dfc 100644 --- a/test/tunicode.c +++ b/test/tunicode.c @@ -435,8 +435,8 @@ void test_objnames(hid_t fid, const char* string) type_id = H5Tcreate(H5T_OPAQUE, (size_t)1); CHECK(type_id, FAIL, "H5Tcreate"); - ret = H5Tcommit(grp2_id, string, type_id); - CHECK(type_id, FAIL, "H5Tcommit"); + ret = H5Tcommit2(grp2_id, string, type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(type_id, FAIL, "H5Tcommit2"); ret = H5Tclose(type_id); CHECK(type_id, FAIL, "H5Tclose"); diff --git a/test/tvlstr.c b/test/tvlstr.c index f4f77b9..8d8c4a4 100644 --- a/test/tvlstr.c +++ b/test/tvlstr.c @@ -435,8 +435,8 @@ static void test_vlstring_type(void) VERIFY(pad, H5T_STR_NULLPAD, "H5Tget_strpad"); /* Commit variable-length string datatype to storage */ - ret = H5Tcommit(fid, VLSTR_TYPE, tid_vlstr); - CHECK(ret, FAIL, "H5Tcommit"); + ret = H5Tcommit2(fid, VLSTR_TYPE, tid_vlstr, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); /* Close datatype */ ret = H5Tclose(tid_vlstr); diff --git a/test/unlink.c b/test/unlink.c index 9ac7532..f99a1cc 100644 --- a/test/unlink.c +++ b/test/unlink.c @@ -876,7 +876,7 @@ test_filespace(hid_t fapl) if((type = H5Tcopy(H5T_NATIVE_INT)) < 0) FAIL_STACK_ERROR /* Create a single named datatype to remove */ - if(H5Tcommit(file, TYPENAME, type) < 0) FAIL_STACK_ERROR + if(H5Tcommit2(file, TYPENAME, type, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5Tclose(type) < 0) FAIL_STACK_ERROR /* Remove the named datatype */ @@ -1150,7 +1150,7 @@ test_filespace(hid_t fapl) if((type = H5Tcopy(H5T_NATIVE_INT)) < 0) FAIL_STACK_ERROR /* Create a single named datatype to remove */ - if(H5Tcommit(file, TYPENAME, type) < 0) FAIL_STACK_ERROR + if(H5Tcommit2(file, TYPENAME, type, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5Tclose(type) < 0) FAIL_STACK_ERROR /* Create datatype to commit */ @@ -1158,7 +1158,7 @@ test_filespace(hid_t fapl) /* Create another named datatype with same name */ H5E_BEGIN_TRY { - status = H5Tcommit(file, TYPENAME, type); + status = H5Tcommit2(file, TYPENAME, type, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); } H5E_END_TRY; if(status >= 0) TEST_ERROR if(H5Tclose(type) < 0) FAIL_STACK_ERROR @@ -1924,7 +1924,7 @@ test_resurrect_datatype(hid_t fapl) /* Create a named datatype in the file */ if((type = H5Tcopy (H5T_NATIVE_INT)) < 0) FAIL_STACK_ERROR - if(H5Tcommit(file, TYPENAME, type) < 0) FAIL_STACK_ERROR + if(H5Tcommit2(file, TYPENAME, type, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Unlink the datatype while it's open (will mark it for deletion when closed) */ if(H5Ldelete(file, TYPENAME, H5P_DEFAULT) < 0) FAIL_STACK_ERROR |