51 const char *src,
int line)
59 if (unlink(
buf_string(buf)) && (errno != ENOENT))
62 line,
buf_string(buf), strerror(errno), errno);
81 int n = snprintf(name,
sizeof(name),
"%s/neomutt-XXXXXX",
NONULL(c_tmp_dir));
85 int fd = mkstemp(name);
89 FILE *fp = fdopen(fd,
"w+");
91 if ((unlink(name) != 0) && (errno != ENOENT))
97 MuttLogger(0, file, line, func, 1,
"created temp file '%s'\n", name);
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
const char * cs_subset_path(const struct ConfigSubset *sub, const char *name)
Get a path config item by name.
Convenience wrapper for the config headers.
#define mutt_file_fclose(FP)
char * ShortHostname
Short version of the hostname.
#define mutt_debug(LEVEL,...)
int(*) log_dispatcher_ MuttLogger)
@ LL_DEBUG3
Log at debug level 3.
@ LL_DEBUG1
Log at debug level 1.
Convenience wrapper for the library headers.
Container for Accounts, Notifications.
uint64_t mutt_rand64(void)
Create a 64-bit random number.
String manipulation buffer.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.
FILE * mutt_file_mkstemp_full(const char *file, int line, const char *func)
Create temporary file safely.
void buf_mktemp_full(struct Buffer *buf, const char *prefix, const char *suffix, const char *src, int line)
Create a temporary file.