diff options
Diffstat (limited to 'tools/h5diff/h5diff_main.c')
-rw-r--r-- | tools/h5diff/h5diff_main.c | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/tools/h5diff/h5diff_main.c b/tools/h5diff/h5diff_main.c index 2ac3703..58fc9a9 100644 --- a/tools/h5diff/h5diff_main.c +++ b/tools/h5diff/h5diff_main.c @@ -19,7 +19,7 @@ /* Due to alignment issue in Alpha clusters, options must be declared here * not as a local variable in main(). */ -diff_opt_t options = {0,0,0,0,0,0,0,0,0}; +diff_opt_t options = {0,0,0,0,0,0,0,0}; static void usage(void); static int check_n_input( const char* ); @@ -56,19 +56,6 @@ int main(int argc, const char *argv[]) int nfound=0, ret; /*------------------------------------------------------------------------- - * print the command line options - *------------------------------------------------------------------------- - */ - - printf("$h5diff"); - for (i=1; i<argc ; i++) - { - printf(" %s", argv[i] ); - } - printf("\n"); - - -/*------------------------------------------------------------------------- * initial check of command line options *------------------------------------------------------------------------- */ @@ -116,9 +103,7 @@ int main(int argc, const char *argv[]) case 'v': options.verbose = 1; break; - case 'a': - options.attr = 1; - break; + break; case 'r': options.r = 1; break; @@ -172,7 +157,9 @@ int main(int argc, const char *argv[]) { /* check if it is not a -d, -p parameter */ - if ( '-' !=argv[i-1][0] ) + if ( '-'==argv[i-1][0] && ('d'==argv[i-1][1] ||'p'==argv[i-1][1] )) + continue; + else { if ( objname1==NULL ) objname1 = argv[i]; @@ -185,11 +172,28 @@ int main(int argc, const char *argv[]) else /* no */ objname2 = objname1; - } - } - } + } /*objname2*/ + } /*else*/ + } /*else*/ }/*for*/ + + +/*------------------------------------------------------------------------- + * print the command line options + *------------------------------------------------------------------------- + */ + + if (options.verbose) + { + printf("$h5diff"); + for (i=1; i<argc ; i++) + { + printf(" %s", argv[i] ); + } + printf("\n"); + } + nfound = h5diff(fname1,fname2,objname1,objname2,&options); @@ -307,7 +311,6 @@ void usage(void) printf("[-n count] Print difference up to count number\n"); printf("[-d delta] Print difference when it is greater than limit delta\n"); printf("[-p relative] Print difference when it is greater than a relative limit\n"); - printf("[-a] Compare attributes\n"); printf("\n"); printf("Items in [] are optional\n"); printf("[obj1] and [obj2] are HDF5 objects (datasets, groups or datatypes)\n"); |