summaryrefslogtreecommitdiffstats
path: root/tools/src/h5diff/h5diff_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/src/h5diff/h5diff_main.c')
-rw-r--r--tools/src/h5diff/h5diff_main.c54
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);
}
-