view sbr/m_tmpfil.c @ 13:3c5835cca094

fix
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 21 Apr 2012 15:40:28 +0900
parents bce86c4163a3
children
line wrap: on
line source

/* m_tmpfil.c - construct a temporary file */

#include "../h/mh.h"
#include <stdio.h>


char   *m_tmpfil (template)
register char  *template;
{
    static char tmpfil[BUFSIZ];

    (void) sprintf (tmpfil, "/tmp/%sXXXXXX", template);
    (void) unlink (mktemp (tmpfil));

    return tmpfil;
}