aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.h
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2009-05-04 21:52:32 +0000
committerMatthias Andree <matthias.andree@gmx.de>2009-05-04 21:52:32 +0000
commit64c3c5394121ab9f5a93a8c6d2c48511ff720536 (patch)
treee7fa39c9b88c7928acfa3d476700732958b58051 /fetchmail.h
parent51ee0c2fb3e59a2d79d68aa27d1e15d16bcbceba (diff)
downloadfetchmail-64c3c5394121ab9f5a93a8c6d2c48511ff720536.tar.gz
fetchmail-64c3c5394121ab9f5a93a8c6d2c48511ff720536.tar.bz2
fetchmail-64c3c5394121ab9f5a93a8c6d2c48511ff720536.zip
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
Diffstat (limited to 'fetchmail.h')
-rw-r--r--fetchmail.h6
1 files changed, 6 insertions, 0 deletions
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 */