Lines Matching refs:dir
1012 static inline bool starts_with_prefix(const char *dir) in starts_with_prefix() argument
1023 return !memcmp(dir, CONFIG_PREFIX, prefix_len) && in starts_with_prefix()
1024 (!dir[prefix_len] || G_IS_DIR_SEPARATOR(dir[prefix_len])); in starts_with_prefix()
1029 static inline const char *next_component(const char *dir, int *p_len) in next_component() argument
1032 while ((*dir && G_IS_DIR_SEPARATOR(*dir)) || in next_component()
1033 (*dir == '.' && (G_IS_DIR_SEPARATOR(dir[1]) || dir[1] == '\0'))) { in next_component()
1034 dir++; in next_component()
1037 while (dir[len] && !G_IS_DIR_SEPARATOR(dir[len])) { in next_component()
1041 return dir; in next_component()
1152 char *get_relocated_path(const char *dir) in get_relocated_path() argument
1166 const char *src = dir; in get_relocated_path()
1178 g_string_append(result, dir); in get_relocated_path()
1183 g_string_append(result, dir); in get_relocated_path()
1189 starts_with_prefix(dir) && starts_with_prefix(bindir)) { in get_relocated_path()
1195 dir += len_dir; in get_relocated_path()
1197 dir = next_component(dir, &len_dir); in get_relocated_path()
1199 } while (len_dir && len_dir == len_bindir && !memcmp(dir, bindir, len_dir)); in get_relocated_path()
1208 if (*dir) { in get_relocated_path()
1209 assert(G_IS_DIR_SEPARATOR(dir[-1])); in get_relocated_path()
1210 g_string_append(result, dir - 1); in get_relocated_path()
1215 g_string_assign(result, dir); in get_relocated_path()