summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_util.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2008-11-13 16:16:12 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2008-11-13 16:16:12 (GMT)
commitc9300fbde03839e8ccaaf11d5e79f3f8d491c753 (patch)
treee828e76d69d9e5668a887b05978d9a6ea8e17a32 /tools/lib/h5diff_util.c
parent66f00a70a4a4751687c4e445daacf5f5e11185a8 (diff)
downloadhdf5-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.c22
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("]" );
}