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

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2012-08-11 20:09:27
On Sat, Aug 11, 2012 at 05:31:33PM +0200, Oliver Schmidt wrote:
> Is it possible to pass a pure filename to a device? The reason I'm
> asking is that the cc65 C lib prepends a "0:" to every filename that
> doesn't already have "<num>:" prefix. Or is there another obvious ;-)
> reason why this is done?

No, there is no special reason.

> The C library explicitly looks for "0:" or "1:" but no higher driver
> numbers. Where does this restriction stem from? Is this restriction
> useful / necessary / desirable?

There are several dual drive stations in the PET world. The maximum unit
number I was aware of was 1.

> In this thread there were several filename examples given containing
> an '@' char. Those are currently not recognized by the C library. So
> the qeustion is what the '@' does and if it is relevant for POSIX i/o
> scenarios - meaning the C library possibly needs to be fixed.

A file name starting with '@' tells the drive to scratch the file before
opening it. But the implementation has bugs on several drives that may lead to
data loss, so its use is strongly discouraged.

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 Sat Aug 11 20:09:35 2012

This archive was generated by hypermail 2.1.8 : 2012-08-11 20:09:38 CEST