static const char *
crypt_entry_fmt (char *dest, ssize_t destlen, char op,
const char *src, const char *prefix,
- const char *ifstring, const char *elsestring,
- unsigned long data, format_flag flags)
+ const char *ifstr, const char *elstr,
+ anytype data, format_flag flags)
{
char fmt[16];
crypt_entry_t *entry;
const char *s = NULL;
unsigned long val;
- entry = (crypt_entry_t *) data;
+ entry = data.ptr;
key = entry->key;
/* if (isupper ((unsigned char) op)) */
*dest = '\0';
}
- if (optional)
- m_strformat (dest, destlen, ifstring, mutt_attach_fmt, data, 0);
- else if (flags & M_FORMAT_OPTIONAL)
- m_strformat (dest, destlen, elsestring, mutt_attach_fmt, data, 0);
- return (src);
+ if (flags & M_FORMAT_OPTIONAL)
+ m_strformat(dest, destlen, 0, optional ? ifstr: elstr,
+ mutt_attach_fmt, data, 0);
+ return src;
}
/* Used by the display fucntion to format a line. */
entry.key = key_table[num];
entry.num = num + 1;
- m_strformat (s, l, NONULL (PgpEntryFormat), crypt_entry_fmt,
- (unsigned long) &entry, M_FORMAT_ARROWCURSOR);
+ m_strformat(s, l, COLS - SW, PgpEntryFormat, crypt_entry_fmt, &entry,
+ option(OPTARROWCURSOR) ? M_FORMAT_ARROWCURSOR : 0);
}
/* Compare two addresses and the keyid to be used for sorting. */