[Coco] Os9 Intercept

William Astle lost at l-w.ca
Tue Oct 30 11:43:19 EDT 2012


On 12-10-30 09:35 AM, Bill Pierce wrote:
>
> You know, I've been so caught up trying to get printf to work, most other options have been forgotten :-)
> I guess I need to run the guantlet of all the different output commands and find one that works the way I want. I just don't understand why the buffers are not emptied after the command completes in the first place. To print to screen, flush should never be needed.

It's common behaviour for stdout to be line buffered in stdio (and 
sometimes it's fully buffered, depending on the output device and 
operating system). A proper stdio has a call that will turn off 
buffering on the specified stream (can't remember what it is offhand 
though). fflush() should also force stdio to flush its buffers so printf 
followed by fflush should have a similar effect. Note that all of this 
happens in the user process so the buffering behaviour of the underlying 
operating system devices does not affect this.

>
> Bill P
>
> Music from the Tandy/Radio Shack Color Computer 2 & 3
> https://sites.google.com/site/dabarnstudio/
> Bill Pierce
> ooogalapasooo at aol.com
>
>
> -----Original Message-----
> From: Retro Canada <retrocanada76 at gmail.com>
> To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
> Sent: Tue, Oct 30, 2012 11:22 am
> Subject: Re: [Coco] Os9 Intercept
>
> why not try the good'ol write ?
> write(fileno(stdout), str, strlen(str));
>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>




More information about the Coco mailing list