X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=account.c;h=8d8a847699b9cc3997333710e12131df2c2f3edf;hp=dc877e7f1fa3eb0450c933293191837e46f4e5ba;hb=d9960a434f5c00a534a0dabe02ae5ab8d4881569;hpb=9a1efcc01ddeca4106847f8eb28a704aca2dcf0b diff --git a/account.c b/account.c index dc877e7..8d8a847 100644 --- a/account.c +++ b/account.c @@ -14,15 +14,15 @@ #endif #include +#include +#include #include #include "mutt.h" #include "enter.h" -#include "ascii.h" #include "account.h" #include "url.h" -#include "lib/str.h" /* mutt_account_match: compare account info (host/port/user/login) */ int mutt_account_match (const ACCOUNT * a1, const ACCOUNT * a2) @@ -57,11 +57,11 @@ int mutt_account_match (const ACCOUNT * a1, const ACCOUNT * a2) #endif if (a1->flags & a2->flags & M_ACCT_USER) - return (!str_cmp (a1->user, a2->user)); + return (!m_strcmp(a1->user, a2->user)); if (a1->flags & M_ACCT_USER) - return (!str_cmp (a1->user, user)); + return (!m_strcmp(a1->user, user)); if (a2->flags & M_ACCT_USER) - return (!str_cmp (a2->user, user)); + return (!m_strcmp(a2->user, user)); return 1; } @@ -147,21 +147,21 @@ int mutt_account_getuser (ACCOUNT * account) if (account->flags & M_ACCT_USER) return 0; #ifdef USE_IMAP - else if ((account->type == M_ACCT_TYPE_IMAP) && ImapUser && (ImapUser[0] != '\0')) + else if ((account->type == M_ACCT_TYPE_IMAP) && m_strlen(ImapUser)) strfcpy (account->user, ImapUser, sizeof (account->user)); #endif #ifdef USE_POP - else if ((account->type == M_ACCT_TYPE_POP) && PopUser) + else if ((account->type == M_ACCT_TYPE_POP) && m_strlen(PopUser)) strfcpy (account->user, PopUser, sizeof (account->user)); #endif #ifdef USE_NNTP - else if ((account->type == M_ACCT_TYPE_NNTP) && NntpUser) + else if ((account->type == M_ACCT_TYPE_NNTP) && m_strlen(NntpUser)) strfcpy (account->user, NntpUser, sizeof (account->user)); #endif /* prompt (defaults to unix username), copy into account->user */ else { snprintf (prompt, sizeof (prompt), _("Username at %s: "), account->host); - strfcpy (account->user, NONULL (Username), sizeof (account->user)); + strfcpy (account->user, NONULL(Username), sizeof (account->user)); if (mutt_get_field_unbuffered (prompt, account->user, sizeof (account->user), 0)) return -1; @@ -205,15 +205,15 @@ 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) && ImapPass) + else if ((account->type == M_ACCT_TYPE_IMAP) && m_strlen(ImapPass)) strfcpy (account->pass, ImapPass, sizeof (account->pass)); #endif #ifdef USE_POP - else if ((account->type == M_ACCT_TYPE_POP) && PopPass) + else if ((account->type == M_ACCT_TYPE_POP) && m_strlen(PopPass)) strfcpy (account->pass, PopPass, sizeof (account->pass)); #endif #ifdef USE_NNTP - else if ((account->type == M_ACCT_TYPE_NNTP) && NntpPass) + else if ((account->type == M_ACCT_TYPE_NNTP) && m_strlen(NntpPass)) strfcpy (account->pass, NntpPass, sizeof (account->pass)); #endif else {