home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 4
/
DATAFILE_PDCD4.iso
/
unix
/
unixtools
/
util
/
c
/
efopen
< prev
next >
Wrap
Text File
|
1992-07-21
|
551b
|
25 lines
/* > C.Efopen - Open file, fail if cannot open it */
#include <stdio.h>
#include "utils.h"
FILE *efopen (const char *file, const char *mode)
{
FILE *p = fopen (file, mode);
if ( p == NULL )
fatal (1, "Cannot open file %s (mode \"%s\")\n", file, mode);
return p;
}
FILE *efreopen (const char *file, const char *mode, FILE *fp)
{
FILE *p = freopen (file, mode, fp);
if ( p == NULL )
fatal (1, "Cannot open file %s (mode \"%s\")\n", file, mode);
return p;
}