static const char *
pgp_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];
pgp_entry_t *entry;
int kflags = 0;
int optional = (flags & M_FORMAT_OPTIONAL);
- entry = (pgp_entry_t *) data;
+ entry = data.ptr;
uid = entry->uid;
key = uid->parent;
pkey = pgp_principal_key (key);
*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;
}
static void pgp_entry (char *s, ssize_t l, MUTTMENU * menu, int num)
entry.uid = KeyTable[num];
entry.num = num + 1;
- m_strformat (s, l, NONULL (PgpEntryFormat), pgp_entry_fmt,
- (unsigned long) &entry, M_FORMAT_ARROWCURSOR);
+ m_strformat(s, l, COLS - SW, PgpEntryFormat, pgp_entry_fmt, &entry,
+ option(OPTARROWCURSOR) ? M_FORMAT_ARROWCURSOR : 0);
}
static int _pgp_compare_address (const void *a, const void *b)
break;
}
- fp = m_tempfile (tempfile, sizeof(tempfile), NONULL(Tempdir), NULL);
+ fp = m_tempfile (tempfile, sizeof(tempfile), NONULL(MCore.tmpdir), NULL);
if (!fp) {
m_fclose(&devnull);
mutt_perror (_("Can't create temporary file"));
pgp_free_key (&key);
if (!tempf) {
- tempfp = m_tempfile (tempfb, sizeof(tempfb), NONULL(Tempdir), NULL);
+ tempfp = m_tempfile (tempfb, sizeof(tempfb), NONULL(MCore.tmpdir), NULL);
tempf = tempfb;
} else {
tempfp = safe_fopen(tempf, "a");