summaryrefslogtreecommitdiffstats
path: root/src/H5Sselect.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-02-07 16:21:24 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-02-07 16:21:24 (GMT)
commit9d98d34210f52b97d7bef4e1eec3bd0c6d134b30 (patch)
treee72ac96ae05bc82427aecf27bf3fdb37dbc496cb /src/H5Sselect.c
parent1f3762ff88f9f9b0b7ce4ae177aee237830fde45 (diff)
downloadhdf5-9d98d34210f52b97d7bef4e1eec3bd0c6d134b30.zip
hdf5-9d98d34210f52b97d7bef4e1eec3bd0c6d134b30.tar.gz
hdf5-9d98d34210f52b97d7bef4e1eec3bd0c6d134b30.tar.bz2
[svn-r4914] Purpose:
Bug fix & feature add Description: Added new API function H5Sget_select_type to determine type of selection in a dataspace. Return values are defined by the H5S_sel_type enumerated type in H5Spublic.h Also, hyperslab operations involving a "all" or "none" selection are not generating the correct resulting selections. Solution: Added more code to make hyperslab operations against an "all" or "none" selection generate the correct results. Platforms tested: FreeBSD 4.5 (sleipnir)
Diffstat (limited to 'src/H5Sselect.c')
-rw-r--r--src/H5Sselect.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index 623aeea..9fc4149 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -1285,3 +1285,34 @@ H5S_select_iterate(void *buf, hid_t type_id, H5S_t *space, H5D_operator_t op,
FUNC_LEAVE(ret_value);
} /* end H5S_select_iterate() */
+
+/*--------------------------------------------------------------------------
+ NAME
+ H5Sget_select_type
+ PURPOSE
+ Retrieve the type of selection in a dataspace
+ USAGE
+ H5S_sel_type H5Sget_select_type(space_id)
+ hid_t space_id; IN: Dataspace object to reset
+ RETURNS
+ Non-negative on success/Negative on failure. Return value is from the
+ set of values in the H5S_sel_type enumerated type.
+ DESCRIPTION
+ This function retrieves the type of selection currently defined for
+ a dataspace.
+--------------------------------------------------------------------------*/
+H5S_sel_type
+H5Sget_select_type(hid_t space_id)
+{
+ H5S_t *space = NULL; /* dataspace to modify */
+
+ FUNC_ENTER(H5Sget_select_type, H5S_SEL_ERROR);
+ H5TRACE1("St","i",space_id);
+
+ /* Check args */
+ if (H5I_DATASPACE != H5I_get_type(space_id) || NULL == (space = H5I_object(space_id)))
+ HRETURN_ERROR(H5E_ATOM, H5E_BADATOM, H5S_SEL_ERROR, "not a data space");
+
+ FUNC_LEAVE(space->select.type);
+} /* end H5Sget_select_type() */
+