From 531fda4d783d2021e485bdc07ab9e09841774f80 Mon Sep 17 00:00:00 2001 From: Patrick Lu Date: Fri, 11 Jun 1999 12:01:51 -0500 Subject: [svn-r1329] started to add the enum code in. just wanted to get something checked in before i mess it up --- tools/h5dump.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/tools/h5dump.c b/tools/h5dump.c index 5af3327..1c41bf7 100644 --- a/tools/h5dump.c +++ b/tools/h5dump.c @@ -89,6 +89,8 @@ H5T_str_t str_pad; H5T_cset_t cset; H5G_stat_t statbuf; + hid_t super; + switch (H5Tget_class(type)) { case H5T_INTEGER: @@ -320,6 +322,15 @@ H5G_stat_t statbuf; case H5T_REFERENCE: printf("H5T_REFERENCE"); break; + case H5T_ENUM: + printf("H5T_ENUM "); + super = H5Tget_super(type); + print_datatype(super); + printf(" {\n"); + // print_enum(type); + indentation (indent + 3); + printf("}\n"); + break; default: printf( "unknown data type"); status = 1; @@ -775,9 +786,12 @@ size_t dims[H5DUMP_MAX_RANK]; ndims = H5Tget_member_dims(type, i, dims, perm); indentation (indent+COL); - - print_datatype(mtype); - + if (H5T_ENUM == H5Tget_class(type)) { + print_datatype(type); + } + else { + print_datatype(mtype); + } printf (" \"%s\"", fname); if (ndims != 1 || dims[0] != 1) { @@ -934,6 +948,10 @@ hid_t type, space; case H5T_REFERENCE: dump_data(did, DATASET_DATA); break; +/* case H5T_ENUM: + dump_data(did,ENUM_DATA); + break; +*/ default: break; } -- cgit v0.12