summaryrefslogtreecommitdiffstats
path: root/test/istore.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-04-25 18:02:17 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-04-25 18:02:17 (GMT)
commitfd6731e7cd2aeaf89d3363c15b365c23e81a1e2b (patch)
treecf9e8e5c40b26439681bcb64f2ee756a33701f7f /test/istore.c
parentd33f7d93a34d22b4f48e001426f78090d859a631 (diff)
downloadhdf5-fd6731e7cd2aeaf89d3363c15b365c23e81a1e2b.zip
hdf5-fd6731e7cd2aeaf89d3363c15b365c23e81a1e2b.tar.gz
hdf5-fd6731e7cd2aeaf89d3363c15b365c23e81a1e2b.tar.bz2
[svn-r5260] Purpose:
Code cleanup Description: Previously, the I/O pipeline (pline), external file list (efl) and fill- value (fill) structs were passed down the raw data function call chain, even into and/or through functions which didn't use them. Since all three of these pieces of information are available from the dataset creation property list, just pass the dataset creation property list down the function call chain and query for the information needed in a particular function. Platforms tested: FreeBSD 4.5 (sleipnir)
Diffstat (limited to 'test/istore.c')
-rw-r--r--test/istore.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/test/istore.c b/test/istore.c
index 800d27d..834c119 100644
--- a/test/istore.c
+++ b/test/istore.c
@@ -18,6 +18,7 @@
#include "H5Gprivate.h"
#include "H5MMprivate.h"
#include "H5Oprivate.h"
+#include "H5Pprivate.h"
#include "H5Vprivate.h"
const char *FILENAME[] = {
@@ -207,6 +208,7 @@ test_extend(H5F_t *f, const char *prefix,
hsize_t whole_size[3];
hsize_t nelmts;
H5O_layout_t layout;
+ H5P_genplist_t *dc_plist=NULL;
if (!nz) {
if (!ny) {
@@ -230,6 +232,12 @@ test_extend(H5F_t *f, const char *prefix,
check = H5MM_malloc(nx * ny * nz);
whole = H5MM_calloc(nx*ny*nz);
+ /* Get the default dataset creation property list */
+ if(NULL == (dc_plist = H5I_object(H5P_DATASET_CREATE_DEFAULT))) {
+ printf("not a dset creation property list\n");
+ goto error;
+ }
+
/* Build the new empty object */
sprintf(name, "%s_%s", prefix, dims);
if (new_object(f, name, ndims, &handle) < 0) {
@@ -299,7 +307,7 @@ test_extend(H5F_t *f, const char *prefix,
memset(buf, (signed)(128+ctr), (size_t)nelmts);
/* Write to disk */
- if (H5F_arr_write(f, H5P_DATASET_XFER_DEFAULT, &layout, NULL, NULL, NULL, size,
+ if (H5F_arr_write(f, H5P_DATASET_XFER_DEFAULT, &layout, dc_plist, size,
size, zero, offset, buf)<0) {
H5_FAILED();
printf(" Write failed: ctr=%lu\n", (unsigned long)ctr);
@@ -308,7 +316,7 @@ test_extend(H5F_t *f, const char *prefix,
/* Read from disk */
memset(check, 0xff, (size_t)nelmts);
- if (H5F_arr_read(f, H5P_DATASET_XFER_DEFAULT, &layout, NULL, NULL, NULL, size,
+ if (H5F_arr_read(f, H5P_DATASET_XFER_DEFAULT, &layout, dc_plist, size,
size, zero, offset, check)<0) {
H5_FAILED();
printf(" Read failed: ctr=%lu\n", (unsigned long)ctr);
@@ -339,7 +347,7 @@ test_extend(H5F_t *f, const char *prefix,
/* Now read the entire array back out and check it */
memset(buf, 0xff, nx * ny * nz);
- if (H5F_arr_read(f, H5P_DATASET_XFER_DEFAULT, &layout, NULL, NULL, NULL, whole_size,
+ if (H5F_arr_read(f, H5P_DATASET_XFER_DEFAULT, &layout, dc_plist, whole_size,
whole_size, zero, zero, buf)<0) {
H5_FAILED();
puts(" Read failed for whole array.");
@@ -410,6 +418,7 @@ test_sparse(H5F_t *f, const char *prefix, size_t nblocks,
H5G_entry_t handle;
H5O_layout_t layout;
uint8_t *buf = NULL;
+ H5P_genplist_t *dc_plist=NULL;
if (!nz) {
if (!ny) {
@@ -431,6 +440,13 @@ test_sparse(H5F_t *f, const char *prefix, size_t nblocks,
printf("%-70s", s);
buf = H5MM_malloc(nx * ny * nz);
+ /* Get the default dataset creation property list */
+ if(NULL == (dc_plist = H5I_object(H5P_DATASET_CREATE_DEFAULT))) {
+ printf("not a dset creation property list\n");
+ goto error;
+ }
+
+
/* Build the new empty object */
sprintf(name, "%s_%s", prefix, dims);
if (new_object(f, name, ndims, &handle) < 0) {
@@ -452,7 +468,7 @@ test_sparse(H5F_t *f, const char *prefix, size_t nblocks,
memset(buf, (signed)(128+ctr), nx * ny * nz);
/* write to disk */
- if (H5F_arr_write(f, H5P_DATASET_XFER_DEFAULT, &layout, NULL, NULL, NULL, size,
+ if (H5F_arr_write(f, H5P_DATASET_XFER_DEFAULT, &layout, dc_plist, size,
size, zero, offset, buf)<0) {
H5_FAILED();
printf(" Write failed: ctr=%lu\n", (unsigned long)ctr);