summaryrefslogtreecommitdiffstats
path: root/src/H5HGdbg.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-12-19 07:22:53 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-12-19 07:22:53 (GMT)
commita7b48fec30b180f5c96cf9601a29ce3f7729f6bb (patch)
tree93ac830b9218d3ea61c5e7da779ca597993a5be1 /src/H5HGdbg.c
parentde952f36472b1cb66c2021ed37fd8bdfe7e7ba4c (diff)
downloadhdf5-a7b48fec30b180f5c96cf9601a29ce3f7729f6bb.zip
hdf5-a7b48fec30b180f5c96cf9601a29ce3f7729f6bb.tar.gz
hdf5-a7b48fec30b180f5c96cf9601a29ce3f7729f6bb.tar.bz2
[svn-r18041] Description:
Move local & global heap metadata cache callback routines to their own source module, as they are in later revisions of the trunk and on the metadata journaling branch, in order to make the convergence of the trunk and the metadata journaling branch easier. Tested on: Mac OS X/32 10.6.2 (amazon) w/debug (h5committest not required on this branch)
Diffstat (limited to 'src/H5HGdbg.c')
-rw-r--r--src/H5HGdbg.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/H5HGdbg.c b/src/H5HGdbg.c
index 0e5aff8..bda9832 100644
--- a/src/H5HGdbg.c
+++ b/src/H5HGdbg.c
@@ -73,7 +73,7 @@ H5HG_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
assert(indent >= 0);
assert(fwidth >= 0);
- if (NULL == (h = H5AC_protect(f, dxpl_id, H5AC_GHEAP, addr, NULL, NULL, H5AC_READ)))
+ if (NULL == (h = (H5HG_heap_t *)H5AC_protect(f, dxpl_id, H5AC_GHEAP, addr, NULL, NULL, H5AC_READ)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load global heap collection");
fprintf(stream, "%*sGlobal Heap Collection...\n", indent, "");
@@ -93,7 +93,10 @@ H5HG_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
fprintf (stream, "%*s%-*s %u/%lu/", indent, "", fwidth,
"Objects defined/allocated/max:",
nused, (unsigned long)h->nalloc);
- fprintf (stream, nused ? "%u\n": "NA\n", maxobj);
+ if(nused)
+ fprintf(stream, "%u\n", maxobj);
+ else
+ fprintf(stream, "NA\n");
fprintf (stream, "%*s%-*s %lu\n", indent, "", fwidth,
"Free space:",
@@ -113,7 +116,7 @@ H5HG_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
(unsigned long)H5HG_ALIGN(h->obj[u].size));
p = h->obj[u].begin + H5HG_SIZEOF_OBJHDR (f);
for (j=0; j<h->obj[u].size; j+=16) {
- fprintf (stream, "%*s%04d: ", indent+6, "", j);
+ fprintf (stream, "%*s%04u: ", indent+6, "", j);
for (k=0; k<16; k++) {
if (8==k) fprintf (stream, " ");
if (j+k<h->obj[u].size) {