diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2003-12-02 23:13:27 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2003-12-02 23:13:27 (GMT) |
commit | 486c13d307978ccbb9c2306c85c39a674ed56b96 (patch) | |
tree | 5c5863521d8acf6dd3c7d4db3880596fecad84de /tools/h5diff/h5diff_main.c | |
parent | 684db5595b5fa30633eb648f6e71a36d3857644a (diff) | |
download | hdf5-486c13d307978ccbb9c2306c85c39a674ed56b96.zip hdf5-486c13d307978ccbb9c2306c85c39a674ed56b96.tar.gz hdf5-486c13d307978ccbb9c2306c85c39a674ed56b96.tar.bz2 |
[svn-r7904] Purpose:
h5diff new features
Description:
added comparison for attributes
adeded comparison for all dataset datatypes
added tests for the new features
changed the output format
Solution:
Platforms tested:
linux
solaris 5.7
IRIX 6.5 (64)
Misc. update:
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"); |