Re: [cc65] POSIX i/o

Date view Thread view Subject view

From: Piotr Fusik (P.Fusik_at_elka.pw.edu.pl)
Date: 2003-01-16 12:11:18


On Thu, 16 Jan 2003, Greg King wrote:

> > > >>> #define creat(name,mode)  open(name,O_WRONLY|O_CREAT|O_TRUNC,mode)
>
> Is creat() supposed to return an error-value when the file already exists?
> Or, is it supposed to replace an old file with a new one?

It works exactly like open() in the macro above.
O_TRUNC for open() means "truncate existing file to 0 bytes".

Piotr

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-01-16 12:11:45 CET