diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2007-02-21 20:05:04 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2007-02-21 20:05:04 (GMT) |
commit | 67f5810d8452df6c13ead8056851c390f0d12235 (patch) | |
tree | 9b0293cbfa5b08eb0f20756d794a906dc4aec605 /tools/lib/h5diff_util.c | |
parent | 1e07756ac265fad1171cd18efcdb2b0ba9bb903d (diff) | |
download | hdf5-67f5810d8452df6c13ead8056851c390f0d12235.zip hdf5-67f5810d8452df6c13ead8056851c390f0d12235.tar.gz hdf5-67f5810d8452df6c13ead8056851c390f0d12235.tar.bz2 |
[svn-r13368]
Added a little format alignment to the printing of dimensions
Diffstat (limited to 'tools/lib/h5diff_util.c')
-rw-r--r-- | tools/lib/h5diff_util.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c index eaaf35b..bd8207f 100644 --- a/tools/lib/h5diff_util.c +++ b/tools/lib/h5diff_util.c @@ -90,27 +90,30 @@ void parallel_print(const char* format, ...) va_end(ap); } - /*------------------------------------------------------------------------- - * Function: print_dims - * - * Purpose: print dimensions + * Function: print_dimensions * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: May 9, 2003 + * Purpose: print dimensions * *------------------------------------------------------------------------- */ -void print_dims( int r, hsize_t *d ) +void +print_dimensions (int rank, hsize_t *dims) { - int i; - parallel_print("[ " ); - for ( i=0; i<r; i++ ) - parallel_print("%"H5_PRINTF_LL_WIDTH"u ",(unsigned long_long)d[i] ); - parallel_print("] " ); + int i; + + parallel_print("[" ); + for ( i = 0; i < rank-1; i++) + { + parallel_print("%"H5_PRINTF_LL_WIDTH"u", (unsigned long_long)dims[i]); + parallel_print("x"); + } + parallel_print("%"H5_PRINTF_LL_WIDTH"u", (unsigned long_long)dims[rank-1]); + parallel_print("]" ); + } + /*------------------------------------------------------------------------- * Function: print_type * |