diff options
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("]" ); } |