From ed85f64ee75de74373423f2848bc81c19b783db9 Mon Sep 17 00:00:00 2001 From: Robb Matzke Date: Mon, 10 Aug 1998 14:54:35 -0500 Subject: [svn-r585] Fixed Step 11 but didn't turn it on yet because of a failed assertion. --- test/cmpd_dset.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c index 4961eab..60219d0 100644 --- a/test/cmpd_dset.c +++ b/test/cmpd_dset.c @@ -153,7 +153,6 @@ main (void) static hsize_t dim[] = {NX, NY}; hssize_t f_offset[2]; /*offset of hyperslab in file */ hsize_t h_size[2]; /*size of hyperslab */ - hsize_t h_sample[2]; /*hyperslab sampling */ size_t memb_size[1] = {4}; /* Create the file */ @@ -586,20 +585,23 @@ STEP 10: Read middle third of hyperslab into middle third of memory array\n\ } } -#ifdef OLD_WAY /* *###################################################################### * Step 11: Write an array into the middle third of the dataset * initializeing only members `b' and `d' to -1. */ +#if 0 printf ("\ STEP 11: Write an array back to the middle third of the dataset to\n\ initialize the `b' and `d' members to -1.\n"); fflush (stdout); /* Create the memory array and initialize all fields to zero */ - ndims = H5Sget_hyperslab (s8_f_sid, f_offset, h_size, h_sample); - assert (ndims==2); + ndims = 2; + f_offset[0] = NX/3; + f_offset[1] = NY/3; + h_size[0] = 2*NX/3 - f_offset[0]; + h_size[1] = 2*NY/3 - f_offset[1]; s11 = malloc ((size_t)h_size[0]*(size_t)h_size[1]*sizeof(s4_t)); assert (s11); @@ -641,8 +643,7 @@ STEP 11: Write an array back to the middle third of the dataset to\n\ } } } -#endif /* OLD_WAY */ - +#endif -- cgit v0.12