summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2008-08-07 15:35:42 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2008-08-07 15:35:42 (GMT)
commitc827f0450cf1324cb972b90d70b2d8d4faecdb9e (patch)
tree602d54495f28e0e7e1c24cae96d6f2cbbd911a7f
parentdc7d4bc0a76b53f4a082571a4e2bd05574edae49 (diff)
downloadhdf5-c827f0450cf1324cb972b90d70b2d8d4faecdb9e.zip
hdf5-c827f0450cf1324cb972b90d70b2d8d4faecdb9e.tar.gz
hdf5-c827f0450cf1324cb972b90d70b2d8d4faecdb9e.tar.bz2
[svn-r15447]
bug fix http://bugzilla.hdfgroup.uiuc.edu/show_bug.cgi?id=788 don't print array indices for regions tested: windows, linux
-rw-r--r--tools/h5dump/h5dump.c13
-rw-r--r--tools/testfiles/tdatareg.ddl5
2 files changed, 15 insertions, 3 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 7118d10..d3e25f8 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -2217,6 +2217,19 @@ 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;
diff --git a/tools/testfiles/tdatareg.ddl b/tools/testfiles/tdatareg.ddl
index 32a1601..ea85fb9 100644
--- a/tools/testfiles/tdatareg.ddl
+++ b/tools/testfiles/tdatareg.ddl
@@ -7,9 +7,8 @@ GROUP "/" {
DATATYPE H5T_REFERENCE
DATASPACE SIMPLE { ( 4 ) / ( 4 ) }
DATA {
- (0): DATASET /Dataset2 {(2,2)-(7,7)}, DATASET /Dataset2 {(6,9), (2,2),
- (1): (8,4), (1,6), (2,8), (3,2), (0,4), (9,0), (7,1), (3,3)}, NULL,
- (3): NULL
+ DATASET /Dataset2 {(2,2)-(7,7)}, DATASET /Dataset2 {(6,9), (2,2),
+ (8,4), (1,6), (2,8), (3,2), (0,4), (9,0), (7,1), (3,3)}, NULL, NULL
}
}
DATASET "Dataset2" {