diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-03-04 22:56:44 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-03-04 22:56:44 (GMT) |
commit | dfbf976509bea0b4d598716d0dd73be494efacdd (patch) | |
tree | 891886081cf2ed280788eb2a33c609c55dfe2391 /src/H5HLdbg.c | |
parent | 0e708b387c78f5a286ab82eda55214fddf6c2127 (diff) | |
download | hdf5-dfbf976509bea0b4d598716d0dd73be494efacdd.zip hdf5-dfbf976509bea0b4d598716d0dd73be494efacdd.tar.gz hdf5-dfbf976509bea0b4d598716d0dd73be494efacdd.tar.bz2 |
[svn-r12004] Purpose:
New feature & code cleanup
Description:
Update fractal heap to be able to insert objects into a direct block
hanging off the header.
Extract "octal dump" code into separate routine so that both the local
heaps & fractal heaps can use it.
Other code cleanups & support to get this far.
Platforms tested:
FreeBSD 4.11 (sleipnir)
Linux 2.4
Diffstat (limited to 'src/H5HLdbg.c')
-rw-r--r-- | src/H5HLdbg.c | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c index 0401f92..1dedaa5 100644 --- a/src/H5HLdbg.c +++ b/src/H5HLdbg.c @@ -125,44 +125,11 @@ H5HL_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, int "Percent of heap used:", (100.0 * (double)(h->heap_alloc - amount_free) / (double)h->heap_alloc)); } + /* * Print the data in a VMS-style octal dump. */ - fprintf(stream, "%*sData follows (`__' indicates free region)...\n", - indent, ""); - for (i=0; i<(int)(h->heap_alloc); i+=16) { - fprintf(stream, "%*s %8d: ", indent, "", i); - for (j = 0; j < 16; j++) { - if (i+j<(int)(h->heap_alloc)) { - if (marker[i + j]) { - fprintf(stream, "__ "); - } else { - c = h->chunk[H5HL_SIZEOF_HDR(f) + i + j]; - fprintf(stream, "%02x ", c); - } - } else { - fprintf(stream, " "); - } - if (7 == j) - HDfputc(' ', stream); - } - - for (j = 0; j < 16; j++) { - if (i+j < (int)(h->heap_alloc)) { - if (marker[i + j]) { - HDfputc(' ', stream); - } else { - c = h->chunk[H5HL_SIZEOF_HDR(f) + i + j]; - if (c > ' ' && c < '~') - HDfputc(c, stream); - else - HDfputc('.', stream); - } - } - } - - HDfputc('\n', stream); - } + H5_buffer_dump(stream, indent, h->chunk, marker, H5HL_SIZEOF_HDR(f), h->heap_alloc); done: if (h && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP, addr, h, FALSE) != SUCCEED) |