diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-01-03 13:55:39 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-01-03 13:55:39 (GMT) |
commit | 35694d44ae9aedaeed71850222ce014606ed3572 (patch) | |
tree | def0459f6df031c609a9c83d0cebe576ccc0551e /test | |
parent | 23c1eb4a6cdbc6fe782c8746eb40a7e54c8a7e42 (diff) | |
download | hdf5-35694d44ae9aedaeed71850222ce014606ed3572.zip hdf5-35694d44ae9aedaeed71850222ce014606ed3572.tar.gz hdf5-35694d44ae9aedaeed71850222ce014606ed3572.tar.bz2 |
[svn-r14362] Description:
Switched from "H5P[gs]et_latest_format" to "H5P[gs]et_format_bounds".
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
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'test')
-rw-r--r-- | test/dsets.c | 4 | ||||
-rw-r--r-- | test/dtypes.c | 4 | ||||
-rw-r--r-- | test/fillval.c | 4 | ||||
-rw-r--r-- | test/gen_new_group.c | 4 | ||||
-rw-r--r-- | test/h5test.c | 5 | ||||
-rw-r--r-- | test/links.c | 4 | ||||
-rwxr-xr-x | test/objcopy.c | 4 | ||||
-rw-r--r-- | test/ohdr.c | 2 | ||||
-rw-r--r-- | test/stab.c | 4 | ||||
-rw-r--r-- | test/tattr.c | 16 | ||||
-rw-r--r-- | test/th5o.c | 14 | ||||
-rw-r--r-- | test/titerate.c | 6 | ||||
-rw-r--r-- | test/tmisc.c | 4 | ||||
-rw-r--r-- | test/unlink.c | 4 |
14 files changed, 40 insertions, 39 deletions
diff --git a/test/dsets.c b/test/dsets.c index bf58018..2b58110 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -6405,8 +6405,8 @@ main(void) /* Copy the file access property list */ if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR - /* Set the "use the latest version of the format" flag for creating objects in the file */ - if(H5Pset_latest_format(fapl2, TRUE) < 0) TEST_ERROR + /* Set the "use the latest version of the format" bounds for creating objects in the file */ + if(H5Pset_format_bounds(fapl2, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST) < 0) TEST_ERROR h5_fixname(FILENAME[0], fapl, filename, sizeof filename); diff --git a/test/dtypes.c b/test/dtypes.c index f01c5e3..4ee4eec 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -4410,10 +4410,10 @@ test_latest(void) FAIL_STACK_ERROR - /* Set the 'use the latest format' flag in the FAPL */ + /* Set the 'use the latest format' bounds in the FAPL */ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) FAIL_STACK_ERROR - if(H5Pset_latest_format(fapl, TRUE) < 0) + if(H5Pset_format_bounds(fapl, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST) < 0) FAIL_STACK_ERROR /* Create file using default FAPL */ diff --git a/test/fillval.c b/test/fillval.c index acbd2b9..9018f62 100644 --- a/test/fillval.c +++ b/test/fillval.c @@ -2142,8 +2142,8 @@ main(int argc, char *argv[]) /* Copy the file access property list */ if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR - /* Set the "use the latest version of the format" flag for creating objects in the file */ - if(H5Pset_latest_format(fapl2, TRUE) < 0) TEST_ERROR + /* Set the "use the latest version of the format" bounds for creating objects in the file */ + if(H5Pset_format_bounds(fapl2, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST) < 0) TEST_ERROR /* Loop over using new group format */ for(new_format = FALSE; new_format <= TRUE; new_format++) { diff --git a/test/gen_new_group.c b/test/gen_new_group.c index 1a57b6f..d1f04e0 100644 --- a/test/gen_new_group.c +++ b/test/gen_new_group.c @@ -57,8 +57,8 @@ int main(void) /* Copy the file access property list */ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) goto error; - /* Set the "use the latest version of the format" flag for creating objects in the file */ - if(H5Pset_latest_format(fapl, TRUE) < 0) goto error; + /* Set the "use the latest version of the format" bounds for creating objects in the file */ + if(H5Pset_format_bounds(fapl, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST) < 0) goto error; /* Create file for test groups */ if((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl)) <0) goto error; diff --git a/test/h5test.c b/test/h5test.c index 5424717..af9ca1e 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -597,9 +597,10 @@ h5_fileaccess(void) * and copy buffer size to the default values. */ if (H5Pset_fapl_direct(fapl, 1024, 4096, 8*4096)<0) return -1; #endif - } else if (!HDstrcmp(name, "latest")) { + } else if(!HDstrcmp(name, "latest")) { /* use the latest format */ - if (H5Pset_latest_format(fapl, TRUE)<0) return -1; + if(H5Pset_format_bounds(fapl, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST) < 0) + return -1; } else { /* Unknown driver */ return -1; diff --git a/test/links.c b/test/links.c index 0e69a3d..4e58500 100644 --- a/test/links.c +++ b/test/links.c @@ -10211,8 +10211,8 @@ main(void) /* Copy the file access property list */ if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR - /* Set the "use the latest version of the format" flag for creating objects in the file */ - if(H5Pset_latest_format(fapl2, TRUE) < 0) TEST_ERROR + /* Set the "use the latest version of the format" bounds for creating objects in the file */ + if(H5Pset_format_bounds(fapl2, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST) < 0) TEST_ERROR /* Loop over using new group format */ for(new_format = FALSE; new_format <= TRUE; new_format++) { diff --git a/test/objcopy.c b/test/objcopy.c index b2df288..eed7794 100755 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -7175,8 +7175,8 @@ main(void) /* Copy the file access property list */ if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR - /* Set the "use the latest version of the format" flag for creating objects in the file */ - if(H5Pset_latest_format(fapl2, TRUE) < 0) TEST_ERROR + /* Set the "use the latest version of the format" bounds for creating objects in the file */ + if(H5Pset_format_bounds(fapl2, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST) < 0) TEST_ERROR /* Create an FCPL with sharing enabled */ if((fcpl_shared = H5Pcreate(H5P_FILE_CREATE)) < 0) TEST_ERROR diff --git a/test/ohdr.c b/test/ohdr.c index 0ff5ac0..8ed361a 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -89,7 +89,7 @@ main(void) HDputs("Using default file format:"); /* Set the format to use for the file */ - if (H5Pset_latest_format(fapl, b) < 0) FAIL_STACK_ERROR + if (H5Pset_format_bounds(fapl, (b ? H5F_FORMAT_LATEST : H5F_FORMAT_EARLIEST), H5F_FORMAT_LATEST) < 0) FAIL_STACK_ERROR /* Create the file to operate on */ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR diff --git a/test/stab.c b/test/stab.c index 732ac5b..8b483c9 100644 --- a/test/stab.c +++ b/test/stab.c @@ -1128,8 +1128,8 @@ main(void) /* Copy the file access property list */ if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR - /* Set the "use the latest version of the format" flag for creating objects in the file */ - if(H5Pset_latest_format(fapl2, TRUE) < 0) TEST_ERROR + /* Set the "use the latest version of the format" bounds for creating objects in the file */ + if(H5Pset_format_bounds(fapl2, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST) < 0) TEST_ERROR /* Loop over using new group format */ for(new_format = FALSE; new_format <= TRUE; new_format++) { diff --git a/test/tattr.c b/test/tattr.c index c04af07..99b1d65 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -2769,7 +2769,7 @@ test_attr_big(hid_t fcpl, hid_t fapl) unsigned max_compact; /* Maximum # of attributes to store compactly */ unsigned min_dense; /* Minimum # of attributes to store "densely" */ unsigned nshared_indices; /* # of shared message indices */ - hbool_t latest_format; /* Whether we're using the latest version of the format or not */ + H5F_format_version_t low, high; /* File format bounds */ htri_t is_empty; /* Are there any attributes? */ htri_t is_dense; /* Are attributes stored densely? */ unsigned u; /* Local index variable */ @@ -2817,9 +2817,9 @@ test_attr_big(hid_t fcpl, hid_t fapl) ret = H5Pget_shared_mesg_nindexes(fcpl, &nshared_indices); CHECK(ret, FAIL, "H5Pget_shared_mesg_nindexes"); - /* Retrieve the "use the latest version of the format" flag for creating objects in the file */ - ret = H5Pget_latest_format(fapl, &latest_format); - CHECK(ret, FAIL, "H5Pget_latest_format"); + /* Retrieve the format bounds for creating objects in the file */ + ret = H5Pget_format_bounds(fapl, &low, &high); + CHECK(ret, FAIL, "H5Pget_format_bounds"); /* Create a dataset */ dataset = H5Dcreate2(fid, DSET1_NAME, H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); @@ -2881,7 +2881,7 @@ test_attr_big(hid_t fcpl, hid_t fapl) u = 2; sprintf(attrname, "attr %02u", u); attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT); - if(latest_format) { + if(low == H5F_FORMAT_LATEST) { CHECK(attr, FAIL, "H5Acreate2"); /* Close attribute */ @@ -8864,9 +8864,9 @@ test_attr(void) fapl2 = H5Pcopy(fapl); CHECK(fapl2, FAIL, "H5Pcopy"); - /* Set the "use the latest version of the format" flag for creating objects in the file */ - ret = H5Pset_latest_format(fapl2, TRUE); - CHECK(ret, FAIL, "H5Pset_latest_format"); + /* Set the "use the latest version of the format" bounds for creating objects in the file */ + ret = H5Pset_format_bounds(fapl2, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST); + CHECK(ret, FAIL, "H5Pset_format_bounds"); /* Create a default file creation property list */ fcpl = H5Pcreate(H5P_FILE_CREATE); diff --git a/test/th5o.c b/test/th5o.c index d913e47..fec845d 100644 --- a/test/th5o.c +++ b/test/th5o.c @@ -581,9 +581,9 @@ test_h5o_plist(void) fapl = H5Pcreate(H5P_FILE_ACCESS); CHECK(fapl, FAIL, "H5Pcreate"); - /* Set the "use the latest version of the format" flag for creating objects in the file */ - ret = H5Pset_latest_format(fapl, TRUE); - CHECK(ret, FAIL, "H5Pset_latest_format"); + /* Set the "use the latest version of the format" bounds for creating objects in the file */ + ret = H5Pset_format_bounds(fapl, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST); + CHECK(ret, FAIL, "H5Pset_format_bounds"); /* Create a new HDF5 file */ fid = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); @@ -796,13 +796,13 @@ test_h5o_link(void) /* Loop over using new group format */ for(new_format = FALSE; new_format <= TRUE; new_format++) { - /* Make a FAPL that uses the "use the latest version of the format" flag */ + /* Make a FAPL that uses the "use the latest version of the format" bounds */ fapl_id = H5Pcreate(H5P_FILE_ACCESS); CHECK(fapl_id, FAIL, "H5Pcreate"); - /* Set the "use the latest version of the format" flag for creating objects in the file */ - ret = H5Pset_latest_format(fapl_id, new_format); - CHECK(ret, FAIL, "H5Pset_latest_format"); + /* Set the "use the latest version of the format" bounds for creating objects in the file */ + ret = H5Pset_format_bounds(fapl_id, (new_format ? H5F_FORMAT_LATEST : H5F_FORMAT_EARLIEST), H5F_FORMAT_LATEST); + CHECK(ret, FAIL, "H5Pset_format_bounds"); /* Create a new HDF5 file */ file_id = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id); diff --git a/test/titerate.c b/test/titerate.c index 8df1563..63eb84f 100644 --- a/test/titerate.c +++ b/test/titerate.c @@ -934,9 +934,9 @@ test_iterate(void) fapl2 = H5Pcopy(fapl); CHECK(fapl2, FAIL, "H5Pcopy"); - /* Set the "use the latest version of the format" flag for creating objects in the file */ - ret = H5Pset_latest_format(fapl2, TRUE); - CHECK(ret, FAIL, "H5Pset_latest_format"); + /* Set the "use the latest version of the format" bounds for creating objects in the file */ + ret = H5Pset_format_bounds(fapl2, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST); + CHECK(ret, FAIL, "H5Pset_format_bounds"); /* These next tests use the same file */ for(new_format = FALSE; new_format <= TRUE; new_format++) { diff --git a/test/tmisc.c b/test/tmisc.c index df950ea..cc4e5ec 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -4601,8 +4601,8 @@ test_misc25c(void) /* Compose file access property list */ fapl = H5Pcreate(H5P_FILE_ACCESS); CHECK(fapl, FAIL, "H5Pcreate"); - ret = H5Pset_latest_format(fapl, 1); - CHECK(ret, FAIL, "H5Pset_latest_format"); + ret = H5Pset_format_bounds(fapl, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST); + CHECK(ret, FAIL, "H5Pset_format_bounds"); /* Create the file */ fid = H5Fcreate(MISC25C_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); diff --git a/test/unlink.c b/test/unlink.c index 7ebfc35..235f763 100644 --- a/test/unlink.c +++ b/test/unlink.c @@ -2441,8 +2441,8 @@ main(void) /* Copy the file access property list */ if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR - /* Set the "use the latest version of the format" flag for creating objects in the file */ - if(H5Pset_latest_format(fapl2, TRUE) < 0) TEST_ERROR + /* Set the "use the latest version of the format" bounds for creating objects in the file */ + if(H5Pset_format_bounds(fapl2, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST) < 0) TEST_ERROR /* Test with old & new format groups */ for(new_format = FALSE; new_format <= TRUE; new_format++) { |