summaryrefslogtreecommitdiffstats
path: root/src/H5Aint.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-07-19 14:47:13 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-07-19 14:47:13 (GMT)
commit0bbdb70ed7ef9173cce7492bc0c7679367e71d44 (patch)
tree911a6df6808abb87b4ed2c92b5f45714dd8c936e /src/H5Aint.c
parentc55d0f4e1e09e813fec5fcaa0541150c1ee2a36f (diff)
downloadhdf5-0bbdb70ed7ef9173cce7492bc0c7679367e71d44.zip
hdf5-0bbdb70ed7ef9173cce7492bc0c7679367e71d44.tar.gz
hdf5-0bbdb70ed7ef9173cce7492bc0c7679367e71d44.tar.bz2
[svn-r13989] Description:
Rename H5A_get_version() to H5A_set_version() and actually set the attributes version in the routine. Tested on: Mac OS X/32 10.4.10 (amazon) FreeBSD/32 6.2 (duty) Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5Aint.c')
-rw-r--r--src/H5Aint.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/H5Aint.c b/src/H5Aint.c
index f57bd6b..6293797 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -671,14 +671,14 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5A_get_version
+ * Function: H5A_set_version
*
- * Purpose: Retrieves the correct version to encode attribute with.
+ * Purpose: Sets the correct version to encode attribute with.
* Chooses the oldest version possible, unless the "use the
* latest format" flag is set.
*
- * Return: Success: Version to encode attribute with.
- * Failure: Can't fail
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
@@ -686,14 +686,13 @@ done:
*
*-------------------------------------------------------------------------
*/
-unsigned
-H5A_get_version(const H5F_t *f, const H5A_t *attr)
+herr_t
+H5A_set_version(const H5F_t *f, H5A_t *attr)
{
hbool_t type_shared, space_shared; /* Flags to indicate that shared messages are used for this attribute */
hbool_t use_latest_format; /* Flag indicating the newest file format should be used */
- unsigned ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5A_get_version)
+ FUNC_ENTER_NOAPI_NOFUNC(H5A_set_version)
/* check arguments */
HDassert(f);
@@ -715,14 +714,14 @@ H5A_get_version(const H5F_t *f, const H5A_t *attr)
/* Check which version to encode attribute with */
if(use_latest_format)
- ret_value = H5O_ATTR_VERSION_LATEST; /* Write out latest version of format */
+ attr->version = H5O_ATTR_VERSION_LATEST; /* Write out latest version of format */
else if(attr->encoding != H5T_CSET_ASCII)
- ret_value = H5O_ATTR_VERSION_3; /* Write version which includes the character encoding */
+ attr->version = H5O_ATTR_VERSION_3; /* Write version which includes the character encoding */
else if(type_shared || space_shared)
- ret_value = H5O_ATTR_VERSION_2; /* Write out version with flag for indicating shared datatype or dataspace */
+ attr->version = H5O_ATTR_VERSION_2; /* Write out version with flag for indicating shared datatype or dataspace */
else
- ret_value = H5O_ATTR_VERSION_1; /* Write out basic version */
+ attr->version = H5O_ATTR_VERSION_1; /* Write out basic version */
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5A_get_version() */
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5A_set_version() */