From 567011285927857189a606cb5e0420b666d3a644 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Fri, 4 Aug 2000 08:06:22 +0000 Subject: SASL patch from Brendan Cully. --- account.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'account.c') diff --git a/account.c b/account.c index f095763e..2853d254 100644 --- a/account.c +++ b/account.c @@ -56,6 +56,8 @@ int mutt_account_match (const ACCOUNT* a1, const ACCOUNT* a2) /* mutt_account_getuser: retrieve username into ACCOUNT, if neccessary */ int mutt_account_getuser (ACCOUNT* account) { + char prompt[SHORT_STRING]; + /* already set */ if (account->flags & M_ACCT_USER) return 0; @@ -70,9 +72,9 @@ int mutt_account_getuser (ACCOUNT* account) /* 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)); - if (mutt_get_field (_("Username: "), account->user, - sizeof (account->user), 0)) + if (mutt_get_field (prompt, account->user, sizeof (account->user), 0)) return -1; } @@ -84,6 +86,8 @@ int mutt_account_getuser (ACCOUNT* account) /* mutt_account_getpass: fetch password into ACCOUNT, if neccessary */ int mutt_account_getpass (ACCOUNT* account) { + char prompt[SHORT_STRING]; + if (account->flags & M_ACCT_PASS) return 0; #ifdef USE_IMAP @@ -96,9 +100,10 @@ int mutt_account_getpass (ACCOUNT* account) #endif else { + snprintf (prompt, sizeof (prompt), _("Password for %s@%s: "), + account->user, account->host); account->pass[0] = '\0'; - if (mutt_get_field (_("Password: "), account->pass, - sizeof (account->pass), M_PASS)) + if (mutt_get_field (prompt, account->pass, sizeof (account->pass), M_PASS)) return -1; } -- cgit v1.2.3