Lines Matching defs:base
12 std::string sp_relative_path_from_path( std::string const &path, std::string const &base)
15 if ( !base.empty() && !path.empty() ) {
16 size_t base_len = base.length();
18 && (base[base_len - 1] == G_DIR_SEPARATOR))
23 if ( (path.substr(0, base_len) == base.substr(0, base_len))
64 char *inkscape_rel2abs(const char *path, const char *base, char *result, const size_t size)
78 else if (*base != G_DIR_SEPARATOR || !size)
87 if (strlen (base) >= size)
89 strcpy (result, base);
91 rp = result + strlen (base) - 1;
107 bp = base + strlen (base);
116 while (bp > base && *--bp != G_DIR_SEPARATOR)
126 while (bp > base && *--bp != G_DIR_SEPARATOR)
133 length = bp - base;
136 strncpy (result, base, length);
150 char *inkscape_abs2rel(const char *path, const char *base, char *result, const size_t size)
164 else if (*base != G_DIR_SEPARATOR || !size)
173 for (pp = path, bp = base; *pp && *bp && *pp == *bp; pp++, bp++)
192 for (bp = base + (branch - path); *bp; bp++)