|
|
coherent
tempnam() General Function tempnam() Generate a unique name for a temporary file cchhaarr *tteemmppnnaamm(_d_i_r_e_c_t_o_r_y, _n_a_m_e); cchhaarr *_d_i_r_e_c_t_o_r_y, *_n_a_m_e; tempnam constructs a unique temporary name that can be used to name a file. directory points to the name of the directory in which you want the temporary file written. If this variable is NULL, tempnam reads the environmental variable TMPDIR and uses it for direc- tory. If neither directory nor TMPDIR is given, tempnam uses /tmp. name points to the string of letters that will prefix the tem- porary name. This string should not be more than three or four characters, to prevent truncation or duplication of temporary file names. If name is NULL, tempnam sets it to t. tempnam uses malloc to allocate a buffer for the temporary file name it returns. If all goes well, it returns a pointer to the temporary name it has written. Otherwise, it returns NULL if the allocation fails or if it cannot build a temporary file name suc- cessfully. ***** See Also ***** general functions, mktemp(), tmpnam() ***** Notes ***** tempnam is not described in the ANSI Standard. Programs that use it will not conform strictly the Standard, and may not be port- able to other compilers or environments. COHERENT Lexicon Page 1
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.