2 * m_tmpfil.c -- construct a temporary file
4 * This code is Copyright (c) 2002, by the authors of nmh. See the
5 * COPYRIGHT file in the root directory of the nmh distribution for
6 * complete copyright information.
11 /***************************************************************************
12 * DO NOT USE THIS FUNCTION! IT WILL BE REMOVED IN THE FUTURE.
13 * THIS FUNCTION IS INSECURE. USE THE FUNCTIONS DEFINED IN m_mktemp.c.
14 ***************************************************************************/
16 m_tmpfil (char *template)
18 static char tmpfil[BUFSIZ];
20 snprintf (tmpfil, sizeof(tmpfil), "/tmp/%sXXXXXX", template);
22 Mkstemp work postponed until later -Doug
24 unlink(mkstemp(tmpfil));
27 unlink(mktemp(tmpfil));