summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repacktst.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-08-29 20:44:19 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-08-29 20:44:19 (GMT)
commitdb3c155bf296fa06ab0df56bb7307f2ba19613e5 (patch)
tree722dbba200b5baf9b45de8187ea3af0d0f7f48ca /tools/h5repack/h5repacktst.c
parenta4c8e8fd5636e6059beb2031cb98af3dc1617dd3 (diff)
downloadhdf5-db3c155bf296fa06ab0df56bb7307f2ba19613e5.zip
hdf5-db3c155bf296fa06ab0df56bb7307f2ba19613e5.tar.gz
hdf5-db3c155bf296fa06ab0df56bb7307f2ba19613e5.tar.bz2
[svn-r14126] Description:
Move H5Gunlink to deprecated symbol section, replacing internal calls with H5Ldelete. Tested on: FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Linux/32 2.6 (kagiso) Linux/64 2.6 (smirom) Solaris/32 5.10 (linew) Mac OS X/32 10.4.10 (amazon)
Diffstat (limited to 'tools/h5repack/h5repacktst.c')
-rw-r--r--tools/h5repack/h5repacktst.c154
1 files changed, 76 insertions, 78 deletions
diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c
index c21b858..cc5591d 100644
--- a/tools/h5repack/h5repacktst.c
+++ b/tools/h5repack/h5repacktst.c
@@ -2384,94 +2384,92 @@ out:
*/
int make_early(void)
{
- hsize_t dims[1] ={3000};
- hsize_t cdims[1]={30};
- hid_t fid=-1;
- hid_t dset_id=-1;
- hid_t sid=-1;
- hid_t tid=-1;
- hid_t dcpl=-1;
- int i;
- char name[10];
- int iter=100;
-
- if ((fid = H5Fcreate(FNAME5,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
- return -1;
- if (H5Fclose(fid)<0)
- goto out;
-
- if ((sid = H5Screate_simple(1, dims, NULL))<0)
- goto out;
- if ((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0)
- goto out;
- if (H5Pset_chunk(dcpl,1,cdims)<0)
- goto out;
- if (H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY)<0)
- goto out;
-
- 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)
- goto out;
- if ((tid = H5Tcopy(H5T_NATIVE_DOUBLE))<0)
- goto out;
- sprintf(name,"%d", i);
- if ((H5Tcommit(fid,name,tid))<0)
- goto out;
- if (H5Tclose(tid)<0)
- goto out;
- if (H5Dclose(dset_id)<0)
- goto out;
- if (H5Gunlink(fid,"early")<0)
- goto out;
- if (H5Fclose(fid)<0)
- goto out;
- }
-
-/*-------------------------------------------------------------------------
- * do the same without close/opening the file and creating the dataset
- *-------------------------------------------------------------------------
- */
+ hsize_t dims[1] ={3000};
+ hsize_t cdims[1]={30};
+ hid_t fid=-1;
+ hid_t dset_id=-1;
+ hid_t sid=-1;
+ hid_t tid=-1;
+ hid_t dcpl=-1;
+ int i;
+ char name[10];
+ int iter=100;
+
+ if((fid = H5Fcreate(FNAME5, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ return -1;
+ if(H5Fclose(fid) < 0)
+ goto out;
+
+ if((sid = H5Screate_simple(1, dims, NULL)) < 0)
+ goto out;
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto out;
+ if(H5Pset_chunk(dcpl, 1, cdims) < 0)
+ goto out;
+ if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0)
+ goto out;
+
+ 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)
+ goto out;
+ if((tid = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
+ goto out;
+ sprintf(name, "%d", i);
+ if((H5Tcommit(fid, name, tid)) < 0)
+ goto out;
+ if(H5Tclose(tid) < 0)
+ goto out;
+ if(H5Dclose(dset_id) < 0)
+ goto out;
+ if(H5Ldelete(fid, "early", H5P_DEFAULT) < 0)
+ goto out;
+ if(H5Fclose(fid) < 0)
+ goto out;
+ }
- if ((fid = H5Fcreate(FNAME6,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
- return -1;
+ /*-------------------------------------------------------------------------
+ * do the same without close/opening the file and creating the dataset
+ *-------------------------------------------------------------------------
+ */
- 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)
- goto out;
- if (H5Tclose(tid)<0)
- goto out;
- }
+ if((fid = H5Fcreate(FNAME6, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ return -1;
- if (H5Sclose(sid)<0)
- goto out;
- if (H5Pclose(dcpl)<0)
- goto out;
- if (H5Fclose(fid)<0)
- goto out;
+ 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)
+ goto out;
+ if(H5Tclose(tid) < 0)
+ goto out;
+ }
+ if(H5Sclose(sid) < 0)
+ goto out;
+ if(H5Pclose(dcpl) < 0)
+ goto out;
+ if(H5Fclose(fid) < 0)
+ goto out;
- return 0;
+ return 0;
out:
- H5E_BEGIN_TRY {
- H5Tclose(tid);
- H5Pclose(dcpl);
- H5Sclose(sid);
- H5Dclose(dset_id);
- H5Fclose(fid);
- } H5E_END_TRY;
- return -1;
+ H5E_BEGIN_TRY {
+ H5Tclose(tid);
+ H5Pclose(dcpl);
+ H5Sclose(sid);
+ H5Dclose(dset_id);
+ H5Fclose(fid);
+ } H5E_END_TRY;
+ return -1;
}
-
/*-------------------------------------------------------------------------
* Function: make_layout
*