Lines Matching refs:pwd
952 bprintf(&b, e, " pwd %s\n", state.pwd);
1285 if (state.pwd)
1287 if (buf) n = sfsprintf(buf, 0, "%s /#%s ", state.pwd, fs->special);
1294 * set state.pwd from s
1303 struct stat pwd;
1305 if (*s != '/' || *state.pwd == '/')
1315 strncpy(state.pwd, s, state.pwdsize);
1316 state.pwd[state.pwdsize] = 0;
1317 state.pwdsize = pathcanon(state.pwd, sizeof(state.pwdbuf), 0) - state.pwd;
1321 if ((s = pathreal(state.pwd, 0, &pwd)) && (dot.st_ino == pwd.st_ino && dot.st_dev == pwd.st_dev || state.path.linkname && !STAT(state.path.name, &pwd) && dot.st_ino == pwd.st_ino && dot.st_dev == pwd.st_dev))
1324 memcpy(state.envpwd + sizeof(var_pwd) - 1, state.pwd, state.pwdsize);
1325 message((-1, "setpwd: state.pwd=%s state.level=%d state.path.level=%d", state.pwd, state.level, state.path.level));
1328 message((-1, "%s: cannot set PWD", state.pwd));
1329 *state.pwd = '.';
1330 *(state.pwd + 1) = 0;
1345 if (!*arg || *state.pwd == '/')
1415 FSINIT("pwd", get_pwd, set_pwd, FS_LICENSED,
1566 state.pwd = state.pwdbuf;
1567 *state.pwd = '.';
1671 if (!(i & env_pwd) && *state.pwd != '/' && setpwd("/") && (!home || setpwd(home)))
1678 state.pwd = 0;
1699 if (!state.pwd || !pathreal(state.pwd, P_PATHONLY, NiL))