diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/options.h | 1 | ||||
| -rw-r--r-- | include/output.h | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/options.h b/include/options.h index cae9aa0..c92dbdf 100644 --- a/include/options.h +++ b/include/options.h @@ -30,6 +30,7 @@ extern bool option_sort_reverse_order; extern enum esort_type option_sort_type; extern bool option_print_boxed_table; extern bool option_print_header; +extern bool option_quiet; extern bool option_resolve_symlinks; extern bool option_show_hidden_entries; extern bool option_timestamp_long; diff --git a/include/output.h b/include/output.h index 53f0869..38546aa 100644 --- a/include/output.h +++ b/include/output.h @@ -8,10 +8,11 @@ #define OUTPUT_H #include <stdio.h> +#include "options.h" #include "data_management.h" -#define LOGERR(...) {fprintf(stderr, "[%s:%d] %s: ", __FILE__, __LINE__, __func__); fprintf(stderr, __VA_ARGS__);} +#define LOGERR(...) {if (!option_quiet){ fprintf(stderr, "[%s:%d] %s: ", __FILE__, __LINE__, __func__); fprintf(stderr, __VA_ARGS__); }} #ifdef DEBUGBUILD #define DBGTRC(...) LOGERR(__VA_ARGS__) |
