Lines Matching defs:dup
18 char *dup = strdup(pathname);
19 char *ptr = strrchr(stripslash(dup), '/');
20 if (ptr == NULL) return dup;
22 free(dup);
30 char *dup = strdup(pathname);
31 char *ptr = strrchr(stripslash(dup), '/');
32 if (ptr == NULL) { free(dup); return strdup("."); }
33 if (ptr == dup && dup[0] == '/') ptr++;
35 return dup;