Lines Matching refs:xp
113 Xcheck_grow(XString *xsp, const char *xp, size_t more) in Xcheck_grow() argument
123 return (xsp->beg + (xp - old_beg)); in Xcheck_grow()
647 has_globbing(const char *xp, const char *xpe) in has_globbing() argument
649 const unsigned char *p = (const unsigned char *) xp; in has_globbing()
1343 char *xp, *ip, *tp, *ipath, *ldest = NULL; in do_realpath() local
1372 Xinit(xs, xp, strlen(ip = ipath) + 1, ATEMP); in do_realpath()
1397 while (xp > Xstring(xs, xp)) in do_realpath()
1398 if (*--xp == '/') in do_realpath()
1406 pos = Xsavepos(xs, xp); in do_realpath()
1408 XcheckN(xs, xp, 1 + len + 1); in do_realpath()
1409 Xput(xs, xp, '/'); in do_realpath()
1412 memcpy(xp, tp, len); in do_realpath()
1413 xp += len; in do_realpath()
1414 *xp = '\0'; in do_realpath()
1417 if (mksh_lstat(Xstring(xs, xp), &sb)) { in do_realpath()
1454 llen = readlink(Xstring(xs, xp), ldest, pathlen); in do_realpath()
1470 xp = Xrestpos(xs, xp, pos); in do_realpath()
1475 xp = Xstring(xs, xp); in do_realpath()
1483 Xput(xs, xp, '/'); in do_realpath()
1494 if (Xlength(xs, xp) == 0) in do_realpath()
1499 Xput(xs, xp, '/'); in do_realpath()
1500 Xput(xs, xp, '\0'); in do_realpath()
1507 if (stat(Xstring(xs, xp), &sb)) { in do_realpath()
1521 return (Xclose(xs, xp)); in do_realpath()
1529 Xfree(xs, xp); in do_realpath()
1563 char *xp = Xstring(*xsp, xp); in make_path() local
1596 XcheckN(*xsp, xp, len); in make_path()
1597 memcpy(xp, cwd, len); in make_path()
1598 xp += len; in make_path()
1600 Xput(*xsp, xp, '/'); in make_path()
1602 *phys_pathp = Xlength(*xsp, xp); in make_path()
1604 XcheckN(*xsp, xp, plen); in make_path()
1605 memcpy(xp, plist, plen); in make_path()
1606 xp += plen; in make_path()
1608 Xput(*xsp, xp, '/'); in make_path()
1614 XcheckN(*xsp, xp, len); in make_path()
1615 memcpy(xp, file, len); in make_path()
1845 rv = chdir(tryp = Xstring(xs, xp) + phys_path); in c_cd()
1847 simplify_path(Xstring(xs, xp)); in c_cd()
1848 rv = chdir(tryp = Xstring(xs, xp)); in c_cd()
1858 Xfree(xs, xp); in c_cd()
1879 if (Xstring(xs, xp)[0] != '/') { in c_cd()
1883 } else if ((pwd = allocd = do_realpath(Xstring(xs, xp))) == NULL) { in c_cd()
1887 pwd = Xstring(xs, xp); in c_cd()
1899 pwd = Xstring(xs, xp); in c_cd()
1908 Xfree(xs, xp); in c_cd()