char *m_mailpath (char *);
char *m_name (int);
int m_rand (unsigned char *, size_t);
-char *m_mktemp(const char *, int *, FILE **);
-char *m_mktemp2(const char *, const char *, int *, FILE **);
-char *m_mktemps(const char *pfx, const char *suffix, int *, FILE **);
-char *get_temp_dir(void);
/*
* Create a subprocess and redirect our standard output to it.
* - 2: read context, don't check nmh version
*/
int nmh_init(const char *argv0, int read_context);
-
-/*
- * temporary file management
- */
-int m_unlink(const char *);
-void unregister_for_removal(int remove_files);
#include <h/mh.h>
#include <h/utils.h>
+#include "m_mktemp.h"
/*
* 1) If we are using an external rmmproc, then exec it.
#include <h/signals.h>
#include <h/utils.h>
#include <h/mts.h>
+#include "m_mktemp.h"
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
*/
#include <h/mh.h>
+#include "m_mktemp.h"
char *
* complete copyright information.
*/
+char *m_mktemp(const char *pfx_in, int *fd_ret, FILE **fp_ret);
+char *m_mktemp2(const char *dir_in, const char *pfx_in,
+ int *fd_ret, FILE **fp_ret);
+char *m_mktemps(const char *pfx_in, const char *suffix,
+ int *fd_ret, FILE **fp_ret);
+char *get_temp_dir(void);
+void unregister_for_removal(int remove_files);
+int m_unlink(const char *pathname);
void remove_registered_files_atexit(void);
void remove_registered_files(int sig);
#include <h/mh.h>
#include <h/signals.h>
+#include "m_mktemp.h"
void
#include <h/mh.h>
#include <h/signals.h>
+#include "m_mktemp.h"
/*
#include <h/mh.h>
#include <h/tws.h>
#include <h/utils.h>
+#include "../sbr/m_mktemp.h"
#include <fcntl.h>
#include <utime.h>
#include <h/mh.h>
#include <h/utils.h>
#include <h/mhparse.h>
+#include "../sbr/m_mktemp.h"
#include "mhfree.h"
#define BURST_SWITCHES \
#include <h/mh.h>
#include <fcntl.h>
#include <h/utils.h>
+#include "../sbr/m_mktemp.h"
static int hdrfd = NOTOK;
static int txtfd = NOTOK;
#include <h/dropsbr.h>
#include <h/mts.h>
#include <h/tws.h>
+#include "../sbr/m_mktemp.h"
#ifdef NTOHLSWAP
# include <netinet/in.h>
#include <h/fmt_scan.h>
#include <h/tws.h>
#include <h/utils.h>
+#include "../sbr/m_mktemp.h"
/*
* Take from replsbr.c - a buffer big enough to read in data header lines
#include <h/signals.h>
#include <h/tws.h>
#include <h/mts.h>
+#include "../sbr/m_mktemp.h"
#ifndef TLS_SUPPORT
# define TLSminc(a) (a)
#include <h/mhparse.h>
#include <h/mhcachesbr.h>
#include <h/utils.h>
+#include "../sbr/m_mktemp.h"
#include "mhfree.h"
#define MHBUILD_SWITCHES \
#include <h/mime.h>
#include <h/mhparse.h>
#include <h/utils.h>
+#include "../sbr/m_mktemp.h"
#include "mhfree.h"
#ifdef HAVE_SYS_TIME_H
#include <h/mhparse.h>
#include <h/mhcachesbr.h>
#include <h/utils.h>
+#include "../sbr/m_mktemp.h"
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#include <h/mhparse.h>
#include <h/utils.h>
#include <h/signals.h>
+#include "../sbr/m_mktemp.h"
#include "mhfree.h"
#include <fcntl.h>
#include <h/utils.h>
#include <h/mime.h>
#include <h/mhparse.h>
+#include "../sbr/m_mktemp.h"
#include "mhfree.h"
/* The list of top-level contents to display */
#include <h/mime.h>
#include <h/mhparse.h>
#include <h/utils.h>
+#include "../sbr/m_mktemp.h"
#include "mhfree.h"
#ifdef HAVE_ICONV
# include <iconv.h>
#include <h/mhparse.h>
#include <h/fmt_scan.h>
#include <h/utils.h>
+#include "../sbr/m_mktemp.h"
#ifdef HAVE_ICONV
# include <iconv.h>
#endif /* ! HAVE_ICONV */
#include <h/mime.h>
#include <h/mhparse.h>
#include <h/utils.h>
+#include "../sbr/m_mktemp.h"
enum clobber_policy_t {
NMH_CLOBBER_ALWAYS = 0,
#include <h/utils.h>
#include <h/tws.h>
#include <h/mts.h>
+#include "../sbr/m_mktemp.h"
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#include <h/mh.h>
#include <fcntl.h>
#include <h/signals.h>
+#include "../sbr/m_mktemp.h"
#include <setjmp.h>
#include <termios.h>
#include <h/tws.h>
#include <h/mts.h>
#include <h/utils.h>
+#include "../sbr/m_mktemp.h"
#define RCVDIST_SWITCHES \
X("form formfile", 4, FORMSW) \
#include <fcntl.h>
#include <h/signals.h>
#include <h/mts.h>
+#include "../sbr/m_mktemp.h"
#define RCVSTORE_SWITCHES \
X("create", 0, CRETSW) \
#include <h/scansbr.h>
#include <h/tws.h>
#include <h/mts.h>
+#include "../sbr/m_mktemp.h"
#include <fcntl.h>
#ifdef HAVE_GETUTXENT
#include <h/mh.h>
#include <h/utils.h>
+#include "../sbr/m_mktemp.h"
#include <fcntl.h>
#define REFILE_SWITCHES \
#include <h/mh.h>
#include <h/utils.h>
+#include "../sbr/m_mktemp.h"
#define RMF_SWITCHES \
X("interactive", 0, INTRSW) \
#include <h/mh.h>
#include <fcntl.h>
#include <h/utils.h>
-
#ifdef OAUTH_SUPPORT
# include <h/oauth.h>
#endif
+#include "../sbr/m_mktemp.h"
#ifndef CYRUS_SASL
# define SASLminc(a) (a)
#ifdef OAUTH_SUPPORT
#include <h/oauth.h>
+#endif
+#include "../sbr/m_mktemp.h"
+#ifdef OAUTH_SUPPORT
static int setup_oauth_params(char *[], int *, const char *, const char **);
#endif /* OAUTH_SUPPORT */
#include <h/tws.h>
#include <h/mts.h>
#include <h/utils.h>
+#include "../sbr/m_mktemp.h"
#include <pwd.h>
#include <sys/ioctl.h>
#include <h/tws.h>
#include <h/mime.h>
#include <h/mhparse.h>
+#include "../sbr/m_mktemp.h"
#define VIAMAIL_SWITCHES \
X("to mailpath", 0, TOSW) \
#include <fcntl.h>
#include <h/mime.h>
#include <h/utils.h>
-
#ifdef OAUTH_SUPPORT
# include <h/oauth.h>
#endif
+#include "../sbr/m_mktemp.h"
#define WHATNOW_SWITCHES \
X("draftfolder +folder", 0, DFOLDSW) \
#include <h/mh.h>
#include <h/utils.h>
#include <h/signals.h>
+#include "../sbr/m_mktemp.h"
#ifndef CYRUS_SASL
# define SASLminc(a) (a)