home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari FTP
/
ATARI_FTP_0693.zip
/
ATARI_FTP_0693
/
Mint
/
mntlib32.zoo
/
fopenp.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-05-25
|
483b
|
24 lines
/* open a file, searching along the PATH environment variable for it */
/* rehacked by Uwe Ohse, 3.5.93: uses buffindfile now */
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <limits.h>
#include <support.h>
FILE *
fopenp(name, mode)
char *name, *mode;
{
char *fullname;
char buffer[PATH_MAX];
fullname = buffindfile(name, getenv("PATH"), (char **)0,buffer);
if (!fullname) {
errno = ENOENT;
return NULL;
}
return fopen(fullname, mode);
}