summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-04-29 03:22:55 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-04-29 03:22:55 (GMT)
commita9b2e360653988b417f390e0a66d486fa775f3a2 (patch)
treea80cb2c83dab88061999f05911ae6b98ea3f4cdc /examples
parentf3f74731619798b8e802987b01266348f1fbc027 (diff)
downloadhdf5-a9b2e360653988b417f390e0a66d486fa775f3a2.zip
hdf5-a9b2e360653988b417f390e0a66d486fa775f3a2.tar.gz
hdf5-a9b2e360653988b417f390e0a66d486fa775f3a2.tar.bz2
[svn-r26962] Add support for unlimited selections to VDS code.
Not tested (except for percival-unlim example) Fix percival-unlim example Other bug fixes/cleanup Tested: Fedora 64
Diffstat (limited to 'examples')
-rw-r--r--examples/h5_vds-percival-unlim.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/h5_vds-percival-unlim.c b/examples/h5_vds-percival-unlim.c
index 1911e6d..eaa83b4 100644
--- a/examples/h5_vds-percival-unlim.c
+++ b/examples/h5_vds-percival-unlim.c
@@ -13,7 +13,7 @@
#include <stdio.h>
#include <stdlib.h>
-#define FILE "vds-percival-unlim.h5"
+#define VFILE "vds-percival-unlim.h5"
#define DATASET "VDS-Percival-unlim"
#define VDSDIM0 H5S_UNLIMITED
#define VDSDIM1 10
@@ -100,7 +100,7 @@ main (void)
status = H5Fclose (file);
}
- file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ vfile = H5Fcreate (VFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* Create VDS dataspace. */
vspace = H5Screate_simple (RANK, vdsdims, vdsdims_max);
@@ -147,6 +147,7 @@ main (void)
dcpl, H5P_DEFAULT);
status = H5Sclose (vspace);
status = H5Sclose (src_space);
+ status = H5Pclose (dcpl);
/* Let's get space of the VDS and its dimension; we should get 40x10x10 */
vspace = H5Dget_space (vdset);
H5Sget_simple_extent_dims (vspace, vdsdims_out, vdsdims_max_out);
@@ -188,13 +189,12 @@ main (void)
status = H5Dwrite (dset, H5T_NATIVE_INT, mem_space, src_space, H5P_DEFAULT,
wdata);
status = H5Sclose (src_space);
- status = H5Pclose (dcpl);
status = H5Dclose (dset);
status = H5Fclose (file);
}
/* Let's get space of the VDS and its dimension; we should get 80x10x10 */
- vspace = H5Dget_space (dset);
+ vspace = H5Dget_space (vdset);
H5Sget_simple_extent_dims (vspace, vdsdims_out, vdsdims_max_out);
printf ("VDS dimensions second time \n");
printf (" Current: ");
@@ -212,7 +212,7 @@ main (void)
/*
* Open file and dataset using the default properties.
*/
- vfile = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
+ vfile = H5Fopen (VFILE, H5F_ACC_RDONLY, H5P_DEFAULT);
vdset = H5Dopen (vfile, DATASET, H5P_DEFAULT);
/*