Lines Matching refs:xp
78 Xcheck_grow(XString *xsp, const char *xp, size_t more) in Xcheck_grow() argument
88 return (xsp->beg + (xp - old_beg)); in Xcheck_grow()
1704 char *xp, *ip, *tp, *ipath, *ldest = NULL; in do_realpath() local
1740 Xinit(xs, xp, strlen(ip = ipath) + 1, ATEMP); in do_realpath()
1766 while (xp > Xstring(xs, xp)) in do_realpath()
1767 if (mksh_cdirsep(*--xp)) in do_realpath()
1775 pos = Xsavepos(xs, xp); in do_realpath()
1777 XcheckN(xs, xp, 1 + len + 1); in do_realpath()
1778 Xput(xs, xp, '/'); in do_realpath()
1781 memcpy(xp, tp, len); in do_realpath()
1782 xp += len; in do_realpath()
1783 *xp = '\0'; in do_realpath()
1786 if (mksh_lstat(Xstring(xs, xp), &sb)) { in do_realpath()
1823 llen = readlink(Xstring(xs, xp), ldest, pathlen); in do_realpath()
1851 xp = Xrestpos(xs, xp, pos); in do_realpath()
1856 xp = Xstring(xs, xp); in do_realpath()
1864 Xput(xs, xp, '/'); in do_realpath()
1870 Xput(xs, xp, *ip++); in do_realpath()
1871 Xput(xs, xp, *ip++); in do_realpath()
1883 if (Xlength(xs, xp) == 0) in do_realpath()
1888 Xput(xs, xp, '/'); in do_realpath()
1889 Xput(xs, xp, '\0'); in do_realpath()
1896 if (stat(Xstring(xs, xp), &sb)) { in do_realpath()
1909 return (Xclose(xs, xp)); in do_realpath()
1916 Xfree(xs, xp); in do_realpath()
1950 char *xp = Xstring(*xsp, xp); in make_path() local
1983 XcheckN(*xsp, xp, len); in make_path()
1984 memcpy(xp, cwd, len); in make_path()
1985 xp += len; in make_path()
1987 Xput(*xsp, xp, '/'); in make_path()
1989 *phys_pathp = Xlength(*xsp, xp); in make_path()
1991 XcheckN(*xsp, xp, plen); in make_path()
1992 memcpy(xp, plist, plen); in make_path()
1993 xp += plen; in make_path()
1995 Xput(*xsp, xp, '/'); in make_path()
2001 XcheckN(*xsp, xp, len); in make_path()
2002 memcpy(xp, file, len); in make_path()
2271 rv = chdir(tryp = Xstring(xs, xp) + phys_path); in c_cd()
2273 simplify_path(Xstring(xs, xp)); in c_cd()
2274 rv = chdir(tryp = Xstring(xs, xp)); in c_cd()
2284 Xfree(xs, xp); in c_cd()
2305 if (!mksh_abspath(Xstring(xs, xp))) { in c_cd()
2309 } else if ((pwd = allocd = do_realpath(Xstring(xs, xp))) == NULL) { in c_cd()
2313 pwd = Xstring(xs, xp); in c_cd()
2325 pwd = Xstring(xs, xp); in c_cd()
2334 Xfree(xs, xp); in c_cd()