| version 1.12, 1998/03/14 03:27:59 |
version 1.13, 1998/08/10 02:43:09 |
| Line 257 getcwd(pt, size) |
|
| Line 257 getcwd(pt, size) |
|
| * path to the beginning of the buffer, but it's always |
* path to the beginning of the buffer, but it's always |
| * been that way and stuff would probably break. |
* been that way and stuff would probably break. |
| */ |
*/ |
| bcopy(bpt, pt, (size_t)(ept - bpt)); |
memcpy(pt, bpt, (size_t)(ept - bpt)); |
| free(up); |
free(up); |
| return (pt); |
return (pt); |
| } |
} |
| Line 303 getcwd(pt, size) |
|
| Line 303 getcwd(pt, size) |
|
| goto notfound; |
goto notfound; |
| if (ISDOT(dp)) |
if (ISDOT(dp)) |
| continue; |
continue; |
| bcopy(dp->d_name, bup, |
memcpy(bup, dp->d_name, |
| (size_t)(dp->d_namlen + 1)); |
(size_t)(dp->d_namlen + 1)); |
| |
|
| /* Save the first error for later. */ |
/* Save the first error for later. */ |
| Line 334 getcwd(pt, size) |
|
| Line 334 getcwd(pt, size) |
|
| goto err; |
goto err; |
| bpt = pt + off; |
bpt = pt + off; |
| ept = pt + ptsize; |
ept = pt + ptsize; |
| bcopy(bpt, ept - len, len); |
memcpy(ept - len, bpt, len); |
| bpt = ept - len; |
bpt = ept - len; |
| } |
} |
| if (!first) |
if (!first) |
| *--bpt = '/'; |
*--bpt = '/'; |
| bpt -= dp->d_namlen; |
bpt -= dp->d_namlen; |
| bcopy(dp->d_name, bpt, (size_t)dp->d_namlen); |
memcpy(bpt, dp->d_name, (size_t)dp->d_namlen); |
| (void)closedir(dir); |
(void)closedir(dir); |
| |
|
| /* Truncate any file name. */ |
/* Truncate any file name. */ |