\ .\" This man page was generated by the Netpbm tool 'makeman' from HTML source. .\" Do not hand-hack it! If you have bug fixes or improvements, please find .\" the corresponding HTML page on the Netpbm website, generate a patch .\" against that, and send it to the Netpbm maintainer. .TH "Netpbm subroutine library: pm_tmpfile_fd() function" 3 "31 December 2007" "netpbm documentation" .SH NAME pm_tmpfile_fd() - create a temporary unnamed file .SH SYNOPSIS .nf #include FILE * pm_tmpfile_fd(void); .fi .SH EXAMPLE .PP This simple example creates a temporary file, writes "hello world" to it, then reads back and prints those contents. .nf #include int fd; fd = pm_tmpfile(); write(fd, "hello world\en", 17); lseek(fd, 0, SEEK_SET); read(fd, buffer, sizeof(buffer)); fprintf(STDOUT, "temp file contains '%s'\en", buffer); close(fd); .fi .SH DESCRIPTION .PP This library function is part of .BR "Netpbm" (1)\c \&. .PP \fBpm_tmpfile_fd()\fP is analogous to .BR "\fBpm_tmpfile()\fP" (1)\c \&. The only difference is that it opens the file as a low level file, as \fBopen()\fP would, rather than as a stream, as \fBfopen()\fP would. .PP If you need to refer to the temporary file by name, use \fBpm_make_tmpfile_fd()\fP instead. .SH HISTORY .PP \fBpm_tmpfile()\fP was introduced in Netpbm 10.42 (March 2008). .SH DOCUMENT SOURCE This manual page was generated by the Netpbm tool 'makeman' from HTML source. The master documentation is at .IP .B http://netpbm.sourceforge.net/doc/libtmpfilefd.html .PP