diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 1998-07-23 23:29:44 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 1998-07-23 23:29:44 (GMT) |
commit | 86a68d5e4671da7f5cbf0ca3274153ab139c19bb (patch) | |
tree | c871b58dcf827531b1115ef8f18d905f767bb402 /src/H5Sselect.c | |
parent | 451404ceeeb7bae6cad56a856d097a8ed3f69576 (diff) | |
download | hdf5-86a68d5e4671da7f5cbf0ca3274153ab139c19bb.zip hdf5-86a68d5e4671da7f5cbf0ca3274153ab139c19bb.tar.gz hdf5-86a68d5e4671da7f5cbf0ca3274153ab139c19bb.tar.bz2 |
[svn-r539] Added H5Sselect_all code
Diffstat (limited to 'src/H5Sselect.c')
-rw-r--r-- | src/H5Sselect.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 062b2a1..7ef9bca 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -486,6 +486,50 @@ done: /*-------------------------------------------------------------------------- NAME + H5Sselect_all + PURPOSE + Specify the the entire extent is selected + USAGE + herr_t H5Sselect_elements(dsid) + hid_t dsid; IN: Dataspace ID of selection to modify + RETURNS + SUCCEED/FAIL + DESCRIPTION + This function selects the entire extent for a dataspace. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +herr_t H5Sselect_all (hid_t spaceid) +{ + H5S_t *space = NULL; /* Dataspace to modify selection of */ + herr_t ret_value=FAIL; /* return value */ + + FUNC_ENTER (H5Sselect_all, 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_ALL; + ret_value=SUCCEED; + +done: + FUNC_LEAVE (ret_value); +} /* H5Sselect_all() */ + +/*-------------------------------------------------------------------------- + NAME H5Sselect_npoints PURPOSE Get the number of elements in current selection |