static char *sccsid
= "@(#)pwd.c 4.3 (Berkeley) %G%";
* Print working (current) directory
if (d
.st_ino
==rino
&& d
.st_dev
==rdev
)
if ((file
= opendir(dotdot
)) == NULL
) {
fprintf(stderr
,"pwd: cannot open ..\n");
if(d
.st_dev
== dd
.st_dev
) {
if(d
.st_ino
== dd
.st_ino
)
if ((dir
= readdir(file
)) == NULL
) {
fprintf(stderr
,"read error in ..\n");
while (dir
->d_ino
!= d
.st_ino
);
if ((dir
= readdir(file
)) == NULL
) {
fprintf(stderr
,"read error in ..\n");
} while(dd
.st_ino
!= d
.st_ino
|| dd
.st_dev
!= d
.st_dev
);
if ((off
+ dir
->d_namlen
+ 2) > BUFSIZ
-1)
name
[i
] = dir
->d_name
[i
];