Re: [cc65] Common macros for dirent.d_type

From: Ullrich von Bassewitz <>
Date: 2012-07-07 15:02:58
On Sat, Jul 07, 2012 at 12:54:56PM +0200, A. Fachat wrote:
> So in my not so humble opinion the C compiler should not add/use a default file
> type at all. Let the floppy handle it.

That won't work, because the library has to supply a secondary address
somehow. And by choosing the secondary address, it will actually determine the
default file type, the floppy uses. If done this way, there's still a chance
for (some) people to complain, because in their opinion the cc65 libs might
use the wrong secondary address when opening a file. In fact, the situation is
even worse, because now, one can change a variable that contains the file
type, which is clean and clearly visible. Having it encoded into a secondary
address makes it for more difficult to grasp, where the file type comes from.

My impression from the discussion is, that it is ok as it is. I will probably
remove the file type in append mode. Greg is right here, it is not needed and
possibly harmful. So in the future, CBM programmers will still be faced with
the extremely complex issue of setting a variable, if they want another file
type to be created, but as we all know, programming should be hard work, and
not fun:-)



Ullrich von Bassewitz                        
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat Jul 7 15:03:15 2012

This archive was generated by hypermail 2.1.8 : 2012-07-07 15:03:18 CEST