}
/**
- * _mutt_parse_uncolor - Parse an 'uncolor' command
+ * parse_uncolor - Parse an 'uncolor' command
*
* usage:
* * uncolor index pattern [pattern...]
* * unmono index pattern [pattern...]
*/
-static int _mutt_parse_uncolor(struct Buffer *buf, struct Buffer *s, unsigned long data,
- struct Buffer *err, short parse_uncolor)
+static int parse_uncolor(struct Buffer *buf, struct Buffer *s, unsigned long data,
+ struct Buffer *err, short parse_uncolor)
{
int object = 0, do_cache = 0;
int mutt_parse_uncolor(struct Buffer *buf, struct Buffer *s, unsigned long data,
struct Buffer *err)
{
- return _mutt_parse_uncolor(buf, s, data, err, 1);
+ return parse_uncolor(buf, s, data, err, 1);
}
#endif
int mutt_parse_unmono(struct Buffer *buf, struct Buffer *s, unsigned long data,
struct Buffer *err)
{
- return _mutt_parse_uncolor(buf, s, data, err, 0);
+ return parse_uncolor(buf, s, data, err, 0);
}
static int add_pattern(struct ColorLineHead *top, const char *s, int sensitive, int fg,
}
/**
- * _mutt_parse_color - Parse a "color" command
+ * parse_color - Parse a "color" command
*
* usage: color OBJECT FG BG [ REGEX ]
* mono OBJECT ATTR [ REGEX ]
*/
-static int _mutt_parse_color(struct Buffer *buf, struct Buffer *s, struct Buffer *err,
- parser_callback_t callback, bool dry_run)
+static int parse_color(struct Buffer *buf, struct Buffer *s, struct Buffer *err,
+ parser_callback_t callback, bool dry_run)
{
int object = 0, attr = 0, fg = 0, bg = 0, q_level = 0;
int r = 0, match = 0;
if (option(OPT_NO_CURSES) || !has_colors())
dry_run = true;
- return _mutt_parse_color(buff, s, err, parse_color_pair, dry_run);
+ return parse_color(buff, s, err, parse_color_pair, dry_run);
}
#endif
dry_run = true;
#endif
- return _mutt_parse_color(buff, s, err, parse_attr_spec, dry_run);
+ return parse_color(buff, s, err, parse_attr_spec, dry_run);
}
}
/**
- * _mutt_pipe_message - Pipe message to a command
+ * pipe_message - Pipe message to a command
*
* The following code is shared between printing and piping.
*/
-static int _mutt_pipe_message(struct Header *h, char *cmd, int decode,
- int print, int split, char *sep)
+static int pipe_message(struct Header *h, char *cmd, int decode, int print,
+ int split, char *sep)
{
int rc = 0;
pid_t thepid;
return;
mutt_expand_path(buffer, sizeof(buffer));
- _mutt_pipe_message(h, buffer, option(OPT_PIPE_DECODE), 0, option(OPT_PIPE_SPLIT), PipeSep);
+ pipe_message(h, buffer, option(OPT_PIPE_DECODE), 0, option(OPT_PIPE_SPLIT), PipeSep);
}
void mutt_print_message(struct Header *h)
h ? _("Print message?") : _("Print tagged messages?")) != MUTT_YES)
return;
- if (_mutt_pipe_message(h, PrintCommand, option(OPT_PRINT_DECODE), 1,
- option(OPT_PRINT_SPLIT), "\f") == 0)
+ if (pipe_message(h, PrintCommand, option(OPT_PRINT_DECODE), 1,
+ option(OPT_PRINT_SPLIT), "\f") == 0)
mutt_message(h ? _("Message printed") : _("Messages printed"));
else
mutt_message(h ? _("Message could not be printed") :
return structure_changed;
}
-static int _mutt_check_traditional_pgp(struct Header *h, int *redraw)
+static int check_traditional_pgp(struct Header *h, int *redraw)
{
struct Message *msg = NULL;
int rv = 0;
{
int rv = 0;
if (h && !(h->security & PGP_TRADITIONAL_CHECKED))
- rv = _mutt_check_traditional_pgp(h, redraw);
+ rv = check_traditional_pgp(h, redraw);
else
{
for (int i = 0; i < Context->msgcount; i++)
{
if (message_is_tagged(Context, i) && !(Context->hdrs[i]->security & PGP_TRADITIONAL_CHECKED))
{
- rv = _mutt_check_traditional_pgp(Context->hdrs[i], redraw) || rv;
+ rv = check_traditional_pgp(Context->hdrs[i], redraw) || rv;
}
}
}
}
/**
- * _mutt_append_message - appends a copy of the given message to a mailbox
+ * append_message - appends a copy of the given message to a mailbox
* @param dest destination mailbox
* @param fpin where to get input
* @param src source mailbox
* @retval 0 on success
* @retval -1 on error
*/
-static int _mutt_append_message(struct Context *dest, FILE *fpin,
- struct Context *src, struct Header *hdr,
- struct Body *body, int flags, int chflags)
+static int append_message(struct Context *dest, FILE *fpin, struct Context *src,
+ struct Header *hdr, struct Body *body, int flags, int chflags)
{
char buf[STRING];
struct Message *msg = NULL;
msg = mx_open_message(src, hdr->msgno);
if (!msg)
return -1;
- r = _mutt_append_message(dest, msg->fp, src, hdr, hdr->content, cmflags, chflags);
+ r = append_message(dest, msg->fp, src, hdr, hdr->content, cmflags, chflags);
mx_close_message(src, &msg);
return r;
}
mutt_pretty_mailbox(path, pathlen);
}
-static char *_mutt_string_hook(const char *match, int hook)
+static char *string_hook(const char *match, int hook)
{
struct Hook *tmp = NULL;
return NULL;
}
-static void _mutt_list_hook(struct ListHead *matches, const char *match, int hook)
+static void list_hook(struct ListHead *matches, const char *match, int hook)
{
struct Hook *tmp = NULL;
char *mutt_charset_hook(const char *chs)
{
- return _mutt_string_hook(chs, MUTT_CHARSETHOOK);
+ return string_hook(chs, MUTT_CHARSETHOOK);
}
char *mutt_iconv_hook(const char *chs)
{
- return _mutt_string_hook(chs, MUTT_ICONVHOOK);
+ return string_hook(chs, MUTT_ICONVHOOK);
}
void mutt_crypt_hook(struct ListHead *list, struct Address *adr)
{
- _mutt_list_hook(list, adr->mailbox, MUTT_CRYPTHOOK);
+ list_hook(list, adr->mailbox, MUTT_CRYPTHOOK);
}
#ifdef USE_SOCKET
return 0;
}
-static void _alternates_clean(void)
+static void alternates_clean(void)
{
if (Context && Context->msgcount)
{
{
struct GroupContext *gc = NULL;
- _alternates_clean();
+ alternates_clean();
do
{
static int parse_unalternates(struct Buffer *buf, struct Buffer *s,
unsigned long data, struct Buffer *err)
{
- _alternates_clean();
+ alternates_clean();
do
{
mutt_extract_token(buf, s, 0);
}
/**
- * _attachments_clean - always wise to do what someone else did before
+ * attachments_clean - always wise to do what someone else did before
*/
-static void _attachments_clean(void)
+static void attachments_clean(void)
{
if (Context && Context->msgcount)
{
mutt_list_insert_tail(head, (char *) a);
} while (MoreArgs(s));
- _attachments_clean();
+ attachments_clean();
return 0;
}
} while (MoreArgs(s));
FREE(&tmp);
- _attachments_clean();
+ attachments_clean();
return 0;
}
}
/**
- * _maildir_commit_message - Commit a message to a maildir folder
+ * md_commit_message - Commit a message to a maildir folder
*
* msg->path contains the file name of a file in tmp/. We take the
* flags from this file's name.
*
* See also maildir_open_new_message().
*/
-static int _maildir_commit_message(struct Context *ctx, struct Message *msg, struct Header *hdr)
+static int md_commit_message(struct Context *ctx, struct Message *msg, struct Header *hdr)
{
char subdir[4];
char suffix[16];
(long long) time(NULL), mutt_rand64(), NONULL(ShortHostname), suffix);
snprintf(full, _POSIX_PATH_MAX, "%s/%s", ctx->path, path);
- mutt_debug(2, "_maildir_commit_message (): renaming %s to %s.\n", msg->path, full);
+ mutt_debug(2, "md_commit_message (): renaming %s to %s.\n", msg->path, full);
if (safe_rename(msg->path, full) == 0)
{
ut.modtime = msg->received;
if (utime(full, &ut))
{
- mutt_perror(
- _("_maildir_commit_message(): unable to set time on file"));
+ mutt_perror(_("md_commit_message(): unable to set time on file"));
goto post_rename_err;
}
}
static int maildir_commit_message(struct Context *ctx, struct Message *msg)
{
- return _maildir_commit_message(ctx, msg, NULL);
+ return md_commit_message(ctx, msg, NULL);
}
/*
* commit a message to an MH folder.
*/
-static int _mh_commit_message(struct Context *ctx, struct Message *msg,
- struct Header *hdr, short updseq)
+static int mh_commit_msg(struct Context *ctx, struct Message *msg,
+ struct Header *hdr, short updseq)
{
DIR *dirp = NULL;
struct dirent *de = NULL;
static int mh_commit_message(struct Context *ctx, struct Message *msg)
{
- return _mh_commit_message(ctx, msg, NULL, 1);
+ return mh_commit_msg(ctx, msg, NULL, 1);
}
/**
strfcpy(partpath, h->path, _POSIX_PATH_MAX);
if (ctx->magic == MUTT_MAILDIR)
- rc = _maildir_commit_message(ctx, dest, h);
+ rc = md_commit_message(ctx, dest, h);
else
- rc = _mh_commit_message(ctx, dest, h, 0);
+ rc = mh_commit_msg(ctx, dest, h, 0);
mx_close_message(ctx, &dest);
}
/**
- * _maildir_open_find_message - Find a message in a maildir folder
+ * md_open_find_message - Find a message in a maildir folder
*
* These functions try to find a message in a maildir folder when it
* has moved under our feet. Note that this code is rather expensive, but
* then again, it's called rarely.
*/
-static FILE *_maildir_open_find_message(const char *folder, const char *unique,
- const char *subfolder, char **newname)
+static FILE *md_open_find_message(const char *folder, const char *unique,
+ const char *subfolder, char **newname)
{
char dir[_POSIX_PATH_MAX];
char tunique[_POSIX_PATH_MAX];
maildir_canon_filename(unique, msg, sizeof(unique));
- if ((fp = _maildir_open_find_message(
- folder, unique, new_hits > cur_hits ? "new" : "cur", newname)) ||
+ if ((fp = md_open_find_message(folder, unique, new_hits > cur_hits ? "new" : "cur", newname)) ||
errno != ENOENT)
{
if (new_hits < UINT_MAX && cur_hits < UINT_MAX)
return fp;
}
- if ((fp = _maildir_open_find_message(
- folder, unique, new_hits > cur_hits ? "cur" : "new", newname)) ||
+ if ((fp = md_open_find_message(folder, unique, new_hits > cur_hits ? "cur" : "new", newname)) ||
errno != ENOENT)
{
if (new_hits < UINT_MAX && cur_hits < UINT_MAX)
#include "protos.h"
#include "rfc822.h"
-static int _handle_panic(lua_State *l)
+static int handle_panic(lua_State *l)
{
mutt_debug(1, "lua runtime panic: %s\n", lua_tostring(l, -1));
mutt_error("Lua runtime panic: %s\n", lua_tostring(l, -1));
return -1;
}
-static int _handle_error(lua_State *l)
+static int handle_error(lua_State *l)
{
mutt_debug(1, "lua runtime error: %s\n", lua_tostring(l, -1));
mutt_error("Lua runtime error: %s\n", lua_tostring(l, -1));
return -1;
}
-static int _lua_mutt_call(lua_State *l)
+static int lua_mutt_call(lua_State *l)
{
- mutt_debug(2, " * _lua_mutt_call()\n");
+ mutt_debug(2, " * lua_mutt_call()\n");
struct Buffer token, expn, err;
char buffer[LONG_STRING] = "";
const struct Command *command = NULL;
else
{
if (lua_pushstring(l, err.data) == NULL)
- _handle_error(l);
+ handle_error(l);
else
rv++;
}
return rv;
}
-static int _lua_mutt_set(lua_State *l)
+static int lua_mutt_set(lua_State *l)
{
int rv = -1;
const char *param = lua_tostring(l, -2);
- mutt_debug(2, " * _lua_mutt_set(%s)\n", param);
+ mutt_debug(2, " * lua_mutt_set(%s)\n", param);
struct Option opt;
char err_str[LONG_STRING];
struct Buffer err;
return rv;
}
-static int _lua_mutt_get(lua_State *l)
+static int lua_mutt_get(lua_State *l)
{
const char *param = lua_tostring(l, -1);
- mutt_debug(2, " * _lua_mutt_get(%s)\n", param);
+ mutt_debug(2, " * lua_mutt_get(%s)\n", param);
struct Option opt;
if (mutt_option_get(param, &opt))
return -1;
}
}
- mutt_debug(2, " * _lua_mutt_get() -> error\n");
+ mutt_debug(2, " * lua_mutt_get() -> error\n");
luaL_error(l, "NeoMutt parameter not found %s", param);
return -1;
}
-static int _lua_mutt_enter(lua_State *l)
+static int lua_mutt_enter(lua_State *l)
{
- mutt_debug(2, " * _lua_mutt_enter()\n");
+ mutt_debug(2, " * lua_mutt_enter()\n");
struct Buffer token, err;
char *buffer = safe_strdup(lua_tostring(l, -1));
int rv = 0;
else
{
if (lua_pushstring(l, err.data) == NULL)
- _handle_error(l);
+ handle_error(l);
else
rv++;
}
return rv;
}
-static int _lua_mutt_message(lua_State *l)
+static int lua_mutt_message(lua_State *l)
{
- mutt_debug(2, " * _lua_mutt_message()\n");
+ mutt_debug(2, " * lua_mutt_message()\n");
const char *msg = lua_tostring(l, -1);
if (msg)
mutt_message(msg);
return 0;
}
-static int _lua_mutt_error(lua_State *l)
+static int lua_mutt_error(lua_State *l)
{
- mutt_debug(2, " * _lua_mutt_error()\n");
+ mutt_debug(2, " * lua_mutt_error()\n");
const char *msg = lua_tostring(l, -1);
if (msg)
mutt_error(msg);
return 0;
}
-static void _lua_expose_command(void *p, const struct Command *cmd)
+static void lua_expose_command(void *p, const struct Command *cmd)
{
lua_State *l = (lua_State *) p;
char buf[LONG_STRING];
}
static const luaL_Reg luaMuttDecl[] = {
- { "set", _lua_mutt_set }, { "get", _lua_mutt_get },
- { "call", _lua_mutt_call }, { "enter", _lua_mutt_enter },
- { "print", _lua_mutt_message }, { "message", _lua_mutt_message },
- { "error", _lua_mutt_error }, { NULL, NULL },
+ { "set", lua_mutt_set }, { "get", lua_mutt_get },
+ { "call", lua_mutt_call }, { "enter", lua_mutt_enter },
+ { "print", lua_mutt_message }, { "message", lua_mutt_message },
+ { "error", lua_mutt_error }, { NULL, NULL },
};
#define lua_add_lib_member(LUA, TABLE, KEY, VALUE, DATATYPE_HANDLER) \
{
luaL_requiref(l, "mutt", luaopen_mutt_decl, 1);
(void) luaL_dostring(l, "mutt.command = {}");
- mutt_commands_apply((void *) l, &_lua_expose_command);
+ mutt_commands_apply((void *) l, &lua_expose_command);
}
-static bool _lua_init(lua_State **l)
+static bool lua_init(lua_State **l)
{
if (!*l)
{
return false;
}
- lua_atpanic(*l, _handle_panic);
+ lua_atpanic(*l, handle_panic);
/* load various Lua libraries */
luaL_openlibs(*l);
int mutt_lua_parse(struct Buffer *tmp, struct Buffer *s, unsigned long data, struct Buffer *err)
{
- _lua_init(&Lua);
+ lua_init(&Lua);
mutt_debug(2, " * mutt_lua_parse(%s)\n", tmp->data);
if (luaL_dostring(Lua, s->dptr))
{
mutt_debug(2, " * mutt_lua_source()\n");
- _lua_init(&Lua);
+ lua_init(&Lua);
char path[_POSIX_PATH_MAX];
}
/**
- * _crypt_compare_address - Compare Key addresses and IDs for sorting
+ * compare_key_address - Compare Key addresses and IDs for sorting
*/
-static int _crypt_compare_address(const void *a, const void *b)
+static int compare_key_address(const void *a, const void *b)
{
struct CryptKeyInfo **s = (struct CryptKeyInfo **) a;
struct CryptKeyInfo **t = (struct CryptKeyInfo **) b;
static int crypt_compare_address(const void *a, const void *b)
{
- return ((PgpSortKeys & SORT_REVERSE) ? !_crypt_compare_address(a, b) :
- _crypt_compare_address(a, b));
+ return ((PgpSortKeys & SORT_REVERSE) ? !compare_key_address(a, b) :
+ compare_key_address(a, b));
}
/**
- * _crypt_compare_keyid - Compare Key IDs and addresses for sorting
+ * compare_keyid - Compare Key IDs and addresses for sorting
*/
-static int _crypt_compare_keyid(const void *a, const void *b)
+static int compare_keyid(const void *a, const void *b)
{
struct CryptKeyInfo **s = (struct CryptKeyInfo **) a;
struct CryptKeyInfo **t = (struct CryptKeyInfo **) b;
static int crypt_compare_keyid(const void *a, const void *b)
{
- return ((PgpSortKeys & SORT_REVERSE) ? !_crypt_compare_keyid(a, b) :
- _crypt_compare_keyid(a, b));
+ return ((PgpSortKeys & SORT_REVERSE) ? !compare_keyid(a, b) : compare_keyid(a, b));
}
/**
- * _crypt_compare_date - Compare Key creation dates and addresses for sorting
+ * compare_key_date - Compare Key creation dates and addresses for sorting
*/
-static int _crypt_compare_date(const void *a, const void *b)
+static int compare_key_date(const void *a, const void *b)
{
struct CryptKeyInfo **s = (struct CryptKeyInfo **) a;
struct CryptKeyInfo **t = (struct CryptKeyInfo **) b;
static int crypt_compare_date(const void *a, const void *b)
{
- return ((PgpSortKeys & SORT_REVERSE) ? !_crypt_compare_date(a, b) :
- _crypt_compare_date(a, b));
+ return ((PgpSortKeys & SORT_REVERSE) ? !compare_key_date(a, b) : compare_key_date(a, b));
}
/**
- * _crypt_compare_trust - Compare the trust of keys for sorting
+ * compare_key_trust - Compare the trust of keys for sorting
*
* Compare two trust values, the key length, the creation dates. the addresses
* and the key IDs.
*/
-static int _crypt_compare_trust(const void *a, const void *b)
+static int compare_key_trust(const void *a, const void *b)
{
struct CryptKeyInfo **s = (struct CryptKeyInfo **) a;
struct CryptKeyInfo **t = (struct CryptKeyInfo **) b;
static int crypt_compare_trust(const void *a, const void *b)
{
- return ((PgpSortKeys & SORT_REVERSE) ? !_crypt_compare_trust(a, b) :
- _crypt_compare_trust(a, b));
+ return ((PgpSortKeys & SORT_REVERSE) ? !compare_key_trust(a, b) :
+ compare_key_trust(a, b));
}
/**
return true;
}
-static struct PgpKeyInfo *_pgp_parent(struct PgpKeyInfo *k)
+static struct PgpKeyInfo *key_parent(struct PgpKeyInfo *k)
{
if ((k->flags & KEYFLAG_SUBKEY) && k->parent && option(OPT_PGP_IGNORE_SUBKEYS))
k = k->parent;
char *pgp_long_keyid(struct PgpKeyInfo *k)
{
- k = _pgp_parent(k);
+ k = key_parent(k);
return k->keyid;
}
char *pgp_short_keyid(struct PgpKeyInfo *k)
{
- k = _pgp_parent(k);
+ k = key_parent(k);
return k->keyid + 8;
}
char *pgp_keyid(struct PgpKeyInfo *k)
{
- k = _pgp_parent(k);
+ k = key_parent(k);
return _pgp_keyid(k);
}
static char *pgp_fingerprint(struct PgpKeyInfo *k)
{
- k = _pgp_parent(k);
+ k = key_parent(k);
return k->fingerprint;
}
const char *ids; /**< %r */
};
-static const char *_mutt_fmt_pgp_command(char *dest, size_t destlen, size_t col,
- int cols, char op, const char *src,
- const char *prefix, const char *ifstring,
- const char *elsestring,
- unsigned long data, enum FormatFlag flags)
+static const char *fmt_pgp_command(char *dest, size_t destlen, size_t col, int cols,
+ char op, const char *src, const char *prefix,
+ const char *ifstring, const char *elsestring,
+ unsigned long data, enum FormatFlag flags)
{
char fmt[16];
struct PgpCommandContext *cctx = (struct PgpCommandContext *) data;
}
if (optional)
- mutt_expando_format(dest, destlen, col, cols, ifstring, _mutt_fmt_pgp_command, data, 0);
+ mutt_expando_format(dest, destlen, col, cols, ifstring, fmt_pgp_command, data, 0);
else if (flags & MUTT_FORMAT_OPTIONAL)
- mutt_expando_format(dest, destlen, col, cols, elsestring,
- _mutt_fmt_pgp_command, data, 0);
+ mutt_expando_format(dest, destlen, col, cols, elsestring, fmt_pgp_command, data, 0);
return src;
}
struct PgpCommandContext *cctx, const char *fmt)
{
mutt_expando_format(d, dlen, 0, MuttIndexWindow->cols, NONULL(fmt),
- _mutt_fmt_pgp_command, (unsigned long) cctx, 0);
+ fmt_pgp_command, (unsigned long) cctx, 0);
mutt_debug(2, "mutt_pgp_command: %s\n", d);
}
pgp_entry_fmt, (unsigned long) &entry, MUTT_FORMAT_ARROWCURSOR);
}
-static int _pgp_compare_address(const void *a, const void *b)
+static int compare_key_address(const void *a, const void *b)
{
int r;
static int pgp_compare_address(const void *a, const void *b)
{
- return ((PgpSortKeys & SORT_REVERSE) ? !_pgp_compare_address(a, b) :
- _pgp_compare_address(a, b));
+ return ((PgpSortKeys & SORT_REVERSE) ? !compare_key_address(a, b) :
+ compare_key_address(a, b));
}
-static int _pgp_compare_keyid(const void *a, const void *b)
+static int compare_keyid(const void *a, const void *b)
{
int r;
static int pgp_compare_keyid(const void *a, const void *b)
{
- return ((PgpSortKeys & SORT_REVERSE) ? !_pgp_compare_keyid(a, b) :
- _pgp_compare_keyid(a, b));
+ return ((PgpSortKeys & SORT_REVERSE) ? !compare_keyid(a, b) : compare_keyid(a, b));
}
-static int _pgp_compare_date(const void *a, const void *b)
+static int compare_key_date(const void *a, const void *b)
{
int r;
struct PgpUid **s = (struct PgpUid **) a;
static int pgp_compare_date(const void *a, const void *b)
{
- return ((PgpSortKeys & SORT_REVERSE) ? !_pgp_compare_date(a, b) :
- _pgp_compare_date(a, b));
+ return ((PgpSortKeys & SORT_REVERSE) ? !compare_key_date(a, b) : compare_key_date(a, b));
}
-static int _pgp_compare_trust(const void *a, const void *b)
+static int compare_key_trust(const void *a, const void *b)
{
int r;
static int pgp_compare_trust(const void *a, const void *b)
{
- return ((PgpSortKeys & SORT_REVERSE) ? !_pgp_compare_trust(a, b) :
- _pgp_compare_trust(a, b));
+ return ((PgpSortKeys & SORT_REVERSE) ? !compare_key_trust(a, b) :
+ compare_key_trust(a, b));
}
static bool pgp_key_is_valid(struct PgpKeyInfo *k)
return l;
}
-static void _pgp_free_key(struct PgpKeyInfo **kpp)
+static void free_key(struct PgpKeyInfo **kpp)
{
struct PgpKeyInfo *kp = NULL;
for (q = p->next; q && q->parent == p; q = r)
{
r = q->next;
- _pgp_free_key(&q);
+ free_key(&q);
}
if (p->parent)
- _pgp_free_key(&p->parent);
+ free_key(&p->parent);
- _pgp_free_key(&p);
+ free_key(&p);
}
*kpp = NULL;
*/
/**
- * _mutt_fmt_smime_command - Format an SMIME command
+ * fmt_smime_command - Format an SMIME command
*
* This is almost identical to pgp's invoking interface.
*/
-static const char *_mutt_fmt_smime_command(char *dest, size_t destlen, size_t col,
- int cols, char op, const char *src,
- const char *prefix, const char *ifstring,
- const char *elsestring,
- unsigned long data, enum FormatFlag flags)
+static const char *fmt_smime_command(char *dest, size_t destlen, size_t col, int cols,
+ char op, const char *src, const char *prefix,
+ const char *ifstring, const char *elsestring,
+ unsigned long data, enum FormatFlag flags)
{
char fmt[16];
struct SmimeCommandContext *cctx = (struct SmimeCommandContext *) data;
}
if (optional)
- mutt_expando_format(dest, destlen, col, cols, ifstring,
- _mutt_fmt_smime_command, data, 0);
+ mutt_expando_format(dest, destlen, col, cols, ifstring, fmt_smime_command, data, 0);
else if (flags & MUTT_FORMAT_OPTIONAL)
- mutt_expando_format(dest, destlen, col, cols, elsestring,
- _mutt_fmt_smime_command, data, 0);
+ mutt_expando_format(dest, destlen, col, cols, elsestring, fmt_smime_command, data, 0);
return src;
}
struct SmimeCommandContext *cctx, const char *fmt)
{
mutt_expando_format(d, dlen, 0, MuttIndexWindow->cols, NONULL(fmt),
- _mutt_fmt_smime_command, (unsigned long) cctx, 0);
+ fmt_smime_command, (unsigned long) cctx, 0);
mutt_debug(2, "smime_command: %s\n", d);
}
}
/**
- * _smime_getkeys - Get the keys for a mailbox
+ * getkeys - Get the keys for a mailbox
*
* This sets the '*ToUse' variables for an upcoming decryption, where the
* required key is different from SmimeDefaultKey.
*/
-static void _smime_getkeys(char *mailbox)
+static void getkeys(char *mailbox)
{
struct SmimeKey *key = NULL;
char *k = NULL;
if (mutt_addr_is_user(t))
{
found = true;
- _smime_getkeys(t->mailbox);
+ getkeys(t->mailbox);
}
for (t = env->cc; !found && t; t = t->next)
if (mutt_addr_is_user(t))
{
found = true;
- _smime_getkeys(t->mailbox);
+ getkeys(t->mailbox);
}
if (!found && (t = mutt_default_from()))
{
- _smime_getkeys(t->mailbox);
+ getkeys(t->mailbox);
rfc822_free_address(&t);
}
}
rfc2047_decode(&env->subject);
}
-static int _mutt_bounce_message(FILE *fp, struct Header *h, struct Address *to,
- const char *resent_from, struct Address *env_from)
+static int bounce_message(FILE *fp, struct Header *h, struct Address *to,
+ const char *resent_from, struct Address *env_from)
{
int ret = 0;
FILE *f = NULL;
/* Try to bounce each message out, aborting if we get any failures. */
for (int i = 0; i < Context->msgcount; i++)
if (message_is_tagged(Context, i))
- ret |= _mutt_bounce_message(fp, Context->hdrs[i], to, resent_from, env_from);
+ ret |= bounce_message(fp, Context->hdrs[i], to, resent_from, env_from);
return ret;
}
resent_to = rfc822_cpy_adr(to, 0);
rfc2047_encode_adrlist(resent_to, "Resent-To");
- ret = _mutt_bounce_message(fp, h, resent_to, resent_from, from);
+ ret = bounce_message(fp, h, resent_to, resent_from, from);
rfc822_free_address(&resent_to);
rfc822_free_address(&from);
return buf;
}
-static void _menu_status_line(char *buf, size_t buflen, size_t col, int cols,
- struct Menu *menu, const char *p);
-
+static void status_line(char *buf, size_t buflen, size_t col, int cols,
+ struct Menu *menu, const char *p);
/**
* status_format_str - Format a string for the status bar
*
}
if (optional)
- _menu_status_line(buf, buflen, col, cols, menu, ifstring);
+ status_line(buf, buflen, col, cols, menu, ifstring);
else if (flags & MUTT_FORMAT_OPTIONAL)
- _menu_status_line(buf, buflen, col, cols, menu, elsestring);
+ status_line(buf, buflen, col, cols, menu, elsestring);
return src;
}
-static void _menu_status_line(char *buf, size_t buflen, size_t col, int cols,
- struct Menu *menu, const char *p)
+static void status_line(char *buf, size_t buflen, size_t col, int cols,
+ struct Menu *menu, const char *p)
{
mutt_expando_format(buf, buflen, col, cols, p, status_format_str,
(unsigned long) menu, 0);