Lines Matching defs:path
48 // Return the directory part of a filename, or `.' if no path separators.
72 // Return the full path of NAME along the path PATHP.
76 char *path;
86 path = new char[path_name_max()];
88 path = _fullpath(path, name, path_name_max());
90 path = realpath(name, path);
93 fprintf(stderr, "searchpath: found `%s'\n", path);
95 return path;
106 path = new char[end - p + need_slash + namelen + 1];
107 memcpy(path, p, end - p);
109 path[end - p] = '/';
110 strcpy(path + (end - p) + need_slash, name);
112 fprintf(stderr, "searchpath: trying `%s'\n", path);
114 if (!access(path, F_OK)) {
118 return path;
120 a_delete path;
149 // Convert an MS path to a POSIX path.
150 char *msw2posixpath(char *path)
152 char *s = path;
158 return path;
166 // Obtain the full path of the current binary;
202 // with the current installation prefix; return the relocated path.
203 char *relocatep(const char *path)
206 fprintf(stderr, "relocatep: path = %s\n", path);
212 if (strncmp(INSTALLPATH, path, INSTALLPATHLEN))
213 return strsave(path);
214 char *relative_path = (char *)path + INSTALLPATHLEN;
226 // otherwise return the relocated path.
227 char *relocate(const char *path)
230 if (access(path, F_OK))
231 p = relocatep(path);
233 p = strsave(path);