diff options
Diffstat (limited to 'tools/h5dump')
-rw-r--r-- | tools/h5dump/h5dump.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index aa44cc1..2e03a25 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -2216,6 +2216,20 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int display_index) outputformat->do_escape=display_escape; /* print the matrix indices */ outputformat->pindex=display_index; + + /* do not print indices for regions */ + if(obj_data == DATASET_DATA) + { + hid_t f_type = H5Dget_type(obj_id); + + if (H5Tequal(f_type, H5T_STD_REF_DSETREG)) + { + outputformat->pindex = 0; + } + H5Tclose(f_type); + } + + if (outputformat->pindex) { outputformat->idx_fmt = "(%s): "; outputformat->idx_n_fmt = HSIZE_T_FORMAT; @@ -2280,7 +2294,6 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int display_index) outputformat = &string_dataformat; } - status = h5tools_dump_dset(stdout, outputformat, obj_id, -1, sset, depth); H5Tclose(f_type); |