323 |
|
|
324 |
|
|
325 |
static int |
static int |
326 |
file_p (path) |
file_p (filename) |
327 |
char *path; |
char *filename; |
328 |
{ |
{ |
329 |
struct stat status; |
struct stat status; |
330 |
|
|
331 |
return (access (path, 4) == 0 /* exists and is readable */ |
return (access (filename, 4) == 0 /* exists and is readable */ |
332 |
&& stat (path, &status) == 0 /* get the status */ |
&& stat (filename, &status) == 0 /* get the status */ |
333 |
&& (S_ISDIR (status.st_mode)) == 0); /* not a directory */ |
&& (S_ISDIR (status.st_mode)) == 0); /* not a directory */ |
334 |
} |
} |
335 |
|
|