INtime SDK Help
tmpnam

Creates a temporary filename, which can open a temporary file without overwriting an existing file.

#include <stdio.h>
char *tmpnam (char *string);

Parameters

string
Pointer to the temporary filename.

Remarks

If string is a null pointer, tmpnam leaves the result in an internal static buffer. Thus any subsequent calls destroy this value.

If string is not a null pointer, it is assumed to reference a string buffer of at least L_tmpnam bytes. The function will generate unique filenames for up to TMP_MAX calls.

The character string that tmpnam creates consists of the path prefix, defined by P_tmpdir, followed by a sequence consisting of the digit characters 0 through 9; the numerical value of this string can range from 1 to 65,535.

Changing the definitions of L_tmpnam or P_tmpdir in STDIO.H does not change the operation of tmpnam.

Return Values

A pointer to the temporary filename generated.
Success.
A null pointer if it is impossible to create the name or the name is not unique.
Failure.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/stdio.h stdio.h clib.lib

See Also

mktemp, tmpfile