Lines Matching defs:abspath
140 char abspath[MAXPATHLEN];
143 strlcpy(abspath, path, sizeof(abspath));
146 if (stat(abspath, &st) != 0) {
150 if (NULL == (p = strrchr(abspath, '/')) )
152 strcpy(abspath, ".");
157 if (stat(abspath, &st) != 0) {
164 if (NULL == (p = strrchr(abspath, '/')) )
166 strcpy(abspath, ".");
172 if (!getcwd(savecwd, sizeof(savecwd)) || chdir(abspath) < 0)
175 if (!getcwd(abspath, sizeof(abspath)) || chdir (savecwd) < 0)
178 if (strlen(abspath) > bufsize)
181 strlcpy(path, abspath, bufsize);