your mail

Hans Zuidam hans@brandinnovators.com
Tue Apr 28 07:12:00 GMT 1998


> Tan Pinghui wrote:
> Some strange behaviors occur with the following simple program, I
> can't figure out why and how.
Although I don't know your hardware setup it looks like gets() is
returning EOF on the second call to it, gets() should return a
nil-string.  The subtle difference is that gets() should return a
nil-string (i.e. "") if you only type a newline and it should return
a NULL pointer to signal EOF or a read error.  Try the same program
on any UNIX box and type ^D (EOF) on the second gets().  Hope this
helps,
					Hans

-- 
H. Zuidam                        E-Mail: hans@brandinnovators.com
Brand Innovators B.V.            P-Mail: P.O. Box 1377
de Pinckart 54                   5602 BJ Eindhoven, The Netherlands
5674 CC Nuenen                   Tel. +31 40 2631134, Fax. +31 40 2831138



More information about the crossgcc mailing list