Lines Matching defs:prefix
89 char *path_make_absolute(const char *p, const char *prefix) {
93 * the prefix, if specified and necessary */
95 if (path_is_absolute(p) || !prefix)
98 return strjoin(prefix, "/", p, NULL);
119 char **path_strv_resolve(char **l, const char *prefix) {
140 if (prefix) {
142 t = strappend(prefix, orig);
154 if (prefix) {
167 } else if (prefix) {
171 x = path_startswith(u, prefix);
186 * prefix, keep the original path instead */
205 char **path_strv_resolve_uniq(char **l, const char *prefix) {
210 if (!path_strv_resolve(l, prefix))
251 char* path_startswith(const char *path, const char *prefix) {
253 assert(prefix);
255 if ((path[0] == '/') != (prefix[0] == '/'))
262 prefix += strspn(prefix, "/");
264 if (*prefix == 0)
271 b = strcspn(prefix, "/");
276 if (memcmp(path, prefix, a) != 0)
280 prefix += b;