[Coco] glork!!!

Willard Goosey goosey at virgo.sdc.org
Tue Dec 18 05:58:44 EST 2007


>Date: Mon, 17 Dec 2007 18:01:19 +0000
>From: Manny <cocolist at invigorated.org>

>Both of Willard's examples are perfectly fine for ANSI C. I would 
>suspect that the same would be held for K&R C, as well.

Thank you!

>So, unless I've missed the whole point of this post, which I normally 
>end up doing, the return values of the printf function is weird. :)

Nope, you've got it!

I can handle printf returning the number of characters printed, that
can be useful.  It was returning a negative value on a successful
write and that's offending me.

I wanted my new version of yes to be sure to die painlessly and
successfully when its output closed (as in, the pipe it was writing to
was closed by the reading program) so I was careful to inspect what
printf returns.  

I think the Krieder printf() doesn't return anything specifically, so
I end up with whatever happens to be in D at rts.

Willard
-- 
Willard Goosey  goosey at sdc.org
Socorro, New Mexico, USA
"I've never been to Contempt!  Isn't that somewhere in New Mexico?"
   --- Yacko



More information about the Coco mailing list