Re: [cc65] Common macros for dirent.d_type

From: <silverdr1wfmh.org.pl>
Date: 2012-07-07 15:06:26
On 2012-07-07, at 12:54, 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. And if someone needs special file types, 
> the file name extension is the way - so there is not even a way to set a 
> special global variable just to change the default file type.

The only problem is that when creating the file it has to be done in some way. When we talk about ISO/POSIX functions they don't expect the user to provide CBM specific params like "secondary address" but the function has to use them at some point. Now, if we would like to switch the default to PRG (as Groepaz wants) this would mean either (ab)using channel#1 or always adding filetype to the name given by the user. For me none of those seem to be a good choice.

Therefore my opinion:
1. let's use appropriate channel# (2 - 14) and in the absence of global variable, the drive will do its job alone.
2. In the presence of global variable we assume that the user knows what he is doing and we append the appropriate filetype specification to the filename, still using appropriate secondary address (channel#)

I take back the proposal for making PRG as default for cbm_k_ functions as I was mistaken about the default BASIC/DOS behaviour when suggesting it.

-- 
SD!

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat Jul 7 15:06:36 2012

This archive was generated by hypermail 2.1.8 : 2012-07-07 15:06:40 CEST