home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
387b.lha
/
dice_v2.02
/
lib
/
stdio
/
tmpfile.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1990-05-30
|
327 b
|
25 lines
/*
* tmpfile() - create a temporary file that is deleted on
* close
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
FILE *
tmpfile()
{
char *name;
FILE *fi;
if (name = strdup(tmpnam(NULL))) {
if (fi = fopen(name, "wb+C"))
return(fi);
free(name);
}
return(NULL);
}