FidoNet Echomail Archive
aust_c_here

<<< Previous Index Next >>>

From: Frank Adam
To: Peter Haywood
Date: 1997-03-02 18:53:04
Subject: Re: Borland C bug ?!?

 G'Day Peter,
 
-=> Quoting Peter Haywood to Joshua Marshall <=-

 PH> Try this instead; it may not work, but it might:
It needs a little correction..

 PH> while (fgets(s,500,fp) != EOF)
     {
      printf("\nI will not let him compare negative ints to char*.");
      }

That'll teach that naughty compiler of yours.;-)      

But here is the ultimate test.. 

fseek(fp,0L,SEEK_END);
size = ftell(file); 
rewind(fp);
    
while(fgets(s,500,fp) != NULL)
 if(!ferror(fp) && !errno && !feof(fp) && ftell(fp)
< size) 
  process(s);
 else break;
 } 

Did i forget anything (apart form my medication) ? ;-)
                                                   
  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 >>>