- _\bT_\bm_\bp_\bf_\bi_\bl_\be opens a file using a file name generated by the rou-
- tine _\bt_\bm_\bp_\bn_\ba_\bm(3), and returns a pointer to the stream associ-
- ated with the file. The created file is unlinked before
- _\bt_\bm_\bp_\bf_\bi_\bl_\be returns, causing the contents of the file to be
- deleted automatically when the last reference to it is
- closed. The file is opened with the access value ``w+''.
- If _\bt_\bm_\bp_\bn_\ba_\bm returns NULL, or if _\bt_\bm_\bp_\bf_\bi_\bl_\be is unable to open the
- file, a NULL pointer is returned.
-
- _\bT_\bm_\bp_\bn_\ba_\bm returns a pointer to a file name, in the directory
- ``/usr/tmp'', which did not reference an existing file at
- some indeterminate point in the past. If the argument _\bs is
- non-NULL, this file name is copied to the buffer it refer-
- ences. Otherwise, memory to contain this file name is allo-
- cated by _\bt_\bm_\bp_\bn_\ba_\bm. In either case, _\bt_\bm_\bp_\bn_\ba_\bm returns a pointer
- to the file name; in the latter case, the return value may
- be used as a subsequent argument to _\bf_\br_\be_\be(3).
-
- In the current implementation, the memory buffer referenced
- by _\bs must be at least 16 bytes long.
-
- _\bT_\be_\bm_\bp_\bn_\ba_\bm is similar to _\bt_\bm_\bp_\bn_\ba_\bm, but provides the ability to
- specify the directory which will contain the temporary file
- and the file name prefix.
-
- The environmental variable ``TMPDIR'' (if set), the argument
- _\bd_\bi_\br (if non-NULL), the directory ``/usr/tmp'' and the direc-
- tory ``/tmp'' are tried, in the listed order, as directories
- in which to store the temporary file. _\bT_\be_\bm_\bp_\bn_\ba_\bm allocates
- memory in which to store the file name; the returned pointer
- may be used as a subsequent argument to _\bf_\br_\be_\be(3). The argu-
- ment _\bp_\br_\be_\bf_\bi_\bx, if non-NULL, is used to specify a file name
- prefix, which will be the first part of the created file
- name.