summaryrefslogtreecommitdiffstats
path: root/test/dangle.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 /test/dangle.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 'test/dangle.c')
-rw-r--r--test/dangle.c78
1 files changed, 39 insertions, 39 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 */