diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-11 16:24:11 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-11 16:24:11 (GMT) |
commit | d9e5ca72f39934531b534524d07cf784c3d0e613 (patch) | |
tree | 1913b13a317132523091035f1175b2291c8b9db7 /test/flush1.c | |
parent | 053807fa81579e6bd9ac6a701ddcaac39e4d0b87 (diff) | |
download | hdf5-d9e5ca72f39934531b534524d07cf784c3d0e613.zip hdf5-d9e5ca72f39934531b534524d07cf784c3d0e613.tar.gz hdf5-d9e5ca72f39934531b534524d07cf784c3d0e613.tar.bz2 |
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
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
Diffstat (limited to 'test/flush1.c')
-rw-r--r-- | test/flush1.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/flush1.c b/test/flush1.c index 04345e0..97ddf76 100644 --- a/test/flush1.c +++ b/test/flush1.c @@ -64,7 +64,7 @@ create_file(char* name, hid_t fapl) if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR if(H5Pset_chunk(dcpl, 2, ch_size) < 0) FAIL_STACK_ERROR if((space = H5Screate_simple(2, ds_size, NULL)) < 0) FAIL_STACK_ERROR - if((dset = H5Dcreate(file, "dset", H5T_NATIVE_FLOAT, space, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR + if((dset = H5Dcreate2(file, "dset", H5T_NATIVE_FLOAT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR /* Write some data */ for(i = 0; i < ds_size[0]; i++) @@ -82,7 +82,7 @@ create_file(char* name, hid_t fapl) for(i = 0; i < 100; i++) { sprintf(name, "grp%02u", (unsigned)i); if((grp = H5Gcreate2(groups, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - if(H5Gclose(grp)<0) FAIL_STACK_ERROR + if(H5Gclose(grp) < 0) FAIL_STACK_ERROR } /* end for */ return file; @@ -117,10 +117,10 @@ extend_file(hid_t file) size_t i, j; /* Create a chunked dataset */ - if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error; - if (H5Pset_chunk(dcpl, 2, ch_size)<0) goto error; - if ((space=H5Screate_simple(2, ds_size, NULL))<0) goto error; - if ((dset=H5Dcreate(file, "dset2", H5T_NATIVE_FLOAT, space, H5P_DEFAULT))<0) + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error; + if(H5Pset_chunk(dcpl, 2, ch_size) < 0) goto error; + if((space = H5Screate_simple(2, ds_size, NULL)) < 0) goto error; + if((dset = H5Dcreate2(file, "dset2", H5T_NATIVE_FLOAT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error; /* Write some data */ @@ -135,7 +135,7 @@ extend_file(hid_t file) } } if (H5Dwrite(dset, H5T_NATIVE_DOUBLE, space, space, H5P_DEFAULT, - the_data)<0) goto error; + the_data) < 0) goto error; return file; @@ -185,13 +185,13 @@ main(void) h5_fixname(FILENAME[0], fapl, name, sizeof name); file = create_file(name, fapl); /* Flush and exit without closing the library */ - if (H5Fflush(file, H5F_SCOPE_GLOBAL)<0) goto error; + if (H5Fflush(file, H5F_SCOPE_GLOBAL) < 0) goto error; /* Create the file */ h5_fixname(FILENAME[2], fapl, name, sizeof name); file = create_file(name, fapl); /* Flush and exit without closing the library */ - if (H5Fflush(file, H5F_SCOPE_GLOBAL)<0) goto error; + if(H5Fflush(file, H5F_SCOPE_GLOBAL) < 0) goto error; /* Add a bit to the file and don't flush the new part */ extend_file(file); |