Generates a pathname for a temporary file.
#include <stdio.h> char *tempnam ( const char *dirpath, const char *prefix);
(IN) Points to the directory where the temporary file is to be created. It can also have the following values:
NULL, which causes the filename to be generated without a path.
P_tmpdir, which defines a default path of "sys:/tmp". If the TMPDIR environment variable is set and the NLM is compiled with POSIX semantics, the TMPDIR value overrides the default path.
(IN) Points to the string, of no more than 5 bytes, for the initial letter sequence of the filename. This parameter is optional and can be a NULL pointer.
If successful, allocates memory for the path and filename and returns a pointer to the string. This memory needs to be freed with a subsequent call to free, using the returned pointer.
If unsuccessful, returns a NULL pointer and sets errno to the following: