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;
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;
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;
}
else if (count > 0)
{
- bool force_retrieval;
+ flag force_retrieval;
/*
* What forces this code is that in POP3 and IMAP2BIS you can't
/* 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)
}
else
{
- bool wholesize = !protocol->fetch_body;
+ flag wholesize = !protocol->fetch_body;
/* request a message */
ok = (protocol->fetch_headers)(sock, ctl, num, &len);
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 */
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 */
{
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;
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 */
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 */
{
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 */
/* 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 */
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 *);