summaryrefslogtreecommitdiffstats
path: root/src/H5Sselect.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1998-07-24 20:46:19 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1998-07-24 20:46:19 (GMT)
commit3a6a09d4fd01762c9ea32f3935887a91f0df6dab (patch)
treef56115d9c09e61c8afe5ca24e1ca73c11d027dad /src/H5Sselect.c
parentca426e2f32b0332a05e63b5e2820acfffef5efd9 (diff)
downloadhdf5-3a6a09d4fd01762c9ea32f3935887a91f0df6dab.zip
hdf5-3a6a09d4fd01762c9ea32f3935887a91f0df6dab.tar.gz
hdf5-3a6a09d4fd01762c9ea32f3935887a91f0df6dab.tar.bz2
[svn-r544] Added code for H5Sselect_none call.
Diffstat (limited to 'src/H5Sselect.c')
-rw-r--r--src/H5Sselect.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index 7ef9bca..7f7650b 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -530,6 +530,50 @@ done:
/*--------------------------------------------------------------------------
NAME
+ H5Sselect_none
+ PURPOSE
+ Specify that nothing is selected in the extent
+ USAGE
+ herr_t H5Sselect_elements(dsid)
+ hid_t dsid; IN: Dataspace ID of selection to modify
+ RETURNS
+ SUCCEED/FAIL
+ DESCRIPTION
+ This function de-selects the entire extent for a dataspace.
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+herr_t H5Sselect_none (hid_t spaceid)
+{
+ H5S_t *space = NULL; /* Dataspace to modify selection of */
+ herr_t ret_value=FAIL; /* return value */
+
+ FUNC_ENTER (H5Sselect_none, FAIL);
+
+ /* Check args */
+ if (H5_DATASPACE != H5I_group(spaceid) ||
+ NULL == (space=H5I_object(spaceid))) {
+ HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space");
+ }
+
+ /* Remove current selection first */
+ if(H5S_select_release(space)<0) {
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL,
+ "can't release hyperslab");
+ } /* end if */
+
+ /* Set selection type */
+ space->select.type=H5S_SEL_NONE;
+ ret_value=SUCCEED;
+
+done:
+ FUNC_LEAVE (ret_value);
+} /* H5Sselect_none() */
+
+/*--------------------------------------------------------------------------
+ NAME
H5Sselect_npoints
PURPOSE
Get the number of elements in current selection