summaryrefslogtreecommitdiffstats
path: root/tools/src/h5diff/h5diff_common.c
diff options
context:
space:
mode:
authorJordan Henderson <jhenderson@hdfgroup.org>2019-12-28 05:02:26 (GMT)
committerJordan Henderson <jhenderson@hdfgroup.org>2019-12-28 20:08:04 (GMT)
commit2cbf31cb3ad8032fb1915c783dc52a2050aaf7da (patch)
treed88ce3a7584792894bd073df1f2290f22eb69daa /tools/src/h5diff/h5diff_common.c
parent34a68acc934800d6b8c9a51c2ce91155b3178111 (diff)
downloadhdf5-2cbf31cb3ad8032fb1915c783dc52a2050aaf7da.zip
hdf5-2cbf31cb3ad8032fb1915c783dc52a2050aaf7da.tar.gz
hdf5-2cbf31cb3ad8032fb1915c783dc52a2050aaf7da.tar.bz2
Refactor tools library error handling macros
Diffstat (limited to 'tools/src/h5diff/h5diff_common.c')
-rw-r--r--tools/src/h5diff/h5diff_common.c45
1 files changed, 22 insertions, 23 deletions
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c
index 362e3f2..e05a8e3 100644
--- a/tools/src/h5diff/h5diff_common.c
+++ b/tools/src/h5diff/h5diff_common.c
@@ -302,30 +302,29 @@ void parse_command_line(int argc,
*
*-------------------------------------------------------------------------
*/
+void print_info(diff_opt_t* opts)
+{
+ if (opts->m_quiet || opts->err_stat)
+ return;
+
+ if (opts->cmn_objs == 0) {
+ HDprintf("No common objects found. Files are not comparable.\n");
+ if (!opts->m_verbose)
+ HDprintf("Use -v for a list of objects.\n");
+ }
- void print_info(diff_opt_t* opts)
- {
- if (opts->m_quiet || opts->err_stat)
- return;
-
- if (opts->cmn_objs == 0) {
- HDprintf("No common objects found. Files are not comparable.\n");
- if (!opts->m_verbose)
- HDprintf("Use -v for a list of objects.\n");
- }
-
- if (opts->not_cmp == 1) {
- if (opts->m_list_not_cmp == 0) {
- HDprintf("--------------------------------\n");
- HDprintf("Some objects are not comparable\n");
- HDprintf("--------------------------------\n");
- if (opts->m_verbose)
- HDprintf("Use -c for a list of objects without details of differences.\n");
- else
- HDprintf("Use -c for a list of objects.\n");
- }
- }
- }
+ if (opts->not_cmp == 1) {
+ if (opts->m_list_not_cmp == 0) {
+ HDprintf("--------------------------------\n");
+ HDprintf("Some objects are not comparable\n");
+ HDprintf("--------------------------------\n");
+ if (opts->m_verbose)
+ HDprintf("Use -c for a list of objects without details of differences.\n");
+ else
+ HDprintf("Use -c for a list of objects.\n");
+ }
+ }
+}
/*-------------------------------------------------------------------------
* Function: check_n_input