diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2002-09-04 15:50:12 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2002-09-04 15:50:12 (GMT) |
commit | d3f2e1bdff0eb5276214270a4ead9a06d22febe7 (patch) | |
tree | a78f5f3054605ca3b07043dd526876c1cb0fe70e /src/H5T.c | |
parent | 46d9c62ba1181f8a803c7e26ab40307fb6f6d444 (diff) | |
download | hdf5-d3f2e1bdff0eb5276214270a4ead9a06d22febe7.zip hdf5-d3f2e1bdff0eb5276214270a4ead9a06d22febe7.tar.gz hdf5-d3f2e1bdff0eb5276214270a4ead9a06d22febe7.tar.bz2 |
[svn-r5911]
Purpose:
bug fix in 'ID to name' function
Description:
the function replace_name was only checking for immutable datatypes
Solution:
added a new function H5T_is_named, that checks for named datatypes
Platforms tested:
windows 2000, linux, solaris with Fortran
Diffstat (limited to 'src/H5T.c')
-rw-r--r-- | src/H5T.c | 46 |
1 files changed, 44 insertions, 2 deletions
@@ -7512,7 +7512,7 @@ done: /*------------------------------------------------------------------------- * Function: H5T_is_immutable * - * Purpose: Check is a datatype is immutable. + * Purpose: Check if a datatype is immutable. * * Return: TRUE * @@ -7522,6 +7522,9 @@ done: * Friday, Dec 7, 2001 * * Modifications: + * Pedro Vicente + * Tuesday, Sep 3, 2002 + * Added 'else' * *------------------------------------------------------------------------- */ @@ -7535,12 +7538,51 @@ H5T_is_immutable(H5T_t *dt) assert(dt); if(dt->state == H5T_STATE_IMMUTABLE) - ret_value = TRUE; + ret_value = TRUE; + else + ret_value = FALSE; + +done: + FUNC_LEAVE(ret_value); +} + +/*------------------------------------------------------------------------- + * Function: H5T_is_named + * + * Purpose: Check if a datatype is named. + * + * Return: TRUE + * + * FALSE + * + * Programmer: Pedro Vicente + * Tuesday, Sep 3, 2002 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ + +htri_t +H5T_is_named(H5T_t *dt) +{ + htri_t ret_value = FALSE; + + FUNC_ENTER_NOAPI(H5T_is_named, FAIL); + + assert(dt); + + if( dt->state == H5T_STATE_OPEN || dt->state == H5T_STATE_NAMED ) + ret_value = TRUE; + else + ret_value = FALSE; done: FUNC_LEAVE(ret_value); } + + /*-------------------------------------------------------------------------- NAME |