Searched refs:pwd (Results 1 - 25 of 53) sorted by relevance

123

/ast/src/cmd/3d/
H A Dchdir3d.c49 if (state.level > 0 && state.pwd && !CHDIR(state.pwd))
56 if (state.pwd)
59 * save absolute path in state.pwd
64 strcpy(buf, state.pwd);
76 state.pwdsize = strcopy(state.pwd, buf) - state.pwd;
77 memcpy(state.envpwd + sizeof(var_pwd) - 1, state.pwd, state.pwdsize);
79 message((-1, "chdir: %s [%d]", state.pwd, state.level));
H A Dmkdir3d.c80 if (state.path.level || state.level && (sp == state.pwd || streq(sp, state.pwd)) || (r = MKDIR(sp, mode)) && errno == ENOENT)
140 if (sp == state.dot) sp = state.pwd;
146 if (sp == state.pwd || streq(sp, state.pwd))
149 CHDIR(state.pwd);
H A Dpathreal.c152 if (state.level && streq(path, ".") && !CHDIR(state.pwd))
193 if (state.level > 0 && state.pwd && ((type & (P_PATHONLY|P_TOP)) && *sp != '/' || *sp == '.' && sp[1] == 0))
195 if (!CHDIR(state.pwd))
201 sp = strcpy(state.path.name, state.pwd);
205 if (!state.pwd || sp[1] == 0 && (*sp == '.' || *sp == '/' && !safe))
209 if (*sp == '/' || !state.pwd && (type & P_PATHONLY))
211 else if (!state.pwd)
221 strncpy(state.path.name, state.pwd, PATH_MAX);
233 strcpy(state.path.name, state.pwd);
236 if (safe && state.pwdsize >= safesize && !strncmp(state.pwd, stat
[all...]
H A Dinit.c952 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; local
1305 if (*s != '/' || *state.pwd == '/')
1315 strncpy(state.pwd, s, state.pwdsize);
1316 state.pwd[state.pwdsize] = 0;
1317 state.pwdsize = pathcanon(state.pwd, sizeo
[all...]
/ast/src/cmd/cs/vcs_src/
H A Dmnt_imount.h24 #include <pwd.h>
/ast/src/lib/libtksh/include/
H A DtclPort.h3 #include <pwd.h>
/ast/src/cmd/ksh93/sh/
H A Dsubshell.c84 char *pwd; /* present working directory */ member in struct:subshell
85 const char *shpwd; /* saved pointer to sh.pwd */
87 int pwdfd; /* file descritor for pwd */
522 if(!shp->pwd)
537 sp->shpwd = shp->pwd;
541 if(xp->pwdfd>0 && strcmp(xp->pwd,shp->pwd)==0)
568 sp->pwd = (shp->pwd?strdup(shp->pwd)
[all...]
/ast/src/cmd/nmake/
H A Dmain.c395 * pwd initialization
402 internal.pwd = (s = getcwd(buf, MAXNAME)) ? strdup(s) : strdup(".");
403 internal.pwdlen = strlen(internal.pwd);
417 setvar(external.pwd, internal.pwd, V_import);
428 if ((v = getvar(external.pwd)) && !streq(v->value, internal.pwd))
430 if (!stat(v->value, &st) && !stat(internal.pwd, &ds) && st.st_ino == ds.st_ino && st.st_dev == ds.st_dev)
432 free(internal.pwd);
433 internal.pwd
[all...]
H A Drule.c1657 if ((unique(r) || !r->time) && !streq(r->name, internal.dot->name) && !streq(r->name, internal.pwd))
1704 char* pwd; local
1763 sfprintf(internal.tmp, "%s/", internal.pwd);
1770 pwd = 0;
1771 if (strncmp(internal.pwd, t, n) || (c = internal.pwd[n]) && c != '/')
1774 * ksh pwd and ast getcwd() are logical
1782 sfputr(internal.nam, internal.pwd, -1);
1789 sfprintf(internal.nam, "%s%s", t, internal.pwd + (s - u));
1790 pwd
[all...]
/ast/src/lib/libast/misc/
H A Dfts.c58 FTSENT* pwd; /* pwd parent */ \
87 FTSENT* pwd; /* pwd parent */ \
481 if (fts->pwd)
484 verify |= fts->pwd->symlink;
486 fts->pwd = fts->pwd->pwd;
901 fts->pwd
[all...]
/ast/src/lib/libast/string/
H A Dfmtuid.c38 #include <pwd.h>
H A Dstruid.c39 #include <pwd.h>
H A Dstrgid.c40 #include <pwd.h>
/ast/src/lib/libcoshell/
H A Dcolib.h53 dev_t pwd_dev; /* previous pwd dev */ \
54 ino_t pwd_ino; /* previous pwd inode number */ \
116 char* pwd; /* pwd */ member in struct:Costate_s
H A Dcoexec.c226 state.pwd,
275 sfprintf(sp, " %s%s/%s", red, state.pwd, out);
286 sfprintf(sp, " 2%s%s/%s", red, state.pwd, err);
350 sfprintf(sp, " %s%s/%s", red, state.pwd, out);
361 sfprintf(sp, " 2%s%s/%s", red, state.pwd, err);
/ast/src/cmd/mam/
H A Dmamtst.c48 sfprintf(sfstdout, "process %s pid %d ppid %d start %lu finish %lu status %d\n", pp->pwd, pp->pid, pp->parent ? pp->parent->pid : 0, pp->start, pp->finish, pp->status);
/ast/src/lib/libast/uwin/
H A Drcmd.c43 #include <pwd.h>
354 struct passwd *pwd; local
358 if ((pwd = getpwnam(luser)) == NULL)
360 (void)strcpy(pbuf, pwd->pw_dir);
362 (void)seteuid(pwd->pw_uid);
368 if (sbuf.st_uid && sbuf.st_uid != pwd->pw_uid) {
/ast/src/lib/libmam/
H A Dmam.h107 char* pwd; /* pwd */ member in struct:proc
H A Dmam.c118 if (pp->pwd) free(pp->pwd);
137 if (*name != '/' || *pp->fp->rule->name == '/' || !pp->pwd) return(0);
138 sfsprintf(buf, sizeof(buf), "%s/%s", pp->pwd, pp->fp->rule->name);
343 else if (streq(arg, "pwd"))
346 pp->pwd = strdup(val);
/ast/src/cmd/mailx/
H A Dvars.c525 if (!getcwd(state.path.pwd[0], sizeof(state.path.pwd[0])))
526 strcpy(state.path.pwd[0], ".");
527 state.var.pwd = state.path.pwd[0];
528 state.var.oldpwd = state.path.pwd[1];
/ast/src/cmd/coshell/
H A Dshell.c213 char* pwd; local
225 if (tokscan(msg, &end, "%s %d %d %s %s %s %s %s %s", NiL, &id, &flags, &pwd, &out, &err, &att, &env, &act) != 9)
348 else if (*out != '/' && *out != '&') sfprintf(state.string, "%s/", pwd);
351 else if (*err != '/' && *err != '&') sfprintf(state.string, "%s/", pwd);
/ast/src/lib/libtk/unix/
H A DtkUnixPort.h44 #include <pwd.h>
/ast/src/cmd/ksh93/bltins/
H A Dcd_pwd.c24 * pwd [-LP]
84 oldpwd = (char*)shp->pwd;
222 shp->pwd = pwdnod->nvalue.cp;
/ast/src/cmd/INIT/
H A Dmamake.c224 char* pwd; /* current directory */ member in struct:__anon22
660 state.pwd = s;
661 if (!state.pwd)
665 state.pwd = duplicate(buf);
666 search(state.vars, "PWD", state.pwd);
684 if (stat(state.pwd, &ts))
685 report(3, "cannot stat", state.pwd, (unsigned long)0);
690 p = state.pwd + strlen(state.pwd);
691 while (p > state.pwd)
[all...]
/ast/src/cmd/at/
H A Datd.c46 #include <pwd.h>
161 char* pwd; /* jobs dir path */ member in struct:__anon39
195 register struct passwd* pwd; local
204 if (pwd = name ? getpwnam(name) : getpwuid(uid))
206 if (name) uid = pwd->pw_uid;
207 else name = pwd->pw_name;
208 home = pwd->pw_dir;
393 sfprintf(state->tmp, "%s/%s/%s", state->pwd, state->pwd, AT_QUEUE_FILE);
421 sfprintf(state->tmp, "%s/%s/%s", state->pwd, fil
[all...]

Completed in 64 milliseconds

123