diff options
author | Jonathan Kim <jkm@hdfgroup.org> | 2011-03-23 14:37:45 (GMT) |
---|---|---|
committer | Jonathan Kim <jkm@hdfgroup.org> | 2011-03-23 14:37:45 (GMT) |
commit | 2aabc3f41568a5daec0f1cae711c97a5bb82878d (patch) | |
tree | 1bcfe7eec0f9bf3910b495ec353d8fec036fd4dd /tools/lib/h5tools_utils.c | |
parent | 58ca19929fd614eddee99f0cdc95551d451b4a6a (diff) | |
download | hdf5-2aabc3f41568a5daec0f1cae711c97a5bb82878d.zip hdf5-2aabc3f41568a5daec0f1cae711c97a5bb82878d.tar.gz hdf5-2aabc3f41568a5daec0f1cae711c97a5bb82878d.tar.bz2 |
[svn-r20299] Purpose:
Fixed CHICAGO: Bug 2121 - h5diff - incorrect and lack of output for the
different set of attributes (different number and names)
Description:
Merged from HDF5 trunk r20294
Previously h5diff compared attributes correctly only when two objects have
the same number of attributes and attribute names are identical.
Also didn't display useful information about attribute difference.
This fix covers all other cases.
This fixes both issues.
Tested:
jam (linux32-LE), amani (linux64-LE), heiwa (linuxppc64-BE)
Diffstat (limited to 'tools/lib/h5tools_utils.c')
-rw-r--r-- | tools/lib/h5tools_utils.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index 7586fd0..5048b87 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -231,8 +231,11 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti if (l_opts[i].has_arg != no_arg) { if (arg[len] == '=') { opt_arg = &arg[len + 1]; - } else if (opt_ind < (argc - 1) && argv[opt_ind + 1][0] != '-') { - opt_arg = argv[++opt_ind]; + } + else if (l_opts[i].has_arg != optional_arg) { + if (opt_ind < (argc - 1)) + if (argv[opt_ind + 1][0] != '-') + opt_arg = argv[++opt_ind]; } else if (l_opts[i].has_arg == require_arg) { if (opt_err) HDfprintf(stderr, |