Initial revision
[mmh] / sbr / m_tmpfil.c
1
2 /*
3  * m_tmpfil.c -- construct a temporary file
4  *
5  * $Id$
6  */
7
8 #include <h/mh.h>
9
10
11 char *
12 m_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 }