1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-10 19:29:45 +00:00

Added a note about errors in disk drives on some platforms that lead to

failures if files are opened/closed while reading the directory.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5828 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2012-09-20 20:25:22 +00:00
parent e6b52ee8d0
commit 60a47704d4

View File

@ -1,4 +1,4 @@
<!doctype linuxdoc system>
<!doctype linuxdoc system> <!-- -*- text-mode -*- -->
<article>
<title>cc65 function reference
@ -4824,6 +4824,17 @@ be used in presence of a prototype.
<item>The returned pointer may point to a statically allocated instance of
<tt/struct dirent/, so it may get overwritten by subsequent calls to
<tt/readdir/.
<item>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
<tt/readdir/, opens the file to process it, will fail.<newline>
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:
<verb>
seekdir (DIR, telldir (DIR));
</verb>
Platforms known to work without problems are: Apple.
</itemize>
<tag/Availability/POSIX 1003.1
<tag/See also/