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/istore.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/istore.c')
-rw-r--r-- | test/istore.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/test/istore.c b/test/istore.c index 657e150..dfe5c41 100644 --- a/test/istore.c +++ b/test/istore.c @@ -123,24 +123,24 @@ new_object(hid_t f, const char *name, int ndims, hsize_t dims[], hsize_t cdims[] hid_t dcpl; /* Dataset creation property list ID */ /* Create the dataset creation property list */ - if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) TEST_ERROR; + if ((dcpl=H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR; /* Set the chunk dimensions */ if(H5Pset_chunk(dcpl, ndims, cdims) < 0) TEST_ERROR; /* Create the dataspace */ - if((space = H5Screate_simple(ndims, dims, NULL))<0) TEST_ERROR; + if((space = H5Screate_simple(ndims, dims, NULL)) < 0) TEST_ERROR; /* Create the dataset */ - if((dataset = H5Dcreate (f, name, TEST_DATATYPE, space, dcpl))<0) TEST_ERROR; + if((dataset = H5Dcreate2(f, name, TEST_DATATYPE, space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) TEST_ERROR; /* Clean up */ /* Close property lists */ - if(H5Pclose(dcpl)<0) TEST_ERROR; + if(H5Pclose(dcpl) < 0) TEST_ERROR; /* Close dataspace */ - if(H5Sclose(space)<0) TEST_ERROR; + if(H5Sclose(space) < 0) TEST_ERROR; return dataset; @@ -187,7 +187,7 @@ test_create(hid_t f, const char *prefix) return FAIL; /* Close dataset created */ - if(H5Dclose(dataset)<0) + if(H5Dclose(dataset) < 0) return FAIL; } @@ -268,7 +268,7 @@ test_extend(hid_t f, const char *prefix, } /* Get dataset's dataspace */ - if((fspace=H5Dget_space(dataset))<0) TEST_ERROR; + if((fspace=H5Dget_space(dataset)) < 0) TEST_ERROR; for (ctr = 0; H5V_vector_lt_u((unsigned)ndims, max_corner, whole_size); @@ -316,13 +316,13 @@ test_extend(hid_t f, const char *prefix, HDmemset(buf, (signed)(128+ctr), (size_t)nelmts); /* Create dataspace for selection in memory */ - if((mspace=H5Screate_simple(1,&nelmts,NULL))<0) TEST_ERROR; + if((mspace=H5Screate_simple(1,&nelmts,NULL)) < 0) TEST_ERROR; /* Select region in file dataspace */ - if(H5Sselect_hyperslab(fspace,H5S_SELECT_SET,offset,NULL,size,NULL)<0) TEST_ERROR; + if(H5Sselect_hyperslab(fspace,H5S_SELECT_SET,offset,NULL,size,NULL) < 0) TEST_ERROR; /* Write to disk */ - if (H5Dwrite(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, buf)<0) { + if (H5Dwrite(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, buf) < 0) { H5_FAILED(); fprintf(stderr," Write failed: ctr=%lu\n", (unsigned long)ctr); goto error; @@ -330,7 +330,7 @@ test_extend(hid_t f, const char *prefix, /* Read from disk */ HDmemset(check, 0xff, (size_t)nelmts); - if (H5Dread(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, check)<0) { + if (H5Dread(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, check) < 0) { H5_FAILED(); fprintf(stderr," Read failed: ctr=%lu\n", (unsigned long)ctr); goto error; @@ -348,7 +348,7 @@ test_extend(hid_t f, const char *prefix, } /* Close memory dataspace */ - if(H5Sclose(mspace)<0) TEST_ERROR; + if(H5Sclose(mspace) < 0) TEST_ERROR; /* Write to `whole' buffer for later checking */ H5V_hyper_copy((unsigned)ndims, size, @@ -362,7 +362,7 @@ test_extend(hid_t f, const char *prefix, /* Now read the entire array back out and check it */ HDmemset(buf, 0xff, nx * ny * nz); - if (H5Dread(dataset, TEST_DATATYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf)<0) { + if (H5Dread(dataset, TEST_DATATYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) { H5_FAILED(); fprintf(stderr," Read failed for whole array.\n"); goto error; @@ -390,10 +390,10 @@ test_extend(hid_t f, const char *prefix, } /* Close dataset's dataspace */ - if(H5Sclose(fspace)<0) TEST_ERROR; + if(H5Sclose(fspace) < 0) TEST_ERROR; /* Close dataset */ - if(H5Dclose(dataset)<0) TEST_ERROR; + if(H5Dclose(dataset) < 0) TEST_ERROR; /* Free memory used */ HDfree(buf); @@ -482,10 +482,10 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks, } /* Get dataset's dataspace */ - if((fspace=H5Dget_space(dataset))<0) TEST_ERROR; + if((fspace=H5Dget_space(dataset)) < 0) TEST_ERROR; /* Create dataspace for memory buffer */ - if((mspace=H5Screate_simple(ndims,size,NULL))<0) TEST_ERROR; + if((mspace=H5Screate_simple(ndims,size,NULL)) < 0) TEST_ERROR; for (ctr=0; ctr<nblocks; ctr++) { offset[0] = (hsize_t)(HDrandom() % (TEST_SPARSE_SIZE-nx)); @@ -493,10 +493,10 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks, offset[2] = (hsize_t)(HDrandom() % (TEST_SPARSE_SIZE-nz)); /* Select region in file dataspace */ - if(H5Sselect_hyperslab(fspace,H5S_SELECT_SET,offset,NULL,size,NULL)<0) TEST_ERROR; + if(H5Sselect_hyperslab(fspace,H5S_SELECT_SET,offset,NULL,size,NULL) < 0) TEST_ERROR; /* write to disk */ - if (H5Dwrite(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, buf)<0) { + if (H5Dwrite(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, buf) < 0) { H5_FAILED(); printf(" Write failed: ctr=%lu\n", (unsigned long)ctr); printf(" offset=(%lu", (unsigned long) (offset[0])); @@ -521,13 +521,13 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks, } /* Close memory dataspace */ - if(H5Sclose(mspace)<0) TEST_ERROR; + if(H5Sclose(mspace) < 0) TEST_ERROR; /* Close dataset's dataspace */ - if(H5Sclose(fspace)<0) TEST_ERROR; + if(H5Sclose(fspace) < 0) TEST_ERROR; /* Close dataset */ - if(H5Dclose(dataset)<0) TEST_ERROR; + if(H5Dclose(dataset) < 0) TEST_ERROR; HDfree(buf); PASSED(); @@ -613,7 +613,7 @@ main(int argc, char *argv[]) /* Create the test file */ h5_fixname(FILENAME[0], fapl, filename, sizeof filename); - if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl))<0) { + if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) { printf("Cannot create file %s; test aborted\n", filename); exit(1); } @@ -628,7 +628,7 @@ main(int argc, char *argv[]) addr = 8 * ((uint64_t)1<<30); /*8 GB */ f=H5I_object(file); - if (H5FDset_eoa(f->shared->lf, H5FD_MEM_DEFAULT, addr)<0) { + if (H5FDset_eoa(f->shared->lf, H5FD_MEM_DEFAULT, addr) < 0) { printf("Cannot create large file family\n"); exit(1); } |