Re: [cc65] Re: readdir bug

From: Spiro Trikaliotis <ml-cc651trikaliotis.net>
Date: 2012-09-20 20:37:06
Hello,

* On Thu, Sep 20, 2012 at 10:13:54AM +0200 Oliver Schmidt wrote:
 
> As long as there's no workaround found for Atari DOS 2.5 that allows
> to "reinitialize" the directory read process after opening (and
> closing) a file than for this target it is necessary that the
> application takes care of the issue (by buffering the directory
> results and doing the file i/o later).

Note that the CBM seekdir() function is implemented in an extremely
simple manner: It closes the directory, reopens it, then it seeks until
it has consumed exactly that many bytes as it had consumed before.

This should be doable on the Atari, too. ;)
Just count the chars consumed when using readdir(), put the offset into
the DIR structure, and use that value for seekdir() to read over the
first x bytes.

Regards,
Spiro.

-- 
Spiro R. Trikaliotis
http://www.trikaliotis.net/
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Sep 20 20:37:27 2012

This archive was generated by hypermail 2.1.8 : 2012-09-20 20:37:30 CEST