diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2015-03-04 13:34:24 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2015-03-04 13:34:24 (GMT) |
commit | f1c4d0ff3fbdfcebf3a22a24c26f1d69ecb3a5fe (patch) | |
tree | 962a1b7b4f3b4af8a985a43e9498ed3d5897330e /tools/lib/h5tools_dump.c | |
parent | 79771d3fac06f99485a8201782b638e4c812f0a0 (diff) | |
download | hdf5-f1c4d0ff3fbdfcebf3a22a24c26f1d69ecb3a5fe.zip hdf5-f1c4d0ff3fbdfcebf3a22a24c26f1d69ecb3a5fe.tar.gz hdf5-f1c4d0ff3fbdfcebf3a22a24c26f1d69ecb3a5fe.tar.bz2 |
[svn-r26352] Update h5dump to latest BNF - reg vs irreg hyperslabs.
Diffstat (limited to 'tools/lib/h5tools_dump.c')
-rw-r--r-- | tools/lib/h5tools_dump.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 84318a1..3fee4d1 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -225,7 +225,8 @@ void h5tools_print_dims(h5tools_str_t *buffer, hsize_t *s, int dims); void h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, struct subset_t *sset, int dims); -void h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *info, hid_t vspace, hid_t dcpl_id, size_t index); +void h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *info, h5tools_context_t *ctx, + hid_t vspace, hid_t dcpl_id, size_t index); void h5tools_dump_init(void) @@ -2861,9 +2862,10 @@ h5tools_dump_oid(FILE *stream, const h5tool_format_t *info, *------------------------------------------------------------------------- */ void -h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *info, hid_t vspace, hid_t dcpl_id, size_t index) +h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *info, h5tools_context_t *ctx, + hid_t vspace, hid_t dcpl_id, size_t index) { - h5tools_str_append(buffer, "%s ", h5tools_dump_header_format->virtualselectionbegin); + h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionbegin); switch(H5Sget_select_type(vspace)) { case H5S_SEL_NONE: /* Nothing selected */ h5tools_str_append(buffer, "NONE"); @@ -2874,9 +2876,15 @@ h5tools_print_virtual_selection(h5tools_str_t *buffer, const h5tool_format_t *in h5tools_str_append(buffer, " %s", h5tools_dump_header_format->virtualselectionblockend); break; case H5S_SEL_HYPERSLABS: /* "New-style" hyperslab selection defined */ - h5tools_str_append(buffer, "%s %s ", VDS_HYPERSLAB, h5tools_dump_header_format->virtualselectionblockbegin); - h5tools_str_dump_space_blocks(buffer, vspace, info); - h5tools_str_append(buffer, " %s", h5tools_dump_header_format->virtualselectionblockend); + if (H5Sis_regular_hyperslab(vspace)) { + h5tools_str_append(buffer, "%s %s ", VDS_REG_HYPERSLAB, h5tools_dump_header_format->virtualselectionblockbegin); + h5tools_str_dump_space_slabs(buffer, vspace, info, ctx); + } + else { + h5tools_str_append(buffer, "%s %s ", VDS_IRR_HYPERSLAB, h5tools_dump_header_format->virtualselectionblockbegin); + h5tools_str_dump_space_blocks(buffer, vspace, info); + } + h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionblockend); break; case H5S_SEL_ALL: /* Entire extent selected */ h5tools_str_append(buffer, "ALL"); @@ -3154,7 +3162,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, ctx->indent_level++; h5tools_str_reset(&buffer); - h5tools_print_virtual_selection(&buffer, info, virtual_vspace, dcpl_id, next); + h5tools_print_virtual_selection(&buffer, info, ctx, virtual_vspace, dcpl_id, next); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); ssize_out = H5Pget_virtual_filename(dcpl_id, next, NULL, 0); @@ -3166,7 +3174,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualfilenamebegin); + h5tools_str_append(&buffer, "%s %s", VDS_SRC_FILE, h5tools_dump_header_format->virtualfilenamebegin); h5tools_str_append(&buffer, "%s", name); h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualfilenameend); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); @@ -3175,7 +3183,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualdatasetnamebegin); + h5tools_str_append(&buffer, "%s %s", VDS_SRC_DATASET, h5tools_dump_header_format->virtualdatasetnamebegin); h5tools_str_append(&buffer, "%s", dsetname); h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualdatasetnameend); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); @@ -3184,7 +3192,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); - h5tools_print_virtual_selection(&buffer, info, virtual_srcspace, dcpl_id, next); + h5tools_print_virtual_selection(&buffer, info, ctx, virtual_srcspace, dcpl_id, next); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); ctx->indent_level--; |