diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-11-13 16:16:12 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-11-13 16:16:12 (GMT) |
commit | c9300fbde03839e8ccaaf11d5e79f3f8d491c753 (patch) | |
tree | e828e76d69d9e5668a887b05978d9a6ea8e17a32 /tools/lib/h5diff_util.c | |
parent | 66f00a70a4a4751687c4e445daacf5f5e11185a8 (diff) | |
download | hdf5-c9300fbde03839e8ccaaf11d5e79f3f8d491c753.zip hdf5-c9300fbde03839e8ccaaf11d5e79f3f8d491c753.tar.gz hdf5-c9300fbde03839e8ccaaf11d5e79f3f8d491c753.tar.bz2 |
[svn-r16071] For scalar string datasets print the character position when a difference is found instead of a non-existing array position
tested: windows, linux
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 223d591..c84173d 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("]" ); } |