static const char *
_mutt_fmt_pgp_command(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];
- struct pgp_command_context *cctx = (struct pgp_command_context *) data;
+ struct pgp_command_context *cctx = data.ptr;
int optional = (flags & M_FORMAT_OPTIONAL);
switch (op) {
}
}
- if (optional)
- mutt_FormatString (dest, destlen, ifstring, _mutt_fmt_pgp_command, data,
- 0);
- else if (flags & M_FORMAT_OPTIONAL)
- mutt_FormatString (dest, destlen, elsestring, _mutt_fmt_pgp_command, data,
- 0);
+ if (flags & M_FORMAT_OPTIONAL)
+ m_strformat(dest, destlen, 0, optional ? ifstr : elstr,
+ _mutt_fmt_pgp_command, data, 0);
- return (src);
+ return src;
}
static void
mutt_pgp_command(char *d, ssize_t dlen, struct pgp_command_context *cctx,
const char *fmt)
{
- mutt_FormatString (d, dlen, NONULL (fmt), _mutt_fmt_pgp_command,
- (unsigned long) cctx, 0);
+ m_strformat(d, dlen, 0, fmt, _mutt_fmt_pgp_command, cctx, 0);
}
/*