creattemp - create a temporary file
int creattemp (prefix, result, pmode, oflags) char *prefix; char *result; int pmode; int oflags;
This function generates a unique file name and creats a file by that name.
Creattemp normally creates the temporary file in the /tmp directory on UNIX
machines, and in \cbase\tmp on MS-DOS machines. If the environment variable
TMPDIR is defined, this names the directory for the temporary file. The file
name consists of an optional prefix and an internally generated unique suffix.
Prefix may be NULL or point to a null terminated string of up to two characters
to insure that the generated names are valid on MS-DOS machines. The complete
path name is returned in result, which must be the address of a character array
of at least L_tempname bytes, where L_tempname is a constant defined in
Creattemp returns a different file name each time it is called. You must close
the file with close(2) and remove it with unlink(2) after you are done with
it.SEE ALSO
NOTES