Re: GCD code in plain old C, and a correctness question
Re: GCD code in plain old C, and a correctness question
- Subject: Re: GCD code in plain old C, and a correctness question
- From: Kevin Van Vechten <email@hidden>
- Date: Tue, 8 Sep 2009 10:33:56 -0700
On Sep 8, 2009, at 8:22 AM, David Leimbach wrote:
On Tue, Sep 8, 2009 at 12:05 AM, Kevin Van Vechten <email@hidden>
wrote:
I believe the "????" is the result of writing (int)-1 to stdout.
Actually it's much worse. I had used calloc to allocate the
context, which had the write fd. I had written -1 to "stdin" (0 is
stdin right?)
Writing to stdin causes the console to barf up ?'s ? My program is
wrong, but that's interesting behavior all the same.
You're right, stdin is file descriptor zero, which is where the
(int)-1 is being written to causing the "????".
Kevin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden