FidoNet Echomail Archive
aust_c_here

<<< Previous Index Next >>>

From: Frank Adam
To: Joshua Marshall
Date: 1997-02-16 14:08:02
Subject: Re: Borland C bug ?!?

 G'Day Joshua,
 
-=> Quoting Joshua Marshall to Paul Edwards <=-
 
 JM>> while (!feof(fp))
 JM>> {
 JM>> fgets(s,500,fp);
 PE>    ^^^^^^^^^^^^^^^^
 JM>> blah blah
 JM>> }
 
 JM> I can't trust the fgets to report EOF, it seems to be 
 JM> working sometimes and not others.  I will try to get some 

Then line 1 in the loop could(should) be if(NULL == fgets(s,500,fp)) break;
That should just about cover all the error checking you can throw at it.
:-)  

  L8r Frank (fadam{at}ozemail.com.au).
  
___ 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 >>>