From 007adfc4525c2b7e7bbfd27e0f1a4c569687cf2e Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 9 Jun 2003 14:14:35 -0500 Subject: [svn-r7000] Purpose: New feature Description: Dump variable-length sequence datatype info with h5debug Platforms tested: FreeBSD 4.8 (sleipnir) h5committest Misc. update: Patch provided by Robb Matzke (matzke@llnl.gov) --- src/H5Odtype.c | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/src/H5Odtype.c b/src/H5Odtype.c index e28571c..5f814fe 100644 --- a/src/H5Odtype.c +++ b/src/H5Odtype.c @@ -1212,7 +1212,7 @@ H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream, s = "array"; break; case H5T_VLEN: - s = "variable-length sequence"; + s = "vlen"; break; default: sprintf(buf, "H5T_CLASS_%d", (int) (dt->type)); @@ -1269,8 +1269,35 @@ H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream, fprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Fix dumping reference types!"); } else if (H5T_VLEN==dt->type) { - fprintf(stream, "%*s%-*s\n", indent, "", fwidth, - "Fix dumping variable-length types!"); + switch (dt->u.vlen.type) { + case H5T_VLEN_SEQUENCE: + s = "sequence"; + break; + case H5T_VLEN_STRING: + s = "string"; + break; + default: + sprintf(buf, "H5T_VLEN_%d", dt->u.vlen.type); + s = buf; + break; + } + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Vlen type:", s); + + switch (dt->u.vlen.loc) { + case H5T_VLEN_MEMORY: + s = "memory"; + break; + case H5T_VLEN_DISK: + s = "disk"; + break; + default: + sprintf(buf, "H5T_VLEN_%d", dt->u.vlen.loc); + s = buf; + break; + } + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Location:", s); } else if (H5T_ARRAY==dt->type) { fprintf(stream, "%*s%-*s %d\n", indent, "", fwidth, "Rank:", -- cgit v0.12