summaryrefslogtreecommitdiffstats
path: root/src/H5Omtime.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-10-13 20:51:06 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-10-15 13:09:48 (GMT)
commit48d171b04730aff7beade684e9afd164f0204b0c (patch)
tree81bb97f196a1f35bc94624ab5f1b8e9fbbccaa81 /src/H5Omtime.c
parent1ce4c8dd7ddaa344ad041514b1d3aa4979497275 (diff)
downloadhdf5-48d171b04730aff7beade684e9afd164f0204b0c.zip
hdf5-48d171b04730aff7beade684e9afd164f0204b0c.tar.gz
hdf5-48d171b04730aff7beade684e9afd164f0204b0c.tar.bz2
Merge from 1.10
Comments, whitespace Simple init and if block brackets. Minimal code changes limited to return value and spelling
Diffstat (limited to 'src/H5Omtime.c')
-rw-r--r--src/H5Omtime.c148
1 files changed, 69 insertions, 79 deletions
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index 1a8b610..6c3361e 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -11,10 +11,10 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
- * Friday, July 24, 1998
+/* Programmer: Robb Matzke
+ * Friday, July 24, 1998
*
- * Purpose: The object modification time message.
+ * Purpose: The object modification time message.
*/
#define H5O_PACKAGE /*suppress error about including H5Opkg */
@@ -99,18 +99,20 @@ static hbool_t ntzset = FALSE;
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.
+ * Purpose: Decode a new modification time message and return a pointer to
+ * a new time_t value.
*
- * Return: Success: Ptr to new message in native struct.
+ * The new modification time message format was added due to the
+ * performance overhead of the old format.
*
- * Failure: NULL
+ * Return: Success: Ptr to new message in native struct.
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Jan 3 2002
+ * Failure: NULL
+ *
+ * Programmer: Quincey Koziol
+ * Jan 3 2002
*
*-------------------------------------------------------------------------
*/
@@ -152,18 +154,20 @@ done:
} /* 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.
*
- * Purpose: Decode a modification time message and return a pointer to a
- * new time_t value.
+ * The new modification time message format was added due to the
+ * performance overhead of the old format.
*
- * Return: Success: Ptr to new message in native struct.
+ * Return: Success: Ptr to new message in native struct.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 24 1998
+ * Programmer: Robb Matzke
+ * Jul 24 1998
*
*-------------------------------------------------------------------------
*/
@@ -173,8 +177,8 @@ H5O_mtime_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5
size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
time_t * mesg, the_time;
- int i;
struct tm tm;
+ int i; /* Local index variable */
void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -213,15 +217,14 @@ done:
} /* end H5O_mtime_decode() */
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_new_encode
+ * Function: H5O_mtime_new_encode
*
- * Purpose: Encodes a new modification time message.
+ * Purpose: Encodes a new modification time message.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Jan 3 2002
+ * Programmer: Quincey Koziol
+ * Jan 3 2002
*
*-------------------------------------------------------------------------
*/
@@ -253,17 +256,14 @@ H5O_mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha
} /* end H5O_mtime_new_encode() */
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_encode
+ * Function: H5O_mtime_encode
*
- * Purpose: Encodes a modification time message.
+ * Purpose: Encodes a modification time message.
*
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 24 1998
+ * Return: Non-negative on success/Negative on failure
*
- * Modifications:
+ * Programmer: Robb Matzke
+ * Jul 24 1998
*
*-------------------------------------------------------------------------
*/
@@ -290,20 +290,17 @@ H5O_mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
}
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_copy
- *
- * Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
- * necessary.
+ * Function: H5O_mtime_copy
*
- * Return: Success: Ptr to _DEST
+ * Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
+ * necessary.
*
- * Failure: NULL
+ * Return: Success: Ptr to _DEST
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 24 1998
+ * Failure: NULL
*
- * Modifications:
+ * Programmer: Robb Matzke
+ * Jul 24 1998
*
*-------------------------------------------------------------------------
*/
@@ -332,22 +329,19 @@ done:
}
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_new_size
+ * Function: H5O_mtime_new_size
*
- * Purpose: Returns the size of the raw message in bytes not
- * counting the message type or size fields, but only the data
- * fields. This function doesn't take into account
- * alignment.
+ * Purpose: Returns the size of the raw message in bytes not
+ * counting the message type or size fields, but only the data
+ * fields. This function doesn't take into account
+ * alignment.
*
- * Return: Success: Message data size in bytes w/o alignment.
+ * Return: Success: Message data size in bytes w/o alignment.
*
- * Failure: 0
+ * Failure: 0
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Jan 3 2002
- *
- * Modifications:
+ * Programmer: Quincey Koziol
+ * Jan 3 2002
*
*-------------------------------------------------------------------------
*/
@@ -365,22 +359,19 @@ H5O_mtime_new_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable
} /* end H5O_mtime_new_size() */
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_size
+ * Function: H5O_mtime_size
*
- * Purpose: Returns the size of the raw message in bytes not
- * counting the message type or size fields, but only the data
- * fields. This function doesn't take into account
- * alignment.
+ * Purpose: Returns the size of the raw message in bytes not
+ * counting the message type or size fields, but only the data
+ * fields. This function doesn't take into account
+ * alignment.
*
- * Return: Success: Message data size in bytes w/o alignment.
+ * Return: Success: Message data size in bytes w/o alignment.
*
- * Failure: 0
+ * Failure: 0
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 14 1998
- *
- * Modifications:
+ * Programmer: Robb Matzke
+ * Jul 14 1998
*
*-------------------------------------------------------------------------
*/
@@ -398,7 +389,7 @@ H5O_mtime_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha
}
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_reset
+ * Function: H5O_mtime_reset
*
* Purpose: Frees resources within a modification time message, but doesn't free
* the message itself.
@@ -421,13 +412,13 @@ H5O_mtime_reset(void H5_ATTR_UNUSED *_mesg)
}
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_free
+ * Function: H5O_mtime_free
*
- * Purpose: Frees the message
+ * Purpose: Frees the message
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, March 30, 2000
*
*-------------------------------------------------------------------------
@@ -445,15 +436,14 @@ H5O_mtime_free(void *mesg)
} /* end H5O_mtime_free() */
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_debug
+ * Function: H5O_mtime_debug
*
- * Purpose: Prints debugging info for the message.
+ * Purpose: Prints debugging info for the message.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 24 1998
+ * Programmer: Robb Matzke
+ * Jul 24 1998
*
*-------------------------------------------------------------------------
*/