summaryrefslogtreecommitdiffstats
path: root/src/H5T.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2002-09-04 15:50:12 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2002-09-04 15:50:12 (GMT)
commitd3f2e1bdff0eb5276214270a4ead9a06d22febe7 (patch)
treea78f5f3054605ca3b07043dd526876c1cb0fe70e /src/H5T.c
parent46d9c62ba1181f8a803c7e26ab40307fb6f6d444 (diff)
downloadhdf5-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.c46
1 files changed, 44 insertions, 2 deletions
diff --git a/src/H5T.c b/src/H5T.c
index 08f10f0..5206e5a 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -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