Lines Matching refs:xp
78 Xcheck_grow(XString *xsp, const char *xp, size_t more)
88 return (xsp->beg + (xp - old_beg));
1704 char *xp, *ip, *tp, *ipath, *ldest = NULL;
1740 Xinit(xs, xp, strlen(ip = ipath) + 1, ATEMP);
1766 while (xp > Xstring(xs, xp))
1767 if (mksh_cdirsep(*--xp))
1775 pos = Xsavepos(xs, xp);
1777 XcheckN(xs, xp, 1 + len + 1);
1778 Xput(xs, xp, '/');
1781 memcpy(xp, tp, len);
1782 xp += len;
1783 *xp = '\0';
1786 if (mksh_lstat(Xstring(xs, xp), &sb)) {
1823 llen = readlink(Xstring(xs, xp), ldest, pathlen);
1851 xp = Xrestpos(xs, xp, pos);
1856 xp = Xstring(xs, xp);
1859 /* assert: xp == xs.beg => start of path */
1864 Xput(xs, xp, '/');
1870 Xput(xs, xp, *ip++);
1871 Xput(xs, xp, *ip++);
1883 if (Xlength(xs, xp) == 0)
1888 Xput(xs, xp, '/');
1889 Xput(xs, xp, '\0');
1896 if (stat(Xstring(xs, xp), &sb)) {
1909 return (Xclose(xs, xp));
1916 Xfree(xs, xp);
1950 char *xp = Xstring(*xsp, xp);
1983 XcheckN(*xsp, xp, len);
1984 memcpy(xp, cwd, len);
1985 xp += len;
1986 if (mksh_cdirsep(xp[-1]))
1987 xp--;
1988 *xp++ = '/';
1990 *phys_pathp = Xlength(*xsp, xp);
1992 XcheckN(*xsp, xp, plen);
1993 memcpy(xp, plist, plen);
1994 xp += plen;
1995 if (mksh_cdirsep(xp[-1]))
1996 xp--;
1997 *xp++ = '/';
2003 XcheckN(*xsp, xp, len);
2004 memcpy(xp, file, len);
2277 rv = chdir(tryp = Xstring(xs, xp) + phys_path);
2279 simplify_path(Xstring(xs, xp));
2280 rv = chdir(tryp = Xstring(xs, xp));
2290 Xfree(xs, xp);
2311 if (!mksh_abspath(Xstring(xs, xp))) {
2315 } else if ((pwd = allocd = do_realpath(Xstring(xs, xp))) == NULL) {
2319 pwd = Xstring(xs, xp);
2331 pwd = Xstring(xs, xp);
2340 Xfree(xs, xp);