summaryrefslogtreecommitdiffstats
path: root/src/H5Omtime.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Omtime.c')
-rw-r--r--src/H5Omtime.c105
1 files changed, 39 insertions, 66 deletions
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index c61fa66..db1d8d7 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: Robb Matzke <matzke@llnl.gov>
@@ -29,20 +27,19 @@
#include "H5Opkg.h" /* Object headers */
-static void *H5O_mtime_new_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, const uint8_t *p);
+static void *H5O__mtime_new_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
+ unsigned *ioflags, size_t p_size, const uint8_t *p);
static herr_t H5O_mtime_new_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
static size_t H5O_mtime_new_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
-static void *H5O_mtime_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned mesg_flags, unsigned *ioflags, const uint8_t *p);
+static void *H5O__mtime_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
+ unsigned *ioflags, size_t p_size, const uint8_t *p);
static herr_t H5O_mtime_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
static void *H5O_mtime_copy(const void *_mesg, void *_dest);
static size_t H5O_mtime_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
-static herr_t H5O_mtime_reset(void *_mesg);
-static herr_t H5O_mtime_free(void *_mesg);
-static herr_t H5O_mtime_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream,
- int indent, int fwidth);
+static herr_t H5O__mtime_free(void *_mesg);
+static herr_t H5O__mtime_debug(H5F_t *f, const void *_mesg, FILE *stream,
+ int indent, int fwidth);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_MTIME[1] = {{
@@ -50,12 +47,12 @@ const H5O_msg_class_t H5O_MSG_MTIME[1] = {{
"mtime", /*message name for debugging */
sizeof(time_t), /*native message size */
0, /* messages are sharable? */
- H5O_mtime_decode, /*decode message */
+ H5O__mtime_decode, /*decode message */
H5O_mtime_encode, /*encode message */
H5O_mtime_copy, /*copy the native value */
H5O_mtime_size, /*raw message size */
- H5O_mtime_reset, /* reset method */
- H5O_mtime_free, /* free method */
+ NULL, /* reset method */
+ H5O__mtime_free, /* free method */
NULL, /* file delete method */
NULL, /* link method */
NULL, /*set share method */
@@ -65,7 +62,7 @@ const H5O_msg_class_t H5O_MSG_MTIME[1] = {{
NULL, /* post copy native value to file */
NULL, /* get creation index */
NULL, /* set creation index */
- H5O_mtime_debug /*debug the message */
+ H5O__mtime_debug /*debug the message */
}};
/* This message derives from H5O message class */
@@ -75,12 +72,12 @@ const H5O_msg_class_t H5O_MSG_MTIME_NEW[1] = {{
"mtime_new", /*message name for debugging */
sizeof(time_t), /*native message size */
0, /* messages are sharable? */
- H5O_mtime_new_decode, /*decode message */
+ H5O__mtime_new_decode, /*decode message */
H5O_mtime_new_encode, /*encode message */
H5O_mtime_copy, /*copy the native value */
H5O_mtime_new_size, /*raw message size */
- H5O_mtime_reset, /* reset method */
- H5O_mtime_free, /* free method */
+ NULL, /* reset method */
+ H5O__mtime_free, /* free method */
NULL, /* file delete method */
NULL, /* link method */
NULL, /*set share method */
@@ -90,7 +87,7 @@ const H5O_msg_class_t H5O_MSG_MTIME_NEW[1] = {{
NULL, /* post copy native value to file */
NULL, /* get creation index */
NULL, /* set creation index */
- H5O_mtime_debug /*debug the message */
+ H5O__mtime_debug /*debug the message */
}};
/* Current version of new mtime information */
@@ -101,7 +98,7 @@ H5FL_DEFINE(time_t);
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_new_decode
+ * Function: H5O__mtime_new_decode
*
* Purpose: Decode a new modification time message and return a pointer to
* a new time_t value.
@@ -120,14 +117,15 @@ H5FL_DEFINE(time_t);
*-------------------------------------------------------------------------
*/
static void *
-H5O_mtime_new_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p)
+H5O__mtime_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
+ size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
time_t *mesg;
uint32_t tmp_time; /* Temporary copy of the time */
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(f);
@@ -153,11 +151,11 @@ H5O_mtime_new_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_mtime_new_decode() */
+} /* end H5O__mtime_new_decode() */
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_decode
+ * Function: H5O__mtime_decode
*
* Purpose: Decode a modification time message and return a pointer to a
* new time_t value.
@@ -176,15 +174,16 @@ done:
*-------------------------------------------------------------------------
*/
static void *
-H5O_mtime_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh,
- unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p)
+H5O__mtime_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
+ unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
+ size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
time_t *mesg, the_time;
struct tm tm;
int i; /* Local index variable */
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(f);
@@ -217,7 +216,7 @@ H5O_mtime_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_mtime_decode() */
+} /* end H5O__mtime_decode() */
/*-------------------------------------------------------------------------
@@ -408,58 +407,32 @@ H5O_mtime_size(const H5F_t H5_ATTR_UNUSED * f, hbool_t H5_ATTR_UNUSED disable_sh
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_reset
+ * Function: H5O__mtime_free
*
- * Purpose: Frees resources within a modification time message, but doesn't free
- * the message itself.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Quincey Koziol
- * Mondey, December 23, 2002
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5O_mtime_reset(void H5_ATTR_UNUSED *_mesg)
-{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
-
- FUNC_LEAVE_NOAPI(SUCCEED)
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5O_mtime_free
- *
- * Purpose: Free's the message
+ * Purpose: Frees the message
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* Thursday, March 30, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_mtime_free(void *mesg)
+H5O__mtime_free(void *mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(mesg);
mesg = H5FL_FREE(time_t, mesg);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_mtime_free() */
+} /* end H5O__mtime_free() */
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_debug
+ * Function: H5O__mtime_debug
*
* Purpose: Prints debugging info for the message.
*
@@ -474,7 +447,7 @@ H5O_mtime_free(void *mesg)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_mtime_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE *stream,
+H5O__mtime_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream,
int indent, int fwidth)
{
const time_t *mesg = (const time_t *)_mesg;
@@ -498,5 +471,5 @@ H5O_mtime_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const voi
"Time:", buf);
FUNC_LEAVE_NOAPI(SUCCEED)
-}
+} /* end H5O__mtime_debug() */