NeoMutt  2023-05-17-16-g61469c
Teaching an old dog new tricks
DOXYGEN
tmp.h
Go to the documentation of this file.
1
23#ifndef MUTT_CORE_TMP_H
24#define MUTT_CORE_TMP_H
25
26#include <stdio.h>
27
28struct Buffer;
29
30void buf_mktemp_full(struct Buffer *buf, const char *prefix, const char *suffix, const char *src, int line);
31FILE *mutt_file_mkstemp_full (const char *file, int line, const char *func);
32void mutt_mktemp_full (char *s, size_t slen, const char *prefix, const char *suffix, const char *src, int line);
33
34#define mutt_mktemp(buf, buflen) mutt_mktemp_pfx_sfx(buf, buflen, "neomutt", NULL)
35#define mutt_mktemp_pfx_sfx(buf, buflen, prefix, suffix) mutt_mktemp_full(buf, buflen, prefix, suffix, __FILE__, __LINE__)
36
37#define buf_mktemp(buf) buf_mktemp_pfx_sfx(buf, "neomutt", NULL)
38#define buf_mktemp_pfx_sfx(buf, prefix, suffix) buf_mktemp_full(buf, prefix, suffix, __FILE__, __LINE__)
39
40#define mutt_file_mkstemp() mutt_file_mkstemp_full(__FILE__, __LINE__, __func__)
41
42#endif /* MUTT_CORE_TMP_H */
String manipulation buffer.
Definition: buffer.h:34
void mutt_mktemp_full(char *s, size_t slen, const char *prefix, const char *suffix, const char *src, int line)
Create a temporary filename.
Definition: tmp.c:112
FILE * mutt_file_mkstemp_full(const char *file, int line, const char *func)
Create temporary file safely.
Definition: tmp.c:76
void buf_mktemp_full(struct Buffer *buf, const char *prefix, const char *suffix, const char *src, int line)
Create a temporary file.
Definition: tmp.c:50