mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-17 16:10:24 +08:00
[svn-r26794] Fix formatting for selection. Irregular reuses blocks and points for datasets however indentation after line breaks are an issue.
This commit is contained in:
parent
6a27582a44
commit
26e709edc6
@ -2890,15 +2890,33 @@ h5tools_print_virtual_selection(hid_t vspace, hid_t dcpl_id, size_t index,
|
||||
h5tools_str_append(buffer, " %s", h5tools_dump_header_format->virtualselectionblockend);
|
||||
break;
|
||||
case H5S_SEL_HYPERSLABS: /* "New-style" hyperslab selection defined */
|
||||
ctx->need_prefix = TRUE;
|
||||
h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
|
||||
|
||||
h5tools_str_reset(buffer);
|
||||
if (H5Sis_regular_hyperslab(vspace)) {
|
||||
h5tools_str_append(buffer, "%s %s ", VDS_REG_HYPERSLAB, h5tools_dump_header_format->virtualselectionblockbegin);
|
||||
h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
|
||||
|
||||
h5tools_str_reset(buffer);
|
||||
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_render_element(stream, info, ctx, buffer, curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
|
||||
ctx->indent_level++;
|
||||
ctx->need_prefix = TRUE;
|
||||
h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
|
||||
|
||||
h5tools_str_reset(buffer);
|
||||
h5tools_str_dump_space_blocks(buffer, vspace, info);
|
||||
ctx->indent_level--;
|
||||
}
|
||||
h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
|
||||
ctx->need_prefix = TRUE;
|
||||
h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
|
||||
|
||||
h5tools_str_reset(buffer);
|
||||
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionblockend);
|
||||
break;
|
||||
case H5S_SEL_ALL: /* Entire extent selected */
|
||||
@ -3001,11 +3019,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
|
||||
h5tools_str_append(&buffer, "%s %s", STORAGE_LAYOUT, BEGIN);
|
||||
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
|
||||
|
||||
ctx->indent_level++;
|
||||
|
||||
ctx->need_prefix = TRUE;
|
||||
h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
|
||||
|
||||
stl = H5Pget_layout(dcpl_id);
|
||||
switch (stl) {
|
||||
case H5D_CHUNKED:
|
||||
@ -3243,21 +3256,12 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
|
||||
ctx->need_prefix = TRUE;
|
||||
h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
|
||||
|
||||
/*EIP
|
||||
h5tools_str_reset(&buffer);
|
||||
h5tools_str_append(&buffer, "%s", END);
|
||||
*/
|
||||
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
|
||||
}
|
||||
ctx->indent_level--;
|
||||
}
|
||||
|
||||
ctx->need_prefix = TRUE;
|
||||
h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
|
||||
|
||||
h5tools_str_reset(&buffer);
|
||||
h5tools_str_append(&buffer, "%s", END);
|
||||
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -3266,8 +3270,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
|
||||
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
|
||||
}/*switch*/
|
||||
|
||||
ctx->indent_level--;
|
||||
|
||||
ctx->need_prefix = TRUE;
|
||||
h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
|
||||
|
||||
|
@ -438,11 +438,9 @@ h5tools_str_dump_space_slabs(h5tools_str_t *str, hid_t rspace,
|
||||
H5Sget_regular_hyperslab(rspace, start, stride, count, block);
|
||||
|
||||
/* Print hyperslab information */
|
||||
h5tools_str_append(str, "%s", "\n");
|
||||
h5tools_str_indent(str, info, ctx);
|
||||
|
||||
/* Start coordinates */
|
||||
h5tools_str_append(str, "%s ", START);
|
||||
h5tools_str_append(str, "%s%s ", info->line_indent, START);
|
||||
for (j = 0; j < ndims; j++)
|
||||
h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", start[j]);
|
||||
h5tools_str_append(str, ")");
|
||||
@ -478,8 +476,6 @@ h5tools_str_dump_space_slabs(h5tools_str_t *str, hid_t rspace,
|
||||
h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", block[j]);
|
||||
}
|
||||
h5tools_str_append(str, ")");
|
||||
h5tools_str_append(str, "%s", "\n");
|
||||
h5tools_str_indent(str, info, ctx);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -523,8 +519,7 @@ h5tools_str_dump_space_blocks(h5tools_str_t *str, hid_t rspace,
|
||||
for (i = 0; i < nblocks; i++) {
|
||||
int j;
|
||||
|
||||
h5tools_str_append(str, info->dset_blockformat_pre, i ? "," OPTIONAL_LINE_BREAK " " : "",
|
||||
(unsigned long)i);
|
||||
h5tools_str_append(str, info->dset_blockformat_pre, i ? "," OPTIONAL_LINE_BREAK " " : "", (unsigned long)i);
|
||||
|
||||
/* Start coordinates and opposite corner */
|
||||
for (j = 0; j < ndims; j++)
|
||||
|
Loading…
Reference in New Issue
Block a user