diff options
author | Albert Cheng <acheng@hdfgroup.org> | 1998-06-18 16:12:52 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 1998-06-18 16:12:52 (GMT) |
commit | d6f7fda058353212449fce012787d0d46d866f2f (patch) | |
tree | 6d01570382ac1a7eb9445c6898ad57aba916b78e | |
parent | dd23059807cd092c50747479141be92a8fd80813 (diff) | |
download | hdf5-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.
-rw-r--r-- | src/H5S.c | 15 | ||||
-rw-r--r-- | src/H5Spublic.h | 2 |
2 files changed, 9 insertions, 8 deletions
@@ -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); } diff --git a/src/H5Spublic.h b/src/H5Spublic.h index a10852e..39b6502 100644 --- a/src/H5Spublic.h +++ b/src/H5Spublic.h @@ -43,7 +43,7 @@ hid_t H5Scopy (hid_t space_id); herr_t H5Sclose (hid_t space_id); hsize_t H5Sget_npoints (hid_t space_id); int H5Sget_ndims (hid_t space_id); -int H5Sget_dims (hid_t space_id, hsize_t dims[]); +int H5Sget_dims (hid_t space_id, hsize_t dims[], hsize_t maxdims[]); hbool_t H5Sis_simple (hid_t space_id); herr_t H5Sset_space (hid_t space_id, int rank, const hsize_t *dims); herr_t H5Sset_hyperslab(hid_t sid, const hssize_t *start, const hsize_t *count, |