From 64c3c5394121ab9f5a93a8c6d2c48511ff720536 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Mon, 4 May 2009 21:52:32 +0000 Subject: Major progress ticker bugfix/overhaul. Progress tickers had been used inconsistently for a long time, and documentation was outdated, too. Factor out common code to ease maintenance, use the report_flush() function, and add and use a macro (want_progress()) to determine if progress ticker output is desired. This makes for a much more consistent look on screen and in logfiles and should be much easier to fix later on. TODO: test syslog output. svn path=/branches/BRANCH_6-3/; revision=5290 --- fetchmail.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'fetchmail.h') diff --git a/fetchmail.h b/fetchmail.h index 4b32a889..bb3b09bf 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -764,5 +764,11 @@ int must_tls(struct query *ctl); /* prototype from rfc822valid.c */ int rfc822_valid_msgid(const unsigned char *); +/* macro to determine if we want to spam progress to stdout */ +#define want_progress() \ + ((outlevel >= O_VERBOSE || (outlevel > O_SILENT && run.showdots)) \ + && !run.use_syslog \ + && (run.showdots || !is_a_file(1))) + #endif /* fetchmail.h ends here */ -- cgit v1.2.3