summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2012-05-23 18:31:42 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2012-05-23 18:31:42 (GMT)
commit588c5107ced043b2fbef5bad6334873d3107722e (patch)
treef4c6c2729b16c89050c5f4ab339257b70ed298c4 /tools/lib
parent58d14b196b9aef988a6593a01a445e62d92ad636 (diff)
downloadhdf5-588c5107ced043b2fbef5bad6334873d3107722e.zip
hdf5-588c5107ced043b2fbef5bad6334873d3107722e.tar.gz
hdf5-588c5107ced043b2fbef5bad6334873d3107722e.tar.bz2
[svn-r22397] Merge trunk changes for HDFFV-7999 and h5dump test script to branch
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/h5tools_dump.c85
1 files changed, 64 insertions, 21 deletions
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 381c358..6a7df50 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -1143,9 +1143,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
size_row_block = sset->block.data[row_dim];
/* Check if we have VL data in the dataset's datatype */
- if (h5tools_detect_vlen_str(p_type) == TRUE)
- vl_data = TRUE;
- if (H5Tdetect_class(p_type, H5T_VLEN) == TRUE)
+ if (h5tools_detect_vlen(p_type) == TRUE)
vl_data = TRUE;
/* display loop */
@@ -1553,9 +1551,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont
}
/* Check if we have VL data in the dataset's datatype */
- if (h5tools_detect_vlen_str(p_type) == TRUE)
- vl_data = TRUE;
- if (H5Tdetect_class(p_type, H5T_VLEN) == TRUE)
+ if (h5tools_detect_vlen(p_type) == TRUE)
vl_data = TRUE;
/*
@@ -2123,14 +2119,38 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s ", STRPAD);
- if (str_pad == H5T_STR_NULLTERM)
- h5tools_str_append(buffer, "H5T_STR_NULLTERM;");
- else if (str_pad == H5T_STR_NULLPAD)
- h5tools_str_append(buffer, "H5T_STR_NULLPAD;");
- else if (str_pad == H5T_STR_SPACEPAD)
- h5tools_str_append(buffer, "H5T_STR_SPACEPAD;");
- else
- h5tools_str_append(buffer, "H5T_STR_ERROR;");
+ switch (str_pad) {
+ case H5T_STR_NULLTERM:
+ h5tools_str_append(buffer, "H5T_STR_NULLTERM;");
+ break;
+ case H5T_STR_NULLPAD:
+ h5tools_str_append(buffer, "H5T_STR_NULLPAD;");
+ break;
+ case H5T_STR_SPACEPAD:
+ h5tools_str_append(buffer, "H5T_STR_SPACEPAD;");
+ break;
+ case H5T_STR_RESERVED_3:
+ case H5T_STR_RESERVED_4:
+ case H5T_STR_RESERVED_5:
+ case H5T_STR_RESERVED_6:
+ case H5T_STR_RESERVED_7:
+ case H5T_STR_RESERVED_8:
+ case H5T_STR_RESERVED_9:
+ case H5T_STR_RESERVED_10:
+ case H5T_STR_RESERVED_11:
+ case H5T_STR_RESERVED_12:
+ case H5T_STR_RESERVED_13:
+ case H5T_STR_RESERVED_14:
+ case H5T_STR_RESERVED_15:
+ h5tools_str_append(buffer, "H5T_STR_UNKNOWN;");
+ break;
+ case H5T_STR_ERROR:
+ h5tools_str_append(buffer, "H5T_STR_ERROR;");
+ break;
+ default:
+ h5tools_str_append(buffer, "ERROR;");
+ break;
+ }
h5tools_render_element(stream, info, ctx, buffer, &curr_pos, ncols, 0, 0);
ctx->need_prefix = TRUE;
@@ -2140,10 +2160,35 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
h5tools_str_append(buffer, "%s ", CSET);
- if (cset == H5T_CSET_ASCII)
- h5tools_str_append(buffer, "H5T_CSET_ASCII;");
- else
- h5tools_str_append(buffer, "unknown_cset;");
+ switch (cset) {
+ case H5T_CSET_ASCII:
+ h5tools_str_append(buffer, "H5T_CSET_ASCII;");
+ break;
+ case H5T_CSET_UTF8:
+ h5tools_str_append(buffer, "H5T_CSET_UTF8;");
+ break;
+ case H5T_CSET_RESERVED_2:
+ case H5T_CSET_RESERVED_3:
+ case H5T_CSET_RESERVED_4:
+ case H5T_CSET_RESERVED_5:
+ case H5T_CSET_RESERVED_6:
+ case H5T_CSET_RESERVED_7:
+ case H5T_CSET_RESERVED_8:
+ case H5T_CSET_RESERVED_9:
+ case H5T_CSET_RESERVED_10:
+ case H5T_CSET_RESERVED_11:
+ case H5T_CSET_RESERVED_12:
+ case H5T_CSET_RESERVED_13:
+ case H5T_CSET_RESERVED_14:
+ case H5T_CSET_RESERVED_15:
+ h5tools_str_append(buffer, "H5T_CSET_UNKNOWN;");
+ case H5T_CSET_ERROR:
+ h5tools_str_append(buffer, "H5T_CSET_ERROR;");
+ break;
+ default:
+ h5tools_str_append(buffer, "ERROR;");
+ break;
+ }
h5tools_render_element(stream, info, ctx, buffer, &curr_pos, ncols, 0, 0);
ctx->need_prefix = TRUE;
@@ -3806,9 +3851,7 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info,
ndims = H5Sget_simple_extent_dims(space, size, NULL);
/* Check if we have VL data in the dataset's datatype */
- if (h5tools_detect_vlen_str(p_type) == TRUE)
- vl_data = TRUE;
- if (H5Tdetect_class(p_type, H5T_VLEN) == TRUE)
+ if (h5tools_detect_vlen(p_type) == TRUE)
vl_data = TRUE;
for (i = 0; i < ndims; i++)