version 1.8, 2003/04/05 20:31:58 |
version 1.9, 2003/04/19 17:22:29 |
|
|
which = wh; |
which = wh; |
path = tpathp = pathp = pathbuf; |
path = tpathp = pathp = pathbuf; |
*pathp = CNULL; |
*pathp = CNULL; |
lastpathp = &path[sizeof pathbuf - 2]; |
lastpathp = &pathbuf[sizeof pathbuf - 2]; |
tilde = ""; |
tilde = ""; |
eargc = 0; |
eargc = 0; |
eargv = sortbase = argvbuf; |
eargv = sortbase = argvbuf; |
|
|
if (pw == NULL || strcmp(pw->pw_name, |
if (pw == NULL || strcmp(pw->pw_name, |
(char *)ebuf+1) != 0) { |
(char *)ebuf+1) != 0) { |
if ((pw = getpwnam((char *)ebuf+1)) == NULL) { |
if ((pw = getpwnam((char *)ebuf+1)) == NULL) { |
strcat((char *)ebuf, |
strlcat((char *)ebuf, |
": unknown user name"); |
": unknown user name", |
|
sizeof(ebuf)); |
yyerror((char *)ebuf+1); |
yyerror((char *)ebuf+1); |
return; |
return; |
} |
} |
|
|
if (which & E_TILDE) |
if (which & E_TILDE) |
Cat((u_char *)path, (u_char *)dp->d_name); |
Cat((u_char *)path, (u_char *)dp->d_name); |
else { |
else { |
(void) strcpy(pathp, dp->d_name); |
(void) strlcpy(pathp, dp->d_name, |
|
lastpathp - pathp + 2); |
Cat((u_char *)tilde, (u_char *)tpathp); |
Cat((u_char *)tilde, (u_char *)tpathp); |
*pathp = CNULL; |
*pathp = CNULL; |
} |
} |
|
|
patherr1: |
patherr1: |
closedir(dirp); |
closedir(dirp); |
patherr2: |
patherr2: |
(void) strcat(path, ": "); |
(void) strlcat(path, ": ", lastpathp - path + 2); |
(void) strcat(path, SYSERR); |
(void) strlcat(path, SYSERR, lastpathp - path + 2); |
yyerror(path); |
yyerror(path); |
} |
} |
|
|
|
|
doit: |
doit: |
savec = *pm; |
savec = *pm; |
*pm = 0; |
*pm = 0; |
(void) strcpy((char *)lm, (char *)pl); |
*lm = 0; |
|
(void) strlcat((char *)restbuf, (char *)pl, |
|
sizeof restbuf); |
(void) strlcat((char *)restbuf, (char *)pe + 1, |
(void) strlcat((char *)restbuf, (char *)pe + 1, |
sizeof restbuf); |
sizeof restbuf); |
*pm = savec; |
*pm = savec; |