summaryrefslogtreecommitdiffstats
path: root/tools/h5diff
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5diff')
-rw-r--r--tools/h5diff/h5diff_main.c9
-rwxr-xr-xtools/h5diff/testh5diff.sh4
2 files changed, 10 insertions, 3 deletions
diff --git a/tools/h5diff/h5diff_main.c b/tools/h5diff/h5diff_main.c
index 17c9d22..8dbce22 100644
--- a/tools/h5diff/h5diff_main.c
+++ b/tools/h5diff/h5diff_main.c
@@ -252,7 +252,7 @@ int check_n_input( const char *str )
/*-------------------------------------------------------------------------
* Function: check_f_input
*
- * Purpose: check for valid input
+ * Purpose: check for a valid floating point input
*
* Return: 1 for ok, -1 for fail
*
@@ -270,6 +270,13 @@ static
int check_f_input( const char *str )
{
double x;
+
+ /*
+ the atof return value on a hexadecimal input is different
+ on some systems; we do a character check for this
+ */
+ if (strlen(str)>2 && str[0]=='0' && str[1]=='x')
+ return -1;
x=atof(str);
if (x==0)
diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh
index 43753e5..23cbfaa 100755
--- a/tools/h5diff/testh5diff.sh
+++ b/tools/h5diff/testh5diff.sh
@@ -202,7 +202,7 @@ TOOLTEST h5diff_604.txt file1.h5 file2.h5 -d 0 g1/dset3 g1/dset4
TOOLTEST h5diff_605.txt file1.h5 file2.h5 -d u g1/dset3 g1/dset4
# 6.6: hexadecimal
-#TOOLTEST h5diff_606.txt file1.h5 file2.h5 -d 0x1 g1/dset3 g1/dset4
+TOOLTEST h5diff_606.txt file1.h5 file2.h5 -d 0x1 g1/dset3 g1/dset4
# 6.7: string
TOOLTEST h5diff_607.txt file1.h5 file2.h5 -d "1" g1/dset3 g1/dset4
@@ -235,7 +235,7 @@ TOOLTEST h5diff_613.txt file1.h5 file2.h5 -p 0 g1/dset3 g1/dset4
TOOLTEST h5diff_614.txt file1.h5 file2.h5 -p u g1/dset3 g1/dset4
# 6.15: hexadecimal
-#TOOLTEST h5diff_615.txt file1.h5 file2.h5 -p 0x1 g1/dset3 g1/dset4
+TOOLTEST h5diff_615.txt file1.h5 file2.h5 -p 0x1 g1/dset3 g1/dset4
# 6.16: string
TOOLTEST h5diff_616.txt file1.h5 file2.h5 -p "0.21" g1/dset3 g1/dset4