diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-10-29 19:56:24 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-10-29 19:56:24 (GMT) |
commit | 840c6e34d3aa5d6069da7a8525fb60d0c2dbcfa4 (patch) | |
tree | f6f2b44f8511cc8cc2ce3eb00575f7f709c7d76c /tools/lib/h5diff_array.c | |
parent | 13294e2042f855e92653dc7ca3ff3b5980ee816d (diff) | |
download | hdf5-840c6e34d3aa5d6069da7a8525fb60d0c2dbcfa4.zip hdf5-840c6e34d3aa5d6069da7a8525fb60d0c2dbcfa4.tar.gz hdf5-840c6e34d3aa5d6069da7a8525fb60d0c2dbcfa4.tar.bz2 |
[svn-r15989] Merge with 1.8 up to rev 15945
Regarding use of unsigned long long print format
Tested: linux
Diffstat (limited to 'tools/lib/h5diff_array.c')
-rw-r--r-- | tools/lib/h5diff_array.c | 48 |
1 files changed, 4 insertions, 44 deletions
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 0629c3e..02a260e 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -17,16 +17,12 @@ #include "h5diff.h" #include "ph5diff.h" #include "H5private.h" +#include "h5tools.h" + #include <sys/timeb.h> #include <time.h> -#if 0 -#define H5DIFF_DO_TIME -#endif -#if 1 -#define H5DIFF_DO_NAN -#endif /*------------------------------------------------------------------------- * printf formatting @@ -247,7 +243,8 @@ void print_pos( int *ph, /* print header */ parallel_print("[ " ); for ( i = 0; i < rank; i++) { - parallel_print("%"H5_PRINTF_LL_WIDTH"u ", (unsigned long_long)pos[i]); + parallel_print(HSIZE_T_FORMAT, (unsigned long_long)pos[i]); + parallel_print(" "); } parallel_print("]" ); } @@ -2999,20 +2996,7 @@ hsize_t diff_float(unsigned char *mem1, else { -#if defined (H5DIFF_DO_TIME) - int time; - #if defined (WIN32) - struct _timeb *tbstart = malloc(sizeof(struct _timeb)); - struct _timeb *tbstop = malloc(sizeof(struct _timeb)); - _ftime( tbstart); - #else - struct timeb *tbstart = malloc(sizeof(struct timeb)); - struct timeb *tbstop = malloc(sizeof(struct timeb)); - ftime( tbstart); - #endif - -#endif for ( i = 0; i < nelmts; i++) { @@ -3040,18 +3024,6 @@ hsize_t diff_float(unsigned char *mem1, -#if defined (H5DIFF_DO_TIME) - - #if defined (WIN32) - _ftime( tbstop ); - #else - ftime( tbstop ); - #endif - - time = tbstop->time - tbstart->time; - printf(" TIME = %d sec\n", time ); - -#endif } @@ -5289,8 +5261,6 @@ hbool_t equal_double(double value, double expected) int both_zero; int is_zero; -#if defined (H5DIFF_DO_NAN) - /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- @@ -5321,8 +5291,6 @@ hbool_t equal_double(double value, double expected) *------------------------------------------------------------------------- */ -#endif - BOTH_ZERO(value,expected) if (both_zero) return TRUE; @@ -5354,8 +5322,6 @@ hbool_t equal_ldouble(long double value, long double expected) int both_zero; int is_zero; -#if defined (H5DIFF_DO_NAN) - /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- @@ -5386,8 +5352,6 @@ hbool_t equal_ldouble(long double value, long double expected) *------------------------------------------------------------------------- */ -#endif - BOTH_ZERO(value,expected) if (both_zero) return TRUE; @@ -5423,8 +5387,6 @@ hbool_t equal_float(float value, float expected) int both_zero; int is_zero; -#if defined (H5DIFF_DO_NAN) - /*------------------------------------------------------------------------- * detect NaNs *------------------------------------------------------------------------- @@ -5455,8 +5417,6 @@ hbool_t equal_float(float value, float expected) *------------------------------------------------------------------------- */ -#endif - BOTH_ZERO(value,expected) if (both_zero) return TRUE; |