source: trunk/third/nmh/sbr/m_tmpfil.c @ 12455

Revision 12455, 320 bytes checked in by danw, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12454, which included commits to RCS files with non-trunk default branches.
Line 
1
2/*
3 * m_tmpfil.c -- construct a temporary file
4 *
5 * $Id: m_tmpfil.c,v 1.1.1.1 1999-02-07 18:14:09 danw Exp $
6 */
7
8#include <h/mh.h>
9
10
11char *
12m_tmpfil (char *template)
13{
14    static char tmpfil[BUFSIZ];
15
16    snprintf (tmpfil, sizeof(tmpfil), "/tmp/%sXXXXXX", template);
17    unlink(mktemp(tmpfil));
18
19    return tmpfil;
20}
Note: See TracBrowser for help on using the repository browser.