From 7d7c7af92d64bcba8ce258a313a646cff060b1f0 Mon Sep 17 00:00:00 2001 From: Patrick Lu Date: Fri, 25 Jun 1999 13:52:06 -0500 Subject: [svn-r1382] oooops i forgot to include a case statement in two switch statements (1 in each file) that print the actual data of the enum datasets i had to change a line of h5dump_sprint. when it checks to see that is an enum val isn't an escape sequence i appended this result onto the end of the str --- tools/h5dump.c | 6 +++--- tools/h5tools.c | 9 +++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/tools/h5dump.c b/tools/h5dump.c index d5b546c..271a2d5 100644 --- a/tools/h5dump.c +++ b/tools/h5dump.c @@ -953,10 +953,10 @@ hid_t type, space; case H5T_REFERENCE: dump_data(did, DATASET_DATA); break; -/* case H5T_ENUM: - dump_data(did,ENUM_DATA); + case H5T_ENUM: + dump_data(did,DATASET_DATA); break; -*/ + default: break; } diff --git a/tools/h5tools.c b/tools/h5tools.c index 2216a1b..1e07002 100644 --- a/tools/h5tools.c +++ b/tools/h5tools.c @@ -862,7 +862,7 @@ h5dump_sprint(h5dump_str_t *str/*in,out*/, const h5dump_t *info, } else if (H5T_ENUM==H5Tget_class(type)) { char enum_name[1024]; if (H5Tenum_nameof(type, vp, enum_name, sizeof enum_name)>=0) { - h5dump_escape(enum_name, sizeof enum_name, TRUE); + h5dump_str_append(str, h5dump_escape(enum_name, sizeof enum_name, TRUE)); } else { h5dump_str_append(str, "0x"); n = H5Tget_size(type); @@ -1340,6 +1340,9 @@ h5dump_simple_dset(FILE *stream, const h5dump_t *info, hid_t dset, /* display_reference_data(hs_nelmts, p_type, sm_buf, p_type_nbytes, p_nelmts, dim_n_size, elmtno, dset);*/ + case H5T_ENUM: + display_numeric_data(hs_nelmts, p_type, sm_buf, p_type_nbytes, + p_nelmts, dim_n_size, elmtno, dset); default: break; } @@ -2601,7 +2604,9 @@ int h5dump_attr(hid_t oid, hid_t p_type){ case H5T_REFERENCE: display_numeric_data(nelmts, p_type, sm_buf, p_type_nbytes, nelmts, dim_n_size, 0, oid); - + case H5T_ENUM: + display_numeric_data(nelmts, p_type, sm_buf, p_type_nbytes, + nelmts, dim_n_size, 0, oid); /* display_reference_data(nelmts, p_type, sm_buf, p_type_nbytes, nelmts, dim_n_size, 0, oid);*/ break; -- cgit v0.12