/* Copyright (c) 1982 Regents of the University of California */
static char sccsid
[] = "@(#)seekdir.c 4.7 11/14/82";
* seek to an entry in a directory.
* Only values returned by ``telldir'' should be passed to seekdir.
long curloc
, base
, offset
;
base
= loc
& ~(DIRBLKSIZ
- 1);
offset
= loc
& (DIRBLKSIZ
- 1);
if (dirp
->dd_loc
!= 0 && (curloc
& ~(DIRBLKSIZ
- 1)) == base
) {
lseek(dirp
->dd_fd
, base
, 0);
while (dirp
->dd_loc
< offset
) {