mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-12-09 07:32:32 +08:00
[svn-r532] Added code for H5Sextent_class (renamed H5Sget_class)
This commit is contained in:
parent
d4088f3610
commit
3ca1c8b131
40
src/H5S.c
40
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);
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user