summaryrefslogtreecommitdiffstats
path: root/src/H5P.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1998-02-04 14:55:12 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1998-02-04 14:55:12 (GMT)
commit71be4b3cca41fef6771eec2a49fee66b12f7277b (patch)
treee5792dfb8f61d670cfd329f9d09e5f1ed21a5817 /src/H5P.c
parent8212bc94997aa0171e8fd5fd157fc4c84598a9d6 (diff)
downloadhdf5-71be4b3cca41fef6771eec2a49fee66b12f7277b.zip
hdf5-71be4b3cca41fef6771eec2a49fee66b12f7277b.tar.gz
hdf5-71be4b3cca41fef6771eec2a49fee66b12f7277b.tar.bz2
[svn-r216] Added (ifdef'ed out currently) support for creating scalar simple variables.
Diffstat (limited to 'src/H5P.c')
-rw-r--r--src/H5P.c31
1 files changed, 21 insertions, 10 deletions
diff --git a/src/H5P.c b/src/H5P.c
index a9a1dd6..f27b137 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -136,19 +136,30 @@ H5Pcreate_simple(int rank, const size_t *dims, const size_t *maxdims)
/* Create a new data space */
ds = H5MM_xcalloc(1, sizeof(H5P_t));
- ds->type = H5P_SIMPLE;
- ds->hslab_def = FALSE; /* no hyperslab defined currently */
+#ifdef LATER /* QAK */
+ if(rank>0) /* for creating simple dataspace */
+ {
+#endif /* LATER */
+ ds->type = H5P_SIMPLE;
+ ds->hslab_def = FALSE; /* no hyperslab defined currently */
- /* Initialize rank and dimensions */
- ds->u.simple.rank = rank;
+ /* Initialize rank and dimensions */
+ ds->u.simple.rank = rank;
- ds->u.simple.size = H5MM_xcalloc(1, rank*sizeof(size_t));
- HDmemcpy(ds->u.simple.size, dims, rank*sizeof(size_t));
+ ds->u.simple.size = H5MM_xcalloc(1, rank*sizeof(size_t));
+ HDmemcpy(ds->u.simple.size, dims, rank*sizeof(size_t));
- if (maxdims) {
- ds->u.simple.max = H5MM_xcalloc(1, rank*sizeof(size_t));
- HDmemcpy (ds->u.simple.max, maxdims, rank*sizeof(size_t));
- }
+ if (maxdims) {
+ ds->u.simple.max = H5MM_xcalloc(1, rank*sizeof(size_t));
+ HDmemcpy (ds->u.simple.max, maxdims, rank*sizeof(size_t));
+ }
+#ifdef LATER /* QAK */
+ } /* end if */
+ else /* rank==0, for scalar data space */
+ {
+ ds->type = H5P_SCALAR;
+ } /* end else */
+#endif /* LATER */
/* Register the new data space and get an ID for it */
if ((ret_value = H5A_register(H5_DATASPACE, ds)) < 0) {