diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2006-03-22 20:53:05 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2006-03-22 20:53:05 (GMT) |
commit | b269dbf0aef643eac98a8d9ee521a99d65a64768 (patch) | |
tree | e869d57ee0745f95b3f50850a62bd15d4618f617 /tools/h5diff/h5diff_main.c | |
parent | 433fdf2bf8f299c686df35bad083b13c8c3d7136 (diff) | |
download | hdf5-b269dbf0aef643eac98a8d9ee521a99d65a64768.zip hdf5-b269dbf0aef643eac98a8d9ee521a99d65a64768.tar.gz hdf5-b269dbf0aef643eac98a8d9ee521a99d65a64768.tar.bz2 |
[svn-r12134] Purpose:
bug fix
Description:
1) added a more explainative usage message
2) the percent relative error for the integer type (division) was being done using integer arythmetic; use floating point arythmetic instead
3) added a new test for integer percent
Solution:
Platforms tested:
linux (32,64)
AIX
solaris
Misc. update:
Diffstat (limited to 'tools/h5diff/h5diff_main.c')
-rw-r--r-- | tools/h5diff/h5diff_main.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/tools/h5diff/h5diff_main.c b/tools/h5diff/h5diff_main.c index cd23d4b..836a335 100644 --- a/tools/h5diff/h5diff_main.c +++ b/tools/h5diff/h5diff_main.c @@ -39,41 +39,41 @@ * Quiet mode: do not print output * * November 2004: Leon Arber (larber@uiuc.edu) - * Additions that allow h5diff to be run in parallel + * Additions that allow h5diff to be run in parallel * * February 2005: Leon Arber (larber@uiuc.edu) - * h5diff and ph5diff split into two files, one that is used - * to build a serial h5diff and one used to build a parallel h5diff - * Common functions have been moved to h5diff_common.c + * h5diff and ph5diff split into two files, one that is used + * to build a serial h5diff and one used to build a parallel h5diff + * Common functions have been moved to h5diff_common.c *------------------------------------------------------------------------- */ int main(int argc, const char *argv[]) { - int ret; - const char *fname1 = NULL; - const char *fname2 = NULL; - const char *objname1 = NULL; - const char *objname2 = NULL; - hsize_t nfound=0; - diff_opt_t options; - - parse_input(argc, argv, &fname1, &fname2, &objname1, &objname2, &options); - - nfound = h5diff(fname1,fname2,objname1,objname2,&options); - - print_results(&options); - - /*------------------------------------------------------------------------- - * exit code - * >0 if differences, 0 if no differences, <0 if error - *------------------------------------------------------------------------- - */ - - ret= (nfound==0 ? 0 : 1 ); - if (options.err_stat) - ret=-1; - return ret; + int ret; + const char *fname1 = NULL; + const char *fname2 = NULL; + const char *objname1 = NULL; + const char *objname2 = NULL; + hsize_t nfound=0; + diff_opt_t options; + + parse_input(argc, argv, &fname1, &fname2, &objname1, &objname2, &options); + + nfound = h5diff(fname1,fname2,objname1,objname2,&options); + + print_results(&options); + +/*------------------------------------------------------------------------- + * exit code + * >0 if differences, 0 if no differences, <0 if error + *------------------------------------------------------------------------- + */ + + ret= (nfound==0 ? 0 : 1 ); + if (options.err_stat) + ret=-1; + return ret; } |