- if (mailbox && !(mutt_strncasecmp (mailbox, buf, addr_len)))
- {
- numFields = sscanf (buf,
- MUTT_FORMAT(STRING) " " MUTT_FORMAT(STRING) " "
- MUTT_FORMAT(STRING) " " MUTT_FORMAT(STRING) " "
- MUTT_FORMAT(STRING) "\n",
- fields[0], fields[1],
- fields[2], fields[3],
- fields[4]);
- if (numFields < 2)
- continue;
- if (mailbox && public &&
- (!fields[4] ||
- *fields[4] == 'i' || *fields[4] == 'e' || *fields[4] == 'r'))
- continue;
-
- if (found)
- {
- if (public && *fields[4] == 'u' )
- snprintf (prompt, sizeof (prompt),
- _("ID %s is unverified. Do you want to use it for %s ?"),
- fields[1], mailbox);
- else if (public && *fields[4] == 'v' )
- snprintf (prompt, sizeof (prompt),
- _("Use (untrusted!) ID %s for %s ?"),
- fields[1], mailbox);
- else
- snprintf (prompt, sizeof (prompt), _("Use ID %s for %s ?"),
- fields[1], mailbox);
- if (may_ask == 0)
- choice = M_YES;
- if (may_ask && (choice = mutt_yesorno (prompt, M_NO)) == -1)
- {
- found = 0;
- ask = 0;
- *key = '\0';
- break;
- }
- else if (choice == M_NO)
- {
- ask = 1;
- continue;
- }
- else if (choice == M_YES)
- {
- strfcpy (key, fields[1], sizeof (key));
- ask = 0;
- break;
- }
- }
- else
- {
- if (public)
- key_trust_level = *fields[4];
- strfcpy (key, fields[1], sizeof (key));
- }
- found = 1;
+ if (mailbox && !(str_ncasecmp (mailbox, buf, addr_len))) {
+ numFields = sscanf (buf,
+ MUTT_FORMAT (STRING) " " MUTT_FORMAT (STRING) " "
+ MUTT_FORMAT (STRING) " " MUTT_FORMAT (STRING) " "
+ MUTT_FORMAT (STRING) "\n",
+ fields[0], fields[1],
+ fields[2], fields[3], fields[4]);
+ if (numFields < 2)
+ continue;
+ if (mailbox && public &&
+ (!fields[4] ||
+ *fields[4] == 'i' || *fields[4] == 'e' || *fields[4] == 'r'))
+ continue;
+
+ if (found) {
+ if (public && *fields[4] == 'u')
+ snprintf (prompt, sizeof (prompt),
+ _
+ ("ID %s is unverified. Do you want to use it for %s ?"),
+ fields[1], mailbox);
+ else if (public && *fields[4] == 'v')
+ snprintf (prompt, sizeof (prompt),
+ _("Use (untrusted!) ID %s for %s ?"),
+ fields[1], mailbox);
+ else
+ snprintf (prompt, sizeof (prompt), _("Use ID %s for %s ?"),
+ fields[1], mailbox);
+ if (may_ask == 0)
+ choice = M_YES;
+ if (may_ask && (choice = mutt_yesorno (prompt, M_NO)) == -1) {
+ found = 0;
+ ask = 0;
+ *key = '\0';
+ break;
+ }
+ else if (choice == M_NO) {
+ ask = 1;
+ continue;
+ }
+ else if (choice == M_YES) {
+ strfcpy (key, fields[1], sizeof (key));
+ ask = 0;
+ break;
+ }
+ }
+ else {
+ if (public)
+ key_trust_level = *fields[4];
+ strfcpy (key, fields[1], sizeof (key));
+ }
+ found = 1;