diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-10-01 15:29:53 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-10-01 15:29:53 (GMT) |
commit | ec8ad09125032c9c232878d02e90aa86df162841 (patch) | |
tree | 5d63105d3a0db7d5bbee41c5b74b097649a2115e /tools/src/h5diff/h5diff_main.c | |
parent | 453238e90e1574ef1c15e3c79f7fb3d77920e77c (diff) | |
download | hdf5-ec8ad09125032c9c232878d02e90aa86df162841.zip hdf5-ec8ad09125032c9c232878d02e90aa86df162841.tar.gz hdf5-ec8ad09125032c9c232878d02e90aa86df162841.tar.bz2 |
Source formatted
Diffstat (limited to 'tools/src/h5diff/h5diff_main.c')
-rw-r--r-- | tools/src/h5diff/h5diff_main.c | 54 |
1 files changed, 26 insertions, 28 deletions
diff --git a/tools/src/h5diff/h5diff_main.c b/tools/src/h5diff/h5diff_main.c index e14447d..c056e35 100644 --- a/tools/src/h5diff/h5diff_main.c +++ b/tools/src/h5diff/h5diff_main.c @@ -17,7 +17,6 @@ #include "h5tools.h" #include "h5tools_utils.h" - /*------------------------------------------------------------------------- * Function: main * @@ -65,17 +64,17 @@ *------------------------------------------------------------------------- */ - -int main(int argc, const char *argv[]) +int +main(int argc, const char *argv[]) { - int ret; - int i; - const char *fname1 = NULL; - const char *fname2 = NULL; - const char *objname1 = NULL; - const char *objname2 = NULL; - hsize_t nfound=0; - diff_opt_t opts; + int ret; + int i; + const char *fname1 = NULL; + const char *fname2 = NULL; + const char *objname1 = NULL; + const char *objname2 = NULL; + hsize_t nfound = 0; + diff_opt_t opts; h5tools_setprogname(PROGRAMNAME); h5tools_setstatus(EXIT_SUCCESS); @@ -84,28 +83,28 @@ int main(int argc, const char *argv[]) h5tools_init(); /*------------------------------------------------------------------------- - * process the command-line - *------------------------------------------------------------------------- - */ + * process the command-line + *------------------------------------------------------------------------- + */ parse_command_line(argc, argv, &fname1, &fname2, &objname1, &objname2, &opts); /* enable error reporting if command line option */ h5tools_error_report(); /*------------------------------------------------------------------------- - * do the diff - *------------------------------------------------------------------------- - */ + * do the diff + *------------------------------------------------------------------------- + */ nfound = h5diff(fname1, fname2, objname1, objname2, &opts); print_info(&opts); - /*------------------------------------------------------------------------- - * exit code - * 1 if differences, 0 if no differences, 2 if error - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * exit code + * 1 if differences, 0 if no differences, 2 if error + *------------------------------------------------------------------------- + */ ret = (nfound == 0 ? 0 : 1); @@ -120,17 +119,17 @@ int main(int argc, const char *argv[]) /* free any buffers */ for (i = 0; i < 2; i++) { if (opts.sset[i]) { - if(opts.sset[i]->start.data) + if (opts.sset[i]->start.data) HDfree(opts.sset[i]->start.data); - if(opts.sset[i]->stride.data) + if (opts.sset[i]->stride.data) HDfree(opts.sset[i]->stride.data); - if(opts.sset[i]->count.data) + if (opts.sset[i]->count.data) HDfree(opts.sset[i]->count.data); - if(opts.sset[i]->block.data) + if (opts.sset[i]->block.data) HDfree(opts.sset[i]->block.data); HDfree(opts.sset[i]); - opts.sset[i]=NULL; + opts.sset[i] = NULL; } } @@ -160,4 +159,3 @@ h5diff_exit(int status) HDexit(status); } - |