Programming Guide |
Creates a unique file name
char *sm_tmpnam(void)
- · A pointer to the new file name.
sm_tmpnam
is an extension of the ANSI functiontmpnam()
; it returns a name that is unique among other file names.In Windows, the
TMP
environment variable will be used to set the temporary file's directory. IfTMP
is not set but if the environment variableTEMP
is set, it will be used. Otherwise, the\
(root directory) on the current disk will be used.In Linux, if the
TMPDIR
environment variable is set, it will be used as the trmporary file's directory. In UNIX and whenTMPDIR
is not set in Linux,P_tmpdir
from thestdio.h
file will be used. IfP_tmpdir
is not defined,/tmp
will be used.The default report service unload handler uses this function to generate a temporary file name on the client; it then moves a server-generated metafile to that file name. See "Handling Client Output" on page 9-26 in the Reports Manual for this code.