summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>1998-06-18 16:12:52 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>1998-06-18 16:12:52 (GMT)
commitd6f7fda058353212449fce012787d0d46d866f2f (patch)
tree6d01570382ac1a7eb9445c6898ad57aba916b78e /src/H5S.c
parentdd23059807cd092c50747479141be92a8fd80813 (diff)
downloadhdf5-d6f7fda058353212449fce012787d0d46d866f2f.zip
hdf5-d6f7fda058353212449fce012787d0d46d866f2f.tar.gz
hdf5-d6f7fda058353212449fce012787d0d46d866f2f.tar.bz2
[svn-r431] H5Sget_dims:
Added maxdims agrument to H5Sget_dims. Also removed the check of dims since H5Sget_dims can still return ndims even if both *dims and *maxdims are NULLs.
Diffstat (limited to 'src/H5S.c')
-rw-r--r--src/H5S.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/H5S.c b/src/H5S.c
index 7923f31..7969c04 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -657,8 +657,8 @@ H5S_get_ndims(const H5S_t *ds)
/*-------------------------------------------------------------------------
* Function: H5Sget_dims
*
- * Purpose: Returns the size in each dimension of a data space DS through
- * the DIMS argument.
+ * Purpose: Returns the size and maximum sizes in each dimension of
+ * a data space DS through the DIMS and MAXDIMS arguments.
*
* Return: Success: Number of dimensions, the same value as
* returned by H5Sget_ndims().
@@ -669,11 +669,15 @@ H5S_get_ndims(const H5S_t *ds)
* Thursday, December 11, 1997
*
* Modifications:
+ * June 18, 1998 Albert Cheng
+ * Added maxdims argument. Removed dims argument check
+ * since it can still return ndims even if both dims and
+ * maxdims are NULLs.
*
*-------------------------------------------------------------------------
*/
int
-H5Sget_dims (hid_t space_id, hsize_t dims[]/*out*/)
+H5Sget_dims(hid_t space_id, hsize_t dims[]/*out*/, hsize_t maxdims[]/*out*/)
{
H5S_t *ds = NULL;
intn ret_value = 0;
@@ -686,10 +690,7 @@ H5Sget_dims (hid_t space_id, hsize_t dims[]/*out*/)
NULL == (ds = H5I_object(space_id))) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space");
}
- if (!dims) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no output buffer");
- }
- ret_value = H5S_get_dims(ds, dims, NULL);
+ ret_value = H5S_get_dims(ds, dims, maxdims);
FUNC_LEAVE(ret_value);
}