summaryrefslogtreecommitdiffstats
path: root/src/H5Sall.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2000-04-04 21:00:31 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2000-04-04 21:00:31 (GMT)
commit02e4ee5edf5d1c8fe285497def5cd7b7afbf77e4 (patch)
tree4b36327c0da85d62ea116da32d0f114700d0f6c9 /src/H5Sall.c
parent7170bbbc96f2b29f42be53f8271fc359f617e09c (diff)
downloadhdf5-02e4ee5edf5d1c8fe285497def5cd7b7afbf77e4.zip
hdf5-02e4ee5edf5d1c8fe285497def5cd7b7afbf77e4.tar.gz
hdf5-02e4ee5edf5d1c8fe285497def5cd7b7afbf77e4.tar.bz2
[svn-r2073] Added free-list code to the library and took out the older "temporary buffer"
code, since the functionality was superceded. See the followup document for details on the free-list code.
Diffstat (limited to 'src/H5Sall.c')
-rw-r--r--src/H5Sall.c79
1 files changed, 79 insertions, 0 deletions
diff --git a/src/H5Sall.c b/src/H5Sall.c
index 525e9e2..d7b2c2d 100644
--- a/src/H5Sall.c
+++ b/src/H5Sall.c
@@ -43,6 +43,7 @@ static size_t H5S_all_mgath (const void *_buf, size_t elmt_size,
static herr_t H5S_all_mscat (const void *_tconv_buf, size_t elmt_size,
const H5S_t *mem_space, H5S_sel_iter_t *mem_iter,
size_t nelmts, void *_buf/*out*/);
+static herr_t H5S_select_all(H5S_t *space);
const H5S_fconv_t H5S_ALL_FCONV[1] = {{
"all", /*name */
@@ -931,6 +932,84 @@ H5S_all_bounds(H5S_t *space, hsize_t *start, hsize_t *end)
/*--------------------------------------------------------------------------
NAME
+ H5S_select_all
+ PURPOSE
+ Specify the the entire extent is selected
+ USAGE
+ herr_t H5S_select_all(dsid)
+ hid_t dsid; IN: Dataspace ID of selection to modify
+ RETURNS
+ Non-negative on success/Negative on failure
+ DESCRIPTION
+ This function selects the entire extent for a dataspace.
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+static herr_t H5S_select_all (H5S_t *space)
+{
+ herr_t ret_value=SUCCEED; /* return value */
+
+ FUNC_ENTER (H5S_select_all, FAIL);
+
+ /* Check args */
+ assert(space);
+
+ /* Remove current selection first */
+ if(H5S_select_release(space)<0) {
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release selection");
+ } /* end if */
+
+ /* Set selection type */
+ space->select.type=H5S_SEL_ALL;
+
+done:
+ FUNC_LEAVE (ret_value);
+} /* H5S_select_all() */
+
+
+/*--------------------------------------------------------------------------
+ NAME
+ H5Sselect_all
+ PURPOSE
+ Specify the the entire extent is selected
+ USAGE
+ herr_t H5Sselect_all(dsid)
+ hid_t dsid; IN: Dataspace ID of selection to modify
+ RETURNS
+ Non-negative on success/Negative on failure
+ 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=SUCCEED; /* return value */
+
+ FUNC_ENTER (H5Sselect_all, FAIL);
+
+ /* Check args */
+ if (H5I_DATASPACE != H5I_get_type(spaceid) || NULL == (space=H5I_object(spaceid))) {
+ HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space");
+ }
+
+ /* Remove current selection first */
+ if((ret_value=H5S_select_all(space))<0) {
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection");
+ } /* end if */
+
+done:
+ FUNC_LEAVE (ret_value);
+} /* H5Sselect_all() */
+
+
+/*--------------------------------------------------------------------------
+ NAME
H5S_all_select_iterate
PURPOSE
Iterate over a "all" selection, calling a user's function for each