X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=account.c;h=7838827f72aaefd68f057806f01e8a1a5cbde5e2;hp=3cc3a22f0d92e94af898d494eaddce35815a7649;hb=7e6ea12f3d017b6a04d86862e42ef3fd23780d8e;hpb=0ac011f8eb41bab7808881ebf9802b4eb252fe3b diff --git a/account.c b/account.c index 3cc3a22..7838827 100644 --- a/account.c +++ b/account.c @@ -9,28 +9,18 @@ /* remote host account manipulation (POP/IMAP) */ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include +#include +#include +#include #include "mutt.h" -#include "enter.h" #include "account.h" -#include "url.h" - /* mutt_account_match: compare account info (host/port/user/login) */ int mutt_account_match (const ACCOUNT * a1, const ACCOUNT * a2) { const char* user = NONULL (Username); -#ifdef USE_IMAP const char* login = NONULL (Username); -#endif if (a1->type != a2->type) return 0; @@ -39,14 +29,12 @@ int mutt_account_match (const ACCOUNT * a1, const ACCOUNT * a2) if (a1->port != a2->port) return 0; -#ifdef USE_IMAP if (a1->type == M_ACCT_TYPE_IMAP) { if (ImapUser && (ImapUser[0] != '\0')) user = ImapUser; if (ImapLogin && (ImapLogin[0] != '\0')) login = ImapLogin; } -#endif if (a1->type == M_ACCT_TYPE_POP && PopUser) user = PopUser; @@ -101,14 +89,12 @@ void mutt_account_tourl (ACCOUNT * account, ciss_url_t * url) url->pass = NULL; url->port = 0; -#ifdef USE_IMAP if (account->type == M_ACCT_TYPE_IMAP) { if (account->flags & M_ACCT_SSL) url->scheme = U_IMAPS; else url->scheme = U_IMAP; } -#endif if (account->type == M_ACCT_TYPE_POP) { if (account->flags & M_ACCT_SSL) @@ -143,10 +129,8 @@ int mutt_account_getuser (ACCOUNT * account) /* already set */ if (account->flags & M_ACCT_USER) return 0; -#ifdef USE_IMAP else if ((account->type == M_ACCT_TYPE_IMAP) && !m_strisempty(ImapUser)) m_strcpy(account->user, sizeof(account->user), ImapUser); -#endif else if ((account->type == M_ACCT_TYPE_POP) && !m_strisempty(PopUser)) m_strcpy(account->user, sizeof(account->user), PopUser); #ifdef USE_NNTP @@ -172,7 +156,6 @@ int mutt_account_getlogin (ACCOUNT* account) /* already set */ if (account->flags & M_ACCT_LOGIN) return 0; -#ifdef USE_IMAP else if (account->type == M_ACCT_TYPE_IMAP) { if (!m_strisempty(ImapLogin)) { @@ -180,7 +163,6 @@ int mutt_account_getlogin (ACCOUNT* account) account->flags |= M_ACCT_LOGIN; } } -#endif if (!(account->flags & M_ACCT_LOGIN)) { mutt_account_getuser (account); @@ -199,10 +181,8 @@ int mutt_account_getpass (ACCOUNT * account) if (account->flags & M_ACCT_PASS) return 0; -#ifdef USE_IMAP else if ((account->type == M_ACCT_TYPE_IMAP) && !m_strisempty(ImapPass)) m_strcpy(account->pass, sizeof(account->pass), ImapPass); -#endif else if ((account->type == M_ACCT_TYPE_POP) && !m_strisempty(PopPass)) m_strcpy(account->pass, sizeof(account->pass), PopPass); #ifdef USE_NNTP @@ -226,5 +206,5 @@ int mutt_account_getpass (ACCOUNT * account) void mutt_account_unsetpass (ACCOUNT * account) { - account->flags &= !M_ACCT_PASS; + account->flags &= ~M_ACCT_PASS; }