Re: [cc65] C64: CKOUT followed by printf

From: Oliver Schmidt <ol.sc1web.de>
Date: 2010-12-04 23:04:00
Hi Uz,

>> Hm, isn't printf() supposed to write to the 'standard output' ? [...]

> It could be implemented in this way on the CBMs (and very old
> libraries had it this way as a side effect of not supporting POSIX I/O), but
> that has the disadvantage of requiring special processing for stdin/stdout
> inside the library

I see. On the Apple2 this is btw. necessary anyway as the API the
POSIX I/O is built on doesn't know anything about devices.

> and not being able to redirect stdin/stdout/stderr from
> within the program itself.

I presume you're talking about closing and re-opening the three
standard descriptors. I don't understand your statement well. As long
as the program uses the three standard descriptors "as-is" the
environment can redirect the I/O. If the program redirects than any
environment setting doesn't mattter anymore. That's the behaviour one
knows from contemporary desktop environments and btw. the Apple2 C
library has.

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 Sat Dec 4 23:04:19 2010

This archive was generated by hypermail 2.1.8 : 2010-12-04 23:04:22 CET