/* Copyright (c) 1982 Regents of the University of California */
static char sccsid
[] = "@(#)readdir.c 4.3 8/8/82";
* read an old stlye directory entry and present it as a new one
* get next entry in a directory.
register struct olddirect
*dp
;
static struct direct dir
;
dirp
->dd_size
= read(dirp
->dd_fd
, dirp
->dd_buf
,
if (dirp
->dd_loc
>= dirp
->dd_size
) {
dp
= (struct olddirect
*)(dirp
->dd_buf
+ dirp
->dd_loc
);
dirp
->dd_loc
+= sizeof(struct olddirect
);
strncpy(dir
.d_name
, dp
->od_name
, ODIRSIZ
);
dir
.d_name
[ODIRSIZ
] = '\0'; /* insure null termination */
dir
.d_namlen
= strlen(dir
.d_name
);
dir
.d_reclen
= DIRBLKSIZ
;