Re: [cc65] CBM POSIX I/O - USR Files

From: <silverdr1wfmh.org.pl>
Date: 2010-03-30 02:47:49
On 2010-03-29, at 15:44, Groepaz wrote:

> On Montag 29 März 2010, you wrote:
> 
>> But - anyway - if you want to support some "real world" program, which
>> requires PRG (or whatever) even for pure data, then AFAIR you can set
>> the filetype "on the fly" rather than patching the runtime, isn't it so:
> 
> sure, you can do that... but since pretty much *all* files i am dealing with 
> are PRG, i'd rather make it the default :)

OK. I see - your choice ;-)

> [snip]
> is it really so that fopen will open a file purely based on the name?

I guess you can compile those two short snippets and check? Hint: yes ;-)

> i 
> somehow doubt it (that'd be a bug in my book too, what if there exist two 
> files with different type but same name - which is entire possible

Yes - if you tweak the directory entries by hand (which makes the directory unreliable) or if you use some non-standard DOS that makes it possible.

> and perfectly fine for cbm dos ?)

Nope. Try saving (even from the BASIC) two files of the same name and different filetype.

>> So my question was more about what is the real advantage of having the
>> patched runtime vs. setting the file type from within the code itself?
> 
> its purely a convinience thing, and its more "natural" behaviour to me 
> atleast. having to explicitly set the filetype to something else than the 
> default should be the exception, not the rule. and with USR as default it is 
> exactly the other way around, for me atleast :)

OK. Understood then.

-- 
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 Tue Mar 30 02:47:57 2010

This archive was generated by hypermail 2.1.8 : 2010-03-30 02:48:00 CEST