Lines Matching full:curdir
74 char *curdir = NULL; /* current working directory */
90 * Try (quite hard) to have 'curdir' defined, nothing has set
102 if (!curdir)
104 p = strstr(curdir, dest);
107 d = stalloc(strlen(curdir) + strlen(argptr[1]) + 1);
108 memcpy(d, curdir, p - curdir);
109 strcpy(d + (p - curdir), argptr[1]);
117 dest = prevdir ? prevdir : curdir;
163 * something we can't stat, clear curdir to force a getcwd()
202 if (print && iflag && curdir)
203 out1fmt("%s\n", curdir);
236 * Update curdir (the name of the current directory) in response to a
254 if (dir == NULL || curdir == NULL) {
258 prevdir = curdir;
259 curdir = NULL;
262 if (curdir)
263 setvar("PWD", curdir, VEXPORT);
272 p = curdir;
293 prevdir = curdir;
294 curdir = savestr(stackblock());
295 setvar("PWD", curdir, VEXPORT);
323 setvar("PWD", curdir, VEXPORT);
324 out1str(curdir);
345 if (curdir)
355 curdir = savestr(pwd);
387 curdir = savestr(pwd);
442 curdir = savestr(pwd);