return pos;
}
+ssize_t
+m_quotefile_fmt(char *dst, ssize_t n, const char *fmt, const char *src)
+{
+ char tmp[LONG_STRING];
+ mutt_quote_filename(tmp, sizeof(tmp), src);
+ return m_file_fmt(dst, n, fmt, tmp);
+}
+
static ssize_t
m_tempftplize(char *dst, ssize_t dlen, const char *fmt, const char *s)
{
/* replace any %s with src, or appends " $src" */
ssize_t m_file_fmt(char *dst, ssize_t n, const char *fmt, const char *src);
+ssize_t m_quotefile_fmt(char *, ssize_t, const char *, const char *);
+
int m_tempfd(char *dst, ssize_t n, const char *dir, const char *fmt);
FILE *m_tempfile(char *dst, ssize_t n, const char *dir, const char *fmt);
char cmd[LONG_STRING];
mutt_endwin (NULL);
- mutt_expand_file_fmt (cmd, sizeof (cmd), editor, data);
+ m_quotefile_fmt(cmd, sizeof (cmd), editor, data);
if (mutt_system (cmd) == -1)
mutt_error (_("Error running \"%s\"!"), cmd);
keypad (stdscr, TRUE);
char cmd[STRING];
mutt_endwin (NULL);
- mutt_expand_file_fmt (cmd, sizeof (cmd), Pager, tempfile);
+ m_quotefile_fmt(cmd, sizeof (cmd), Pager, tempfile);
if (mutt_system (cmd) == -1) {
mutt_error (_("Error running \"%s\"!"), cmd);
rc = -1;
int l;
- mutt_expand_file_fmt (cmd, sizeof (cmd), QueryCmd, s);
+ m_quotefile_fmt(cmd, sizeof (cmd), QueryCmd, s);
if ((thepid = mutt_create_filter (cmd, NULL, &fp, NULL)) < 0) {
return 0;
}
}
-void
-mutt_expand_file_fmt(char *dst, ssize_t n, const char *fmt, const char *src)
-{
- char tmp[LONG_STRING];
- mutt_quote_filename(tmp, sizeof(tmp), src);
- m_file_fmt(dst, n, fmt, tmp);
-}
-
/* return 0 on success, -1 on abort, 1 on error */
int mutt_check_overwrite (const char *attname, const char *path,
char *fname, ssize_t flen, int *append,
void mutt_edit_content_type (HEADER *, BODY *, FILE *);
void mutt_edit_headers (const char *, const char *, HEADER *, char *, ssize_t);
void mutt_enter_command (void);
-void mutt_expand_file_fmt (char *, ssize_t, const char *, const char *);
void mutt_fix_reply_recipients (ENVELOPE * env);
void mutt_folder_hook (char *);
void mutt_forward_intro (FILE * fp, HEADER * cur);