Re: [cc65] Filenames for POSIX functins on CBM targets

From: Oliver Schmidt <ol.sc1web.de>
Date: 2012-08-10 16:57:13
Hi,

> You know that the device number must be parsed on the computer side, but
> the drive number is parsed on the floppy side?

Yes, I understand this. Therefore my idea of the unit prepending the
rest. If the unit number it followed by a drive number then the latter
can be passed to the floppy by just offsetting the string.

> Also, there can be an at
> before the drive number ("4:@0:...")

Thanks for pointing out. However my proposal doesn't make the current
situation better or worse. As far as I can tell from the current C
library code it fails on recognizing "@0:name" as a name with a drive
specification and will therfore prepend an additional "0:" resulting
in "0:@0:name". As far as I understand this needs to be fixed totally
independently from my proposal of an additional "<unit>:" prefix.

>> All these thoughts based on the presumption that there isn no second
>> char beside ':' that can be reserved for unit separation purposes.
>
> Well, there are chars with specific meanings in the floppy (":", "@",
> "#", Shift+Space (0xA0) - I'd have to check sources to find out if there
> are more of them). The only one that cannot occur in a file name for
> sure is Shift+Space, because that's the char the floppy uses to fill
> names that are smaller than the maximum. Thus, the first
> Shift+SPACE-Char is not part of the filename anymore. (But, this can be
> abused in other ways...)

I see. So the interesting question is how the parser processes the
filename given. If both '0' and '.' are legal filename chars then the
- hypothetical - question is why "0:name" doesn't result in a file
called "0:name". Most likely the answer is that a number followed by a
':' means to select the drive. So it isn't possible to create a file
named "0:name".

And that's the point I'm trying to make here: If it isn't possible to
create a file named "0:name" anyway then it is proved that we're not
reducing the possible filenames by adding an additional "<num>:"
prefix! The only thing we loose is the possiblity to specify a drive
name without also specifying a unit name.

Regards,
Oliver
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Aug 10 16:58:01 2012

This archive was generated by hypermail 2.1.8 : 2012-08-10 16:58:05 CEST