17 if (dp
= opendir("t")) {
27 printf("first found: %s\n", entry
->d_name
);
32 printf("pos returned by telldir: %d\n", here
);
36 printf("second found: %s\n", entry
->d_name
);
39 wasname
= strdup(entry
->d_name
);
42 printf("third found: %s\n", entry
->d_name
);
48 printf("should be == second: %s\n", entry
->d_name
);
50 printf("pos given to seekdir: %d\n", here
);
52 assert(strcmp(entry
->d_name
, wasname
) == 0);
57 printf("pos returned by telldir: %d\n", here
);
62 printf("should be == second: %s\n", entry
->d_name
);
64 assert(strcmp(entry
->d_name
, wasname
) == 0);
70 printf("should be == second: %s\n", entry
->d_name
);
72 assert(strcmp(entry
->d_name
, wasname
) == 0);