From 3ca1c8b1313a8c9f7759299dc6071b2f51993f26 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Thu, 23 Jul 1998 14:02:54 -0500 Subject: [svn-r532] Added code for H5Sextent_class (renamed H5Sget_class) --- src/H5S.c | 40 +++++++++++++++++++++++++++++++++++++++- src/H5Spublic.h | 1 + src/H5public.h | 2 +- 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) -- cgit v0.12