diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-05-15 16:17:13 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-05-15 16:17:13 (GMT) |
commit | a0f76b876829758331cb1f956a7033a31a5cc49b (patch) | |
tree | 7b2cdc0a1290dcb331a934df42fc34181b52c2b9 /src/H5Osdspace.c | |
parent | 940cebe09c28d53d3e9c63fc576f684abcde731f (diff) | |
download | hdf5-a0f76b876829758331cb1f956a7033a31a5cc49b.zip hdf5-a0f76b876829758331cb1f956a7033a31a5cc49b.tar.gz hdf5-a0f76b876829758331cb1f956a7033a31a5cc49b.tar.bz2 |
[svn-r6875] Purpose:
Code cleanup
Description:
Improve information output from h5debug.
Platforms tested:
FreeBSD 4.8 (sleipnir)
h5committest not needed.
Diffstat (limited to 'src/H5Osdspace.c')
-rw-r--r-- | src/H5Osdspace.c | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c index b08db50..e2f7aa1 100644 --- a/src/H5Osdspace.c +++ b/src/H5Osdspace.c @@ -436,35 +436,37 @@ H5O_sdspace_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *mesg, "Rank:", (unsigned long) (sdim->rank)); - HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Dim Size:"); - for (u = 0; u < sdim->rank; u++) - HDfprintf (stream, "%s%Hu", u?", ":"", sdim->size[u]); - HDfprintf (stream, "}\n"); - - HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Dim Max:"); - if (sdim->max) { - HDfprintf (stream, "{"); - for (u = 0; u < sdim->rank; u++) { - if (H5S_UNLIMITED==sdim->max[u]) { - HDfprintf (stream, "%sINF", u?", ":""); - } else { - HDfprintf (stream, "%s%Hu", u?", ":"", sdim->max[u]); + if(sdim->rank>0) { + HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Dim Size:"); + for (u = 0; u < sdim->rank; u++) + HDfprintf (stream, "%s%Hu", u?", ":"", sdim->size[u]); + HDfprintf (stream, "}\n"); + + HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Dim Max:"); + if (sdim->max) { + HDfprintf (stream, "{"); + for (u = 0; u < sdim->rank; u++) { + if (H5S_UNLIMITED==sdim->max[u]) { + HDfprintf (stream, "%sINF", u?", ":""); + } else { + HDfprintf (stream, "%s%Hu", u?", ":"", sdim->max[u]); + } } + HDfprintf (stream, "}\n"); + } else { + HDfprintf (stream, "CONSTANT\n"); } - HDfprintf (stream, "}\n"); - } else { - HDfprintf (stream, "CONSTANT\n"); - } #ifdef LATER - if (sdim->perm) { - HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Dim Perm:"); - for (u = 0; u < sdim->rank; u++) { - HDfprintf (stream, "%s%lu", u?", ":"", - (unsigned long) (sdim->perm[u])); + if (sdim->perm) { + HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Dim Perm:"); + for (u = 0; u < sdim->rank; u++) { + HDfprintf (stream, "%s%lu", u?", ":"", + (unsigned long) (sdim->perm[u])); + } } - } #endif + } /* end if */ done: FUNC_LEAVE_NOAPI(ret_value); |