
------------------------------------------------------------------------------
6.3 Generate a temporary file name. <Main,Alarm,Comm>
------------------------------------------------------------------------------
[Name]
tmpnam
[Syntax]
#include <stdio.h>
char *tmpnam( char *string ) ;
[Arguments]
string Pointer to a temporary file name.
[Return]
Returns a pointer to a generated unique file name if it has been
successfully generated. If not, returns NULL.
[Description]
Generates a file name by which a temporary file can be opened without
overwriting existing files. This name is stored in a buffer pointed by
"string". If "strings" is NULL, the result is stored in the internal
static buffer. So, the following calling destroy this result. At
least buffer size must be larger than L-tmpnam bytes (defined in
stdio.h). This function can generate up to TMP_MAX of unique file
names. The generated string is composed of a path prefix, such as
P_tmpdir define in stdio.h, and following sequence of numeric
characters. The values of this numeric string are 1 through 65535.
A process of "tmpnam" is not changed by modifying L_tmpnam or
P_tmpdir.