- char buf[LONG_STRING];
-
- snprintf (buf, sizeof (buf), "%s@%s", NONULL (u), NONULL (d));
- if (ascii_strcasecmp (str, buf) == 0)
- return 1;
-
- return 0;
-}
-
-/* returns TRUE if the given address belongs to the user. */
-int mutt_addr_is_user (address_t * addr)
-{
- /* NULL address is assumed to be the user. */
- if (!addr) {
- debug_print(5, ("yes, NULL address\n"));
- return 1;
- }
- if (!addr->mailbox) {
- debug_print(5, ("no, no mailbox\n"));
- return 0;
- }
-
- if (ascii_strcasecmp (addr->mailbox, Username) == 0) {
- debug_print(5, ("yes, %s = %s\n", addr->mailbox, Username));
- return 1;
- }
- if (string_is_address (addr->mailbox, Username, Hostname)) {
- debug_print(5, ("yes, %s = %s @ %s \n", addr->mailbox, Username, Hostname));
- return 1;
- }
- if (string_is_address (addr->mailbox, Username, mutt_fqdn (0))) {
- debug_print(5, ("yes, %s = %s @ %s \n", addr->mailbox, Username, mutt_fqdn (0)));
- return 1;
- }
- if (string_is_address (addr->mailbox, Username, mutt_fqdn (1))) {
- debug_print(5, ("yes, %s = %s @ %s \n", addr->mailbox, Username, mutt_fqdn (1)));
- return 1;
- }
-
- if (From && !ascii_strcasecmp (From->mailbox, addr->mailbox)) {
- debug_print(5, ("yes, %s = %s\n", addr->mailbox, From->mailbox));
- return 1;
- }
-
- if (rx_list_match (Alternates, addr->mailbox)) {
- debug_print(5, ("yes, %s matched by alternates.\n", addr->mailbox));
- if (rx_list_match (UnAlternates, addr->mailbox))
- debug_print(5, ("but, %s matched by unalternates.\n", addr->mailbox));
- else
- return 1;
- }
-
- debug_print(5, ("no, all failed.\n"));
- return 0;
-}
-
-static const format_t *alias_format_str (char *dest, size_t destlen, char op,
- const format_t *src, const char *fmt,
- const char *ifstring __attribute__ ((unused)),
- const char *elsestring __attribute__ ((unused)),
- unsigned long data, format_flag flags __attribute__ ((unused)))
-{
- char tmp[SHORT_STRING], adr[SHORT_STRING];
- ALIAS *alias = (ALIAS *) data;