Adjusted according to the recently updated readdir() doc that now says:
"On several platforms, namely the CBMs and the Atari, the disk drives get confused when opening/closing files between directory reads. So for example a program that reads the list of files on a disk, and after each call to readdir, opens the file to process it, will fail.
Possible solutions are reading the directory into memory before processing the file list, or to reset the directory by seeking to the correct position after opening/closing a file:
seekdir (DIR, telldir (DIR));
Platforms known to work without problems are: Apple."
git-svn-id: svn://svn.cc65.org/cc65/trunk@5832
b7a2c559-68d2-44c3-8de9-
860c34a00d81