summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1998-07-23 19:02:54 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1998-07-23 19:02:54 (GMT)
commit3ca1c8b1313a8c9f7759299dc6071b2f51993f26 (patch)
tree47bd010a8a999fa4dc71f19d3f4746c9e3eb690a /src/H5S.c
parentd4088f3610ec835056041948bf0cc917d8e6f602 (diff)
downloadhdf5-3ca1c8b1313a8c9f7759299dc6071b2f51993f26.zip
hdf5-3ca1c8b1313a8c9f7759299dc6071b2f51993f26.tar.gz
hdf5-3ca1c8b1313a8c9f7759299dc6071b2f51993f26.tar.bz2
[svn-r532] Added code for H5Sextent_class (renamed H5Sget_class)
Diffstat (limited to 'src/H5S.c')
-rw-r--r--src/H5S.c40
1 files changed, 39 insertions, 1 deletions
diff --git a/src/H5S.c b/src/H5S.c
index 5cb084e..33a0a45 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -707,7 +707,7 @@ H5Sextent_dims (hid_t space_id, hsize_t dims[]/*out*/, hsize_t maxdims[]/*out*/)
/* Check args */
if (H5_DATASPACE != H5I_group(space_id) || NULL == (ds = H5I_object(space_id))) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space");
+ HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace");
}
ret_value = H5S_extent_dims(ds, dims, maxdims);
@@ -1435,6 +1435,44 @@ H5Screate_simple (int rank, const hsize_t dims[/*rank*/],
if (ret_value<0 && space) H5S_close(space);
FUNC_LEAVE(ret_value);
}
+
+/*-------------------------------------------------------------------------
+ * Function: H5Sextent_class
+ *
+ * Purpose: Retrieves the type of extent for a dataspace object
+ *
+ * Return: Success: The class of the dataspace object
+ *
+ * Failure: N5S_NO_CLASS
+ *
+ * Errors:
+ *
+ * Programmer: Quincey Koziol
+ * Thursday, July 23, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+H5S_class_t
+H5Sextent_class (hid_t sid)
+{
+ H5S_class_t ret_value = H5S_NO_CLASS;
+ H5S_t *space = NULL;
+
+ FUNC_ENTER(H5Sextent_class, FAIL);
+ H5TRACE1("Sc","i",sid);
+
+ /* Check arguments */
+ if (H5_DATASPACE != H5I_group(sid) || NULL == (space = H5I_object(sid))) {
+ HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace");
+ }
+
+ ret_value=space->extent.type;
+
+ done:
+ FUNC_LEAVE(ret_value);
+}
/*-------------------------------------------------------------------------