Re: [cc65] CBM LFN Question

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2010-10-24 20:48:37
On Sun, Oct 24, 2010 at 08:38:21PM +0200, silverdr@wfmh.org.pl wrote:
> > If the library uses a certain lfn, it cannot prevent the user from using the
> > same one in his own code.
>
> How about "forgetting" the numbers? I mean if we use POSIX style I/O, we 
> shouldn't care about this.
                                                                    
You are right, as long as you just used POSIX file I/O, you don't have to
care. But the question was caused by mixing CBM file I/O with POSIX file I/O.

> Some time ago - I wrote a short code that scans the file table and returns
> available "filehandle", unless the limit of ten concurrent files is reached.
[...]
> Maybe something like that could go into lib? I should still have it somewhere
> but if memory serves, it was quite trivial.

As always it's balancing the advantages and disadvantages of the possible
solutions. Yours works and is not difficult to implement, but it is larger,
and platform dependent, because there is no "official" access to the file
handle table of the kernal. Given the case in question, it would offer an
advantage, but in my eyes the better solution is to make CBM file I/O
unnecessary (by adding POSIX directory routines).

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Oct 24 20:48:48 2010

This archive was generated by hypermail 2.1.8 : 2010-10-24 20:48:50 CEST