diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-11-04 02:44:40 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-11-04 02:44:40 (GMT) |
commit | 8a0b098fdb90e4efd91e252c29b711eb98d1539c (patch) | |
tree | b34a500e949d8eaf2d03c02256a46b9abe2bb9b1 /tools/lib/h5diff_util.c | |
parent | c350c300c49a1ff08d8fdd833ce33b3600ad277a (diff) | |
download | hdf5-8a0b098fdb90e4efd91e252c29b711eb98d1539c.zip hdf5-8a0b098fdb90e4efd91e252c29b711eb98d1539c.tar.gz hdf5-8a0b098fdb90e4efd91e252c29b711eb98d1539c.tar.bz2 |
[svn-r16024] For scalar string datasets print the character position when a difference is found instead of a non-existing array position
Tested: windows
Diffstat (limited to 'tools/lib/h5diff_util.c')
-rw-r--r-- | tools/lib/h5diff_util.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c index 24c8df1..b8b9f30 100644 --- a/tools/lib/h5diff_util.c +++ b/tools/lib/h5diff_util.c @@ -103,16 +103,24 @@ void print_dimensions (int rank, hsize_t *dims) { int i; + + if ( rank > 0 ) + { + + parallel_print("[" ); + for ( i = 0; i < rank-1; i++) + { + parallel_print(HSIZE_T_FORMAT, dims[i]); + parallel_print("x"); + } - parallel_print("[" ); - for ( i = 0; i < rank-1; i++) + parallel_print(HSIZE_T_FORMAT, dims[rank-1]); + parallel_print("]" ); + } + else { - parallel_print(HSIZE_T_FORMAT, dims[i]); - parallel_print("x"); + parallel_print("H5S_SCALAR" ); } - - parallel_print(HSIZE_T_FORMAT, dims[rank-1]); - parallel_print("]" ); } |