home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
zip
/
mint
/
mntlib16.lzh
/
MNTLIB16
/
FOPENP.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-03
|
387b
|
21 lines
/* open a file, searching along the PATH environment variable for it */
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
FILE *
fopenp(name, mode)
char *name, *mode;
{
extern char *findfile();
char *fullname;
fullname = findfile(name, getenv("PATH"), (char **)0);
if (!fullname) {
errno = ENOENT;
return NULL;
}
return fopen(fullname, mode);
}