summaryrefslogtreecommitdiffstats
path: root/src/H5Pencdec.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2013-12-26 15:34:33 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2013-12-26 15:34:33 (GMT)
commit8965bb188cab6e82eb3ac1ad1909f2ab4089c20b (patch)
treedb6dd26968b5c314e67ecc0410d63e9a46747615 /src/H5Pencdec.c
parent3c9424e67dc113ba89c281953f21d37ef3739fe2 (diff)
parent928d398be4143546e57c50788b429095328cb3ba (diff)
downloadhdf5-8965bb188cab6e82eb3ac1ad1909f2ab4089c20b.zip
hdf5-8965bb188cab6e82eb3ac1ad1909f2ab4089c20b.tar.gz
hdf5-8965bb188cab6e82eb3ac1ad1909f2ab4089c20b.tar.bz2
[svn-r24594] Merge from VOL branch.
Update plist encode/decode pre-generated files for newly added properties.
Diffstat (limited to 'src/H5Pencdec.c')
-rw-r--r--src/H5Pencdec.c70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/H5Pencdec.c b/src/H5Pencdec.c
index 149108e..9f3a1e8 100644
--- a/src/H5Pencdec.c
+++ b/src/H5Pencdec.c
@@ -184,6 +184,42 @@ H5P__encode_hsize_t(const void *value, void **_pp, size_t *size)
/*-------------------------------------------------------------------------
+ * Function: H5P__encode_uint32_t
+ *
+ * Purpose: Generic encoding callback routine for 'uint32_t' properties.
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ * Programmer: Mohamad Chaarawi
+ * August 07, 2012
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5P__encode_uint32_t(const void *value, void **_pp, size_t *size)
+{
+ uint8_t **pp = (uint8_t **)_pp;
+
+ FUNC_ENTER_PACKAGE_NOERR
+
+ /* Sanity checks */
+ HDassert(value);
+ HDassert(size);
+
+ if(NULL != *pp) {
+ /* Encode the value */
+ UINT32ENCODE(*pp, *(const uint32_t *)value);
+ } /* end if */
+
+ /* Set size needed for encoding */
+ *size += sizeof(uint32_t);
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5P__encode_uint32_t() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5P__encode_uint64_t
*
* Purpose: Generic encoding callback routine for 'uint64_t' properties.
@@ -587,6 +623,40 @@ H5P__decode_hsize_t(const void **_pp, void *_value)
/*-------------------------------------------------------------------------
+ * Function: H5P__decode_uint32_t
+ *
+ * Purpose: Generic encoding callback routine for 'uint32_t' properties.
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ * Programmer: Mohamad Chaarawi
+ * August 07, 2012
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5P__decode_uint32_t(const void **_pp, void *_value)
+{
+ uint32_t *value = (uint32_t *)_value; /* Property value to return */
+ const uint8_t **pp = (const uint8_t **)_pp;
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_PACKAGE
+
+ /* Sanity checks */
+ HDassert(pp);
+ HDassert(*pp);
+ HDassert(value);
+
+ UINT32DECODE(*pp, *value)
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5P__decode_uint32_t() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5P__decode_uint64_t
*
* Purpose: Generic encoding callback routine for 'uint64_t' properties.