diff options
author | Jordan Henderson <jhenderson@hdfgroup.org> | 2019-12-28 05:02:26 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-05-20 14:20:22 (GMT) |
commit | d4aa380dd1533893fea0d50b432aaa9a3aefb221 (patch) | |
tree | ffdd9c6b0c3135fac6a20968d355235e97ed8f2f /tools/lib/h5diff.h | |
parent | 4f86f43b608133e7bcd7b4da040770c50999b430 (diff) | |
download | hdf5-d4aa380dd1533893fea0d50b432aaa9a3aefb221.zip hdf5-d4aa380dd1533893fea0d50b432aaa9a3aefb221.tar.gz hdf5-d4aa380dd1533893fea0d50b432aaa9a3aefb221.tar.bz2 |
Refactor tools library error handling macros
Diffstat (limited to 'tools/lib/h5diff.h')
-rw-r--r-- | tools/lib/h5diff.h | 49 |
1 files changed, 28 insertions, 21 deletions
diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h index 0931c1a..b04ec23 100644 --- a/tools/lib/h5diff.h +++ b/tools/lib/h5diff.h @@ -57,28 +57,35 @@ struct exclude_path_list { struct exclude_path_list * next; }; +/* Enumeration value for keeping track of whether an error occurred or differences were found */ +typedef enum { + H5DIFF_NO_ERR, /* No error occurred */ + H5DIFF_ERR_DIFF, /* Differences were found */ + H5DIFF_ERR /* An error occurred */ +} diff_err_t; + typedef struct { - int m_quiet; /* quiet mide: no output at all */ - int m_report; /* report mode: print the data */ - int m_verbose; /* verbose mode: print the data, list of objcets, warnings */ - int m_verbose_level; /* control verbose details */ - int d; /* delta, absolute value to compare */ - double delta; /* delta value */ - int p; /* relative error to compare*/ - int use_system_epsilon; /* flag to use system epsilon (1 or 0) */ - double percent; /* relative error value */ - int n; /* count, compare up to count */ - hsize_t count; /* count value */ - hbool_t follow_links; /* follow symbolic links */ - int no_dangle_links; /* return error when find dangling link */ - int err_stat; /* an error ocurred (2, error, 1, differences, 0, no error) */ - int cmn_objs; /* do we have common objects */ - int not_cmp; /* are the objects comparable */ - int contents; /* equal contents */ - int do_nans; /* consider Nans while diffing floats */ - int m_list_not_cmp; /* list not comparable messages */ - int exclude_path; /* exclude path to an object */ - struct exclude_path_list * exclude; /* keep exclude path list */ + int m_quiet; /* quiet mode: no output at all */ + int m_report; /* report mode: print the data */ + int m_verbose; /* verbose mode: print the data, list of objcets, warnings */ + int m_verbose_level; /* control verbose details */ + int d; /* delta, absolute value to compare */ + double delta; /* delta value */ + int p; /* relative error to compare*/ + int use_system_epsilon; /* flag to use system epsilon (1 or 0) */ + double percent; /* relative error value */ + int n; /* count, compare up to count */ + hsize_t count; /* count value */ + hbool_t follow_links; /* follow symbolic links */ + int no_dangle_links; /* return error when find dangling link */ + diff_err_t err_stat; /* an error ocurred (2, error, 1, differences, 0, no error) */ + int cmn_objs; /* do we have common objects */ + int not_cmp; /* are the objects comparable */ + int contents; /* equal contents */ + int do_nans; /* consider Nans while diffing floats */ + int m_list_not_cmp; /* list not comparable messages */ + int exclude_path; /* exclude path to an object */ + struct exclude_path_list * exclude; /* keep exclude path list */ } diff_opt_t; |