summaryrefslogtreecommitdiffstats
path: root/src
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
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')
-rw-r--r--src/H5S.c40
-rw-r--r--src/H5Spublic.h1
-rw-r--r--src/H5public.h2
3 files changed, 41 insertions, 2 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);
+}
/*-------------------------------------------------------------------------
diff --git a/src/H5Spublic.h b/src/H5Spublic.h
index 6a842de..2554f7c 100644
--- a/src/H5Spublic.h
+++ b/src/H5Spublic.h
@@ -61,6 +61,7 @@ herr_t H5Sselect_hyperslab (hid_t space_id, H5S_seloper_t op,
const hsize_t count[], const hsize_t _block[]);
herr_t H5Sselect_elements (hid_t space_id, H5S_seloper_t op, size_t num_elemn,
const hssize_t **coord);
+H5S_class_t H5Sget_class (hid_t space_id);
#ifdef __cplusplus
}
diff --git a/src/H5public.h b/src/H5public.h
index 641c6de..55b76f8 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -27,7 +27,7 @@
/* Version numbers */
#define H5_VERS_MAJOR 1 /* For major interface/format changes */
#define H5_VERS_MINOR 0 /* For minor interface/format changes */
-#define H5_VERS_RELEASE 28 /* For tweaks, bug-fixes, or development */
+#define H5_VERS_RELEASE 30 /* For tweaks, bug-fixes, or development */
#define H5check() H5vers_check(H5_VERS_MAJOR,H5_VERS_MINOR, \
H5_VERS_RELEASE)