FidoNet Echomail Archive

<<< Previous Index Next >>>

From: Frank Adam
To: Joshua Marshall
Date: 1997-02-10 06:34:00
Subject: Borland C bug ?!?

 G'Day Joshua,
-=> Quoting Joshua Marshall to All <=-
 JM> I have had a problem running the following code compiled by Borland C
 JM> 4.0 
 JM> while (fgets(s, 500, fp))
 JM> for some reason it sometimes doesn't detect EOF properly!!
 JM> Is this bug only in Borland??  K&R say that fgets should 
 JM> return NULL if EOF is reached.
No, i've had this happen to me too, and i blamed it on fgets() until 
i found a problem somewhere else in the code. For the life of me i can't
remember what it was, but make sure all relevant code(buffer,handle) are ok.

  L8r Frank (fadam{at}
___ Blue Wave/DOS v2.21

--- Maximus 3.00
 * Origin: ZWSBBS +61-3-98276881 28800bps Multiline (3:634/396)
SEEN-BY: 633/267 270
@PATH: 634/396 639/252 632/360 50/99 635/728 633/267

<<< Previous Index Next >>>