1 |
< |
/* Copyright (c) 1991 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1992 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
8 |
|
* getpath.c - function to search for file in a list of directories |
9 |
|
*/ |
10 |
|
|
11 |
+ |
#include "paths.h" |
12 |
+ |
|
13 |
|
#define NULL 0 |
14 |
|
|
15 |
+ |
#ifndef NIX |
16 |
|
#include <pwd.h> |
17 |
< |
|
15 |
< |
#ifndef DIRSEP |
16 |
< |
#define DIRSEP '/' |
17 |
> |
extern struct passwd *getpwnam(); |
18 |
|
#endif |
18 |
– |
#ifndef PATHSEP |
19 |
– |
#define PATHSEP ':' |
20 |
– |
#endif |
19 |
|
|
20 |
< |
extern char *strcpy(), *strcat(), *getenv(); |
23 |
< |
extern struct passwd *getpwnam(); |
20 |
> |
extern char *strcpy(), *strcat(); |
21 |
|
|
22 |
|
|
23 |
|
char * |
26 |
|
register char *searchpath; |
27 |
|
int mode; |
28 |
|
{ |
29 |
< |
static char pname[256]; |
29 |
> |
#ifndef NIX |
30 |
|
struct passwd *pwent; |
31 |
+ |
#endif |
32 |
+ |
static char pname[256]; |
33 |
|
register char *cp; |
34 |
|
|
35 |
|
if (fname == NULL) |