libtmpfile man page on YellowDog

Man page or keyword search:  
man Server   18644 pages
apropos Keyword Search (all sections)
Output format
YellowDog logo
[printable version]


				 pm_tmpfile()

   Updated: 22 July 2004

NAME

   pm_tmpfile() ‐ tempfile creation routine using TMPFILE

SYNOPSIS

#include <netpbm/pm.h>

FILE * pm_tmpfile(void);

EXAMPLE

   This	 simple	 example  creates a temporary file, writes "hello
world" to it,
   then	 reads	back  and  prints   those   contents.	 #include
<netpbm/pm.h>

FILE * myfile;

myfile = pm_tmpfile();

fprintf(myfile, "hello world0);

fseek(myfile, 0, SEEK_SET);

fread(buffer, sizeof(buffer), 1, myfile);

fprintf(STDOUT, "temp file contains ’%s’0, buffer);

fclose(myfile);

DESCRIPTION

   This library function is part of Netpbm.

   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 stan‐
dard 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.

HISTORY

   pm_tmpfile() was introduced in Netpbm 10.20 (January 2004).

[top]

List of man pages available for YellowDog

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net