6 main (int argc
, char *argv
[])
15 for (dp
= readdir(dirp
); dp
!= NULL
; dp
= readdir(dirp
))
17 /* save position 3 (after fourth entry) */
19 save3
= telldir(dirp
);
21 printf("%s\n", dp
->d_name
);
23 /* stop at 400 (just to make sure dirp->__offset and dirp->__size are
29 printf("going back past 4-th entry...\n");
31 /* go back to saved entry */
32 seekdir (dirp
, save3
);
35 /* print remaining files (3-last) */
36 for (dp
= readdir(dirp
); dp
!= NULL
; dp
= readdir(dirp
))
37 printf("%s\n", dp
->d_name
);