summaryrefslogtreecommitdiffstats
path: root/src/H5dbg.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-08-25 21:08:49 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-08-25 21:08:49 (GMT)
commitddcae21908080ffbd40fcd5ce3244df5f391e02d (patch)
treeb4a6b336e60f8131c9eb4d03a0d534ece4744f25 /src/H5dbg.c
parent02a65c468589eee54e3a4e6a851303792fe9a87d (diff)
downloadhdf5-ddcae21908080ffbd40fcd5ce3244df5f391e02d.zip
hdf5-ddcae21908080ffbd40fcd5ce3244df5f391e02d.tar.gz
hdf5-ddcae21908080ffbd40fcd5ce3244df5f391e02d.tar.bz2
[svn-r19298] Description:
Bring r19297 from trunk to 1.8 branch: Whack a few more memory errors exposed by valgrind. Make the debugging dump output a little bit prettier. Tested on: FreeBSD/32 6.3 (duty) w/debug (h5committested on trunk)
Diffstat (limited to 'src/H5dbg.c')
-rw-r--r--src/H5dbg.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/H5dbg.c b/src/H5dbg.c
index 196ed5b..632ac08 100644
--- a/src/H5dbg.c
+++ b/src/H5dbg.c
@@ -78,8 +78,8 @@
*-------------------------------------------------------------------------
*/
herr_t
-H5_buffer_dump(FILE *stream, int indent, uint8_t *buf,
- uint8_t *marker, size_t buf_offset, size_t buf_size)
+H5_buffer_dump(FILE *stream, int indent, const uint8_t *buf,
+ const uint8_t *marker, size_t buf_offset, size_t buf_size)
{
size_t u, v; /* Local index variable */
@@ -102,7 +102,7 @@ H5_buffer_dump(FILE *stream, int indent, uint8_t *buf,
for(u = 0; u < buf_size; u += 16) {
uint8_t c;
- HDfprintf(stream, "%*s %8d: ", indent, "", u);
+ HDfprintf(stream, "%*s %8d: ", indent, "", u + buf_offset);
/* Print the hex values */
for(v = 0; v < 16; v++) {
@@ -119,6 +119,7 @@ H5_buffer_dump(FILE *stream, int indent, uint8_t *buf,
if(7 == v)
HDfputc(' ', stream);
} /* end for */
+ HDfputc(' ', stream);
/* Print the character values */
for(v = 0; v < 16; v++) {
@@ -133,6 +134,8 @@ H5_buffer_dump(FILE *stream, int indent, uint8_t *buf,
HDfputc('.', stream);
} /* end else */
} /* end if */
+ if(7 == v)
+ HDfputc(' ', stream);
} /* end for */
HDfputc('\n', stream);