Lines Matching defs:to_path
114 int path_make_relative(const char *from_dir, const char *to_path, char **_r) {
119 assert(to_path);
127 if (!path_is_absolute(to_path))
136 to_path += strspn(to_path, "/");
139 if (!*to_path)
140 /* from_dir equals to_path. */
143 /* from_dir is a parent directory of to_path. */
144 r = strdup(to_path);
155 if (!*to_path)
159 b = strcspn(to_path, "/");
164 if (memcmp(from_dir, to_path, a) != 0)
168 to_path += b;
185 r = malloc(n_parents * 3 + strlen(to_path) + 1);
192 strcpy(p, to_path);