return (p);
}
+void mutt_buffer_adv_mktemp (BUFFER *buf)
+{
+ BUFFER *prefix = NULL;
+ char *suffix;
+ struct stat sb;
+
+ if (!(buf->data && buf->data[0]))
+ {
+ mutt_buffer_mktemp (buf);
+ }
+ else
+ {
+ prefix = mutt_buffer_pool_get ();
+ mutt_buffer_strcpy (prefix, buf->data);
+ mutt_sanitize_filename (prefix->data, 1);
+ mutt_buffer_printf (buf, "%s/%s", NONULL (Tempdir), mutt_b2s (prefix));
+ if (lstat (mutt_b2s (buf), &sb) == -1 && errno == ENOENT)
+ goto out;
+
+ if ((suffix = strrchr (prefix->data, '.')) != NULL)
+ {
+ *suffix = 0;
+ ++suffix;
+ }
+ mutt_buffer_mktemp_pfx_sfx (buf, mutt_b2s (prefix), suffix);
+
+out:
+ mutt_buffer_pool_release (&prefix);
+ }
+}
/* Modified by blong to accept a "suggestion" for file name. If
* that file exists, then construct one with unique name but
void mutt_account_hook (const char* url);
void mutt_add_to_reference_headers (ENVELOPE *env, ENVELOPE *curenv, LIST ***pp, LIST ***qq);
+void mutt_buffer_adv_mktemp (BUFFER *);
void mutt_adv_mktemp (char *, size_t);
void mutt_alias_menu (char *, size_t, ALIAS *);
void mutt_allow_interrupt (int);