This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: your mail


> 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