summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2009-04-29 16:23:58 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2009-04-29 16:23:58 (GMT)
commit9675493077417085b7da1fc88d2109beeac3a3c9 (patch)
tree1c5a26f275065784765c051bc496b6ba0a813f6e
parentc983debc59422d641129bea2b56a50c1e9d6d065 (diff)
downloadhdf5-9675493077417085b7da1fc88d2109beeac3a3c9.zip
hdf5-9675493077417085b7da1fc88d2109beeac3a3c9.tar.gz
hdf5-9675493077417085b7da1fc88d2109beeac3a3c9.tar.bz2
[svn-r16890] H5dump now correctly breaks on dimension boundaries and matches the RFC.
-rw-r--r--tools/lib/h5tools.c6
-rw-r--r--tools/testfiles/tdataregR.ddl9
2 files changed, 9 insertions, 6 deletions
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 1ef92a4..d0bac77 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -1344,7 +1344,7 @@ hsize_t h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id,
region_ctx.ndims = ndims;
region_ctx.need_prefix = TRUE;
region_ctx.cur_column = ctx->cur_column;
- region_ctx.cur_elmt = blkndx*2*ndims;//ctx->cur_elmt;
+ region_ctx.cur_elmt = 0;
region_ctx.prev_multiline = ctx->prev_multiline;
region_ctx.prev_prefix_len = ctx->prev_prefix_len;
region_ctx.continuation = ctx->continuation;
@@ -1382,7 +1382,7 @@ hsize_t h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id,
h5tools_region_simple_prefix(stream, info, &region_ctx, region_curr_pos, ptdata, 0);
region_elmtno = 0;
- for (jndx = 0; jndx < numelem; jndx++, region_elmtno++) {
+ for (jndx = 0; jndx < numelem; jndx++, region_elmtno++, region_ctx.cur_elmt++) {
/* Render the element */
h5tools_str_reset(buffer);
@@ -1568,7 +1568,7 @@ hsize_t h5tools_dump_region_data_points(hid_t region_space, hid_t region_id,
region_ctx.ndims = ndims;
region_ctx.need_prefix = TRUE;
region_ctx.cur_column = ctx->cur_column;
- region_ctx.cur_elmt = jndx*ndims;//ctx->cur_elmt;
+ region_ctx.cur_elmt = 0; /* points are always 0 */
region_ctx.prev_multiline = ctx->prev_multiline;
region_ctx.prev_prefix_len = ctx->prev_prefix_len;
region_ctx.continuation = ctx->continuation;
diff --git a/tools/testfiles/tdataregR.ddl b/tools/testfiles/tdataregR.ddl
index 96dc39b..b4ab4f2 100644
--- a/tools/testfiles/tdataregR.ddl
+++ b/tools/testfiles/tdataregR.ddl
@@ -11,9 +11,12 @@ GROUP "/" {
(0): REGION_TYPE BLOCK (2,2)-(7,7)
(0): DATATYPE H5T_STD_U8LE
(0): DATA {
- (2,2): 66, 69, 72, 75, 78, 81, 96, 99, 102, 105, 108, 111, 126,
- (4,3): 129, 132, 135, 138, 141, 156, 159, 162, 165, 168, 171,
- (6,2): 186, 189, 192, 195, 198, 201, 216, 219, 222, 225, 228, 231
+ (2,2): 66, 69, 72, 75, 78, 81,
+ (3,2): 96, 99, 102, 105, 108, 111,
+ (4,2): 126, 129, 132, 135, 138, 141,
+ (5,2): 156, 159, 162, 165, 168, 171,
+ (6,2): 186, 189, 192, 195, 198, 201,
+ (7,2): 216, 219, 222, 225, 228, 231
(0): }
(0): }
(1): DATASET /Dataset2 {