Lines Matching defs:path
12 std::string sp_relative_path_from_path( std::string const &path, std::string const &base)
15 if ( !base.empty() && !path.empty() ) {
23 if ( (path.substr(0, base_len) == base.substr(0, base_len))
24 && (path[base_len] == G_DIR_SEPARATOR))
27 while ( (retPos < path.length()) && (path[retPos] == G_DIR_SEPARATOR) ) {
30 if ( (retPos + 1) < path.length() ) {
31 result = path.substr(retPos);
37 result = path;
42 char const *sp_extension_from_path(char const *const path)
44 if (path == NULL) {
48 char const *p = path;
51 while ((p >= path) && (*p != G_DIR_SEPARATOR) && (*p != '.')) p--;
64 char *inkscape_rel2abs(const char *path, const char *base, char *result, const size_t size)
71 if (*path == G_DIR_SEPARATOR)
73 if (strlen (path) >= size)
75 strcpy (result, path);
85 if (!strcmp (path, ".") || !strcmp (path, current))
97 if (*++path == G_DIR_SEPARATOR)
99 /* Append G_DIR_SEPARATOR to the tail of path name. */
111 for (pp = path; *pp && *pp == '.';)
150 char *inkscape_abs2rel(const char *path, const char *base, char *result, const size_t size)
157 if (*path != G_DIR_SEPARATOR)
159 if (strlen (path) >= size)
161 strcpy (result, path);
172 branch = path;
173 for (pp = path, bp = base; *pp && *bp && *pp == *bp; pp++, bp++)
192 for (bp = base + (branch - path); *bp; bp++)