diff options
-rw-r--r-- | NEWS | 6 | ||||
-rw-r--r-- | driver.c | 22 | ||||
-rw-r--r-- | fetchmail.c | 8 | ||||
-rw-r--r-- | fetchmail.h | 48 | ||||
-rw-r--r-- | rcfile_y.y | 6 |
5 files changed, 50 insertions, 40 deletions
@@ -15,6 +15,12 @@ Release Notes: ------------------------------------------------------------------------------ +fetchmail-4.1.0 () + +* Improvements in failed-connection error messages. +* Compilation cleanup for DEC Unix 4.0 and AIX. + +------------------------------------------------------------------------------ fetchmail-4.0.0 (Wed Jul 9 10:30:16 EDT 1997) This is a "gold" version. Bug cleanup was finished (I hope...) in 3.9.9. @@ -67,7 +67,7 @@ extern char *strstr(); /* needed on sysV68 R3V7.1. */ int fetchlimit; /* how often to tear down the server connection */ int batchcount; /* count of messages sent in current batch */ -bool peek_capable; /* can we peek for better error recovery? */ +flag peek_capable; /* can we peek for better error recovery? */ static const struct method *protocol; static jmp_buf restart; @@ -452,9 +452,9 @@ char *realname; /* real name of host */ int n, linelen, oldlen, ch, remaining; char *cp; struct idlist *idp, *xmit_names; - bool good_addresses, bad_addresses, has_nuls; + flag good_addresses, bad_addresses, has_nuls; #ifdef HAVE_RES_SEARCH - bool no_local_matches = FALSE; + flag no_local_matches = FALSE; #endif /* HAVE_RES_SEARCH */ int olderrs; @@ -1048,8 +1048,8 @@ static int readbody(sock, ctl, forward, len, delimited) struct query *ctl; /* query control record */ int sock; /* to which the server is connected */ int len; /* length of message */ -bool forward; /* TRUE to forward */ -bool delimited; /* does the protocol use a message delimiter? */ +flag forward; /* TRUE to forward */ +flag delimited; /* does the protocol use a message delimiter? */ { int linelen; char buf[MSGBUFSIZE+1], *cp; @@ -1448,7 +1448,7 @@ const struct method *proto; /* protocol method table */ } else if (count > 0) { - bool force_retrieval; + flag force_retrieval; /* * What forces this code is that in POP3 and IMAP2BIS you can't @@ -1493,12 +1493,12 @@ const struct method *proto; /* protocol method table */ /* read, forward, and delete messages */ for (num = 1; num <= count; num++) { - bool toolarge = (ctl->limit > 0) + flag toolarge = (ctl->limit > 0) && msgsizes && (msgsizes[num-1] > ctl->limit); - bool fetch_it = !toolarge + flag fetch_it = !toolarge && (ctl->fetchall || force_retrieval || !(protocol->is_old && (protocol->is_old)(sock,ctl,num))); - bool suppress_delete = FALSE; - bool suppress_forward = FALSE; + flag suppress_delete = FALSE; + flag suppress_forward = FALSE; /* we may want to reject this message if it's old */ if (!fetch_it) @@ -1512,7 +1512,7 @@ const struct method *proto; /* protocol method table */ } else { - bool wholesize = !protocol->fetch_body; + flag wholesize = !protocol->fetch_body; /* request a message */ ok = (protocol->fetch_headers)(sock, ctl, num, &len); diff --git a/fetchmail.c b/fetchmail.c index 8b0bf462..3b8fa05f 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -54,15 +54,15 @@ static int query_host(struct query *); int outlevel; /* see the O_.* constants above */ /* daemon mode control */ -bool nodetach; /* if TRUE, don't detach daemon process */ -bool quitmode; /* if --quit was set */ -bool check_only; /* if --probe was set */ +flag nodetach; /* if TRUE, don't detach daemon process */ +flag quitmode; /* if --quit was set */ +flag check_only; /* if --probe was set */ char *cmd_logfile; /* if --logfile was set */ int cmd_daemon; /* if --daemon was set */ /* miscellaneous global controls */ char *idfile; /* UID list file */ -bool versioninfo; /* emit only version info */ +flag versioninfo; /* emit only version info */ char *user; /* the name of the invoking user */ char *fetchmailhost; /* the name of the host running fetchmail */ char *program_name; /* the name to prefix error messages with */ diff --git a/fetchmail.h b/fetchmail.h index e8090541..a9775c70 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -65,11 +65,15 @@ struct idlist struct idlist *next; }; +/* + * We #ifdef this and use flag rather than bool + * to avoid a type clash with curses.h + */ #ifndef TRUE -typedef char bool; /* to be compatible with curses.h */ #define FALSE 0 #define TRUE 1 #endif /* TRUE */ +typedef char flag; struct hostdata /* shared among all user connections to given server */ { @@ -82,9 +86,9 @@ struct hostdata /* shared among all user connections to given server */ int preauthenticate; /* preauthentication mode to try */ int timeout; /* inactivity timout in seconds */ char *envelope; /* envelope address list header */ - bool skip; /* suppress poll in implicit mode? */ - bool dns; /* do DNS lookup on multidrop? */ - bool uidl; /* use RFC1725 UIDLs? */ + flag skip; /* suppress poll in implicit mode? */ + flag dns; /* do DNS lookup on multidrop? */ + flag uidl; /* use RFC1725 UIDLs? */ #ifdef linux char *interface; @@ -119,13 +123,13 @@ struct query char *preconnect; /* pre-connection command to execute */ /* per-user control flags */ - bool keep; /* if TRUE, leave messages undeleted */ - bool fetchall; /* if TRUE, fetch all (not just unseen) */ - bool flush; /* if TRUE, delete messages already seen */ - bool rewrite; /* if TRUE, canonicalize recipient addresses */ - bool stripcr; /* if TRUE, strip CRs in text */ - bool forcecr; /* if TRUE, force CRs before LFs in text */ - bool pass8bits; /* if TRUE, ignore Content-Transfer-Encoding */ + flag keep; /* if TRUE, leave messages undeleted */ + flag fetchall; /* if TRUE, fetch all (not just unseen) */ + flag flush; /* if TRUE, delete messages already seen */ + flag rewrite; /* if TRUE, canonicalize recipient addresses */ + flag stripcr; /* if TRUE, strip CRs in text */ + flag forcecr; /* if TRUE, force CRs before LFs in text */ + flag pass8bits; /* if TRUE, ignore Content-Transfer-Encoding */ int limit; /* limit size of retrieved messages */ int fetchlimit; /* max # msgs to get in single poll */ int batchlimit; /* max # msgs to pass in single SMTP session */ @@ -134,7 +138,7 @@ struct query struct idlist *oldsaved, *newsaved; /* internal use */ - bool active; /* should we actually poll this server? */ + flag active; /* should we actually poll this server? */ int errcount; /* count transient errors in last pass */ int smtp_socket; /* socket descriptor for SMTP connection */ unsigned int uid; /* UID of user to deliver to */ @@ -149,9 +153,9 @@ struct method { char *name; /* protocol name */ int port; /* service port */ - bool tagged; /* if true, generate & expect command tags */ - bool delimited; /* if true, accept "." message delimiter */ - bool force_getsizes; /* if true, fetch's size return unreliable */ + flag tagged; /* if true, generate & expect command tags */ + flag delimited; /* if true, accept "." message delimiter */ + flag force_getsizes; /* if true, fetch's size return unreliable */ int (*parse_response)(); /* response_parsing function */ int (*getauth)(); /* authorization fetcher */ int (*getrange)(); /* get message range to fetch */ @@ -180,23 +184,23 @@ extern int yydebug; /* enable parse debugging */ /* daemon mode control */ extern int poll_interval; /* poll interval in seconds */ -extern bool nodetach; /* if TRUE, don't detach daemon process */ +extern flag nodetach; /* if TRUE, don't detach daemon process */ extern char *logfile; /* log file for daemon mode */ -extern bool use_syslog; /* if --syslog was set */ -extern bool quitmode; /* if --quit was set */ -extern bool check_only; /* if --check was set */ +extern flag use_syslog; /* if --syslog was set */ +extern flag quitmode; /* if --quit was set */ +extern flag check_only; /* if --check was set */ extern char *cmd_logfile; /* if --logfile was set */ extern int cmd_daemon; /* if --daemon was set */ /* these get computed */ extern int batchcount; /* count of messages sent in current batch */ -extern bool peek_capable; /* can we read msgs without setting seen? */ +extern flag peek_capable; /* can we read msgs without setting seen? */ /* miscellaneous global controls */ extern char *rcfile; /* path name of rc file */ extern char *idfile; /* path name of UID file */ extern int linelimit; /* limit # lines retrieved per site */ -extern bool versioninfo; /* emit only version info */ +extern flag versioninfo; /* emit only version info */ extern char *user; /* name of invoking user */ extern char *fetchmailhost; /* the name of the host running fetchmail */ @@ -248,7 +252,7 @@ void optmerge(struct query *, struct query *); char *MD5Digest (char *); int daemonize(const char *, void (*)(int)); -int prc_parse_file(const char *, bool); +int prc_parse_file(const char *, flag); int prc_filecheck(const char *); void interface_parse(char *, struct hostdata *); @@ -29,7 +29,7 @@ struct query cmd_opts; /* where to put command-line info */ /* parser sets these */ int poll_interval; /* poll interval in seconds */ char *logfile; /* log file for daemon mode */ -bool use_syslog; /* if syslog was set */ +flag use_syslog; /* if syslog was set */ struct query *querylist; /* head of server list (globally visible) */ int yydebug; /* in case we didn't generate with -- debug */ @@ -37,7 +37,7 @@ int yydebug; /* in case we didn't generate with -- debug */ static struct query current; /* current server record */ static int prc_errflag; static struct hostdata *leadentry; -static bool trailer; +static flag trailer; static void record_current(); static void user_reset(); @@ -303,7 +303,7 @@ const char *pathname; /* pathname for the configuration file */ int prc_parse_file (pathname, securecheck) /* digest the configuration into a linked list of host records */ const char *pathname; /* pathname for the configuration file */ -const bool securecheck; /* check for a secure rc file? */ +const flag securecheck; /* check for a secure rc file? */ { prc_errflag = 0; querylist = hosttail = (struct query *)NULL; |