Query: libtmpfile
OS: centos
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
Netpbm subroutine library: pm_tmpfile() function(3) Library Functions Manual Netpbm subroutine library: pm_tmpfile() function(3)NAMEpm_tmpfile() - create a temporary unnamed fileSYNOPSIS#include <netpbm/pm.h> FILE * pm_tmpfile(void);EXAMPLEThis simple example creates a temporary file, writes 'hello world' to it, then reads back and prints those contents. #include <netpbm/pm.h> FILE * myfileP; myfile = pm_tmpfile(); fprintf(myfile, 'hello world '); fseek(myfileP, 0, SEEK_SET); fread(buffer, sizeof(buffer), 1, myfileP); fprintf(STDOUT, 'temp file contains '%s' ', buffer); fclose(myfileP);DESCRIPTIONThis library function is part of Netpbm(1) pm_tmpfile() creates and opens an unnamed temporary file. It is basically the same thing as the standard C library tmpfile() function, except that it uses the TMPFILE environment variable to decide where to create the temporary file. If TMPFILE is not set or is set to something unusable (e.g. too long), pm_tmpfile() falls back to the value of the standard C library symbol P_tmpdir, just like tmpfile(). Unlike tmpfile(), pm_tmpfile() never returns NULL. If it fails, it issues a message to Standard Error and aborts the program, like most libnetpbm routines do. If you need to refer to the temporary file by name, use pm_make_tmpfile() instead.HISTORYpm_tmpfile() was introduced in Netpbm 10.20 (January 2004). netpbm documentation 22 July 2004 Netpbm subroutine library: pm_tmpfile() function(3)
Related Man Pages |
---|
tmpfile(3) - redhat |
libtmpfile(3) - centos |
libnetpbm(3) - suse |
libnetpbm(3) - v7 |
tmpfile(3) - php |
Similar Topics in the Unix Linux Community |
---|
Stackbuf Library 1.0.0 (Default branch) |
No space left on device |
help with fseek |
Debian: 2026-1: netpbm-free: stack-based buffer overflow |
USN-934-1: Netpbm vulnerability |