Lines Matching defs:path
57 xdirname_r(const char *path, char *buf, size_t buflen)
63 * If `path' is a null pointer or points to an empty string,
66 if (path == NULL || *path == '\0') {
67 path = ".";
73 endp = path + strlen(path) - 1;
74 while (endp != path && *endp == '/')
78 while (endp > path && *endp != '/')
81 if (endp == path) {
82 path = *endp == '/' ? "/" : ".";
89 while (endp > path && *endp == '/');
91 len = endp - path + 1;
95 memcpy(buf, path, buflen);
102 dirname(char *path)
105 (void)xdirname_r(path, result, sizeof(result));