Lines Matching defs:path
27 * return full path to p with mode access using $PATH
32 * full path returned in path buffer
33 * if path==0 then the space is malloc'd
39 pathpath(register char* path, const char* p, const char* a, int mode)
47 if (!path)
48 path = buf;
58 strcpy(path, p);
59 if (pathexists(path, mode))
66 if (path != buf)
67 strcpy(path, buf);
69 return (path == buf) ? strdup(path) : path;
90 s = strcopy(path, s);
93 do if (s <= path) goto normal; while (*--s == '/');
94 do if (s <= path) goto normal; while (*--s != '/');
96 if (pathexists(path, PATH_EXECUTE))
98 if (s = pathaccess(path, path, p, a, mode))
99 return path == buf ? strdup(s) : s;
108 if (!(s = pathaccess(path, x, p, a, mode)) && !*x && (x = getenv("FPATH")))
109 s = pathaccess(path, x, p, a, mode);
110 return (s && path == buf) ? strdup(s) : s;