summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repacktst.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-09-26 02:50:31 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-09-26 02:50:31 (GMT)
commit3706d53f155e3ac86bc8547c9287bcd857c4eca8 (patch)
tree346b21f5faf06429015d0587bcbff063ab669d1c /tools/h5repack/h5repacktst.c
parent8f84b136fc7a9eff4354416307ae3acc8f73d038 (diff)
downloadhdf5-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 'tools/h5repack/h5repacktst.c')
-rw-r--r--tools/h5repack/h5repacktst.c50
1 files changed, 24 insertions, 26 deletions
diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c
index cc5591d..0cdc4c0 100644
--- a/tools/h5repack/h5repacktst.c
+++ b/tools/h5repack/h5repacktst.c
@@ -1558,52 +1558,52 @@ int make_all_objects(hid_t loc_id)
} s_t;
/*-------------------------------------------------------------------------
- * H5G_DATASET
- *-------------------------------------------------------------------------
- */
+ * H5G_DATASET
+ *-------------------------------------------------------------------------
+ */
space_id = H5Screate_simple(1,dims,NULL);
dset_id = H5Dcreate(loc_id,"dset_referenced",H5T_NATIVE_INT,space_id,H5P_DEFAULT);
H5Sclose(space_id);
/*-------------------------------------------------------------------------
- * H5G_GROUP
- *-------------------------------------------------------------------------
- */
+ * H5G_GROUP
+ *-------------------------------------------------------------------------
+ */
group_id = H5Gcreate2(loc_id, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
root_id = H5Gopen2(loc_id, "/", H5P_DEFAULT);
/*-------------------------------------------------------------------------
- * H5G_TYPE
- *-------------------------------------------------------------------------
- */
+ * H5G_TYPE
+ *-------------------------------------------------------------------------
+ */
/* Create a memory compound datatype */
- type_id = H5Tcreate (H5T_COMPOUND, sizeof(s_t));
+ type_id = H5Tcreate(H5T_COMPOUND, sizeof(s_t));
H5Tinsert(type_id, "a", HOFFSET(s_t, a), H5T_NATIVE_INT);
H5Tinsert(type_id, "b", HOFFSET(s_t, b), H5T_NATIVE_FLOAT);
/* Commit compound datatype and close it */
- H5Tcommit(loc_id, "type", type_id);
+ H5Tcommit2(loc_id, "type", type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Tclose(type_id);
/*-------------------------------------------------------------------------
- * H5G_LINK
- *-------------------------------------------------------------------------
- */
+ * H5G_LINK
+ *-------------------------------------------------------------------------
+ */
H5Lcreate_soft("dset", loc_id, "link", H5P_DEFAULT, H5P_DEFAULT);
/*-------------------------------------------------------------------------
- * H5G_UDLINK
- *-------------------------------------------------------------------------
- */
+ * H5G_UDLINK
+ *-------------------------------------------------------------------------
+ */
/* Create an external link. Other UD links are not supported by h5repack */
H5Lcreate_external("file", "path", loc_id, "ext_link", H5P_DEFAULT, H5P_DEFAULT);
/*-------------------------------------------------------------------------
- * write a series of datasetes
- *-------------------------------------------------------------------------
- */
+ * write a series of datasetes
+ *-------------------------------------------------------------------------
+ */
write_dset_in(root_id,"dset_referenced",loc_id,0);
@@ -2409,8 +2409,7 @@ int make_early(void)
if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0)
goto out;
- for(i = 0; i < iter; i++)
- {
+ for(i = 0; i < iter; i++) {
if((fid = H5Fopen(FNAME5, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
goto out;
if((dset_id = H5Dcreate(fid, "early", H5T_NATIVE_DOUBLE, sid, dcpl)) < 0)
@@ -2418,7 +2417,7 @@ int make_early(void)
if((tid = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
goto out;
sprintf(name, "%d", i);
- if((H5Tcommit(fid, name, tid)) < 0)
+ if((H5Tcommit2(fid, name, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Tclose(tid) < 0)
goto out;
@@ -2438,12 +2437,11 @@ int make_early(void)
if((fid = H5Fcreate(FNAME6, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
- for(i = 0; i < iter; i++)
- {
+ for(i = 0; i < iter; i++) {
if((tid = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
goto out;
sprintf(name, "%d", i);
- if((H5Tcommit(fid, name, tid)) < 0)
+ if((H5Tcommit2(fid, name, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Tclose(tid) < 0)
goto out;