summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Lu <ptlu@hawkwind.ncsa.uiuc.edu>1999-06-11 17:01:51 (GMT)
committerPatrick Lu <ptlu@hawkwind.ncsa.uiuc.edu>1999-06-11 17:01:51 (GMT)
commit531fda4d783d2021e485bdc07ab9e09841774f80 (patch)
treea6e65f30957638d4c781bf1ad2adde19b664edd6
parent263bfa76ef70a96d195527b0063a929f2b57b78a (diff)
downloadhdf5-531fda4d783d2021e485bdc07ab9e09841774f80.zip
hdf5-531fda4d783d2021e485bdc07ab9e09841774f80.tar.gz
hdf5-531fda4d783d2021e485bdc07ab9e09841774f80.tar.bz2
[svn-r1329]
started to add the enum code in. just wanted to get something checked in before i mess it up
-rw-r--r--tools/h5dump.c24
1 files 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;
}