FidoNet Echomail Archive
aust_c_here

<<< Previous Index Next >>>

From: Joshua Marshall
To: Paul Edwards
Date: 1997-02-20 18:47:38
Subject: Re: Borland C bug ?!?

Hello Paul,

	Ok so forget my last post too.

 PE> And the read fails, because WHEN IT WAS TRYING TO READ THE FIRST BYTE OF
 PE> DATA, IT HIT EOF AND THERE WAS NO DATA TO BE READ SO IT RETURNS NULL.

Mate, I got pretty confused here for a while.

 JM>> Step 3: process data

 PE> Process junk.

Errm...  Process the last line again.  Ok, that's junk.

I ask the question I initially asked then - How can I make sure that I
detect eof at the right time??

The only answer I can think of at the moment is:

while (fgets(...))
{
	if (feof(fptr)) break;
	/* process string */
}

Is this acceptable to you??  Remember that I am having a dog of a time with
BC4.0 and don't trust its eof detection with fgets().

 Josh Marshall   Fidonet   3:640/201.14
  ->MEMBER<-     Internet  joshua{at}st.net.au
  Team Amiga     Amiganet  41:400/869.14

... Firmness of delivery dates is inversely proportional to tightness of schedule.
--- Mail Manager 1.22x/p #1219
 * Origin: Borderline Technologies (3:640/201.14{at}fidonet)
SEEN-BY: 50/99 54/99 620/243 623/630 640/201 201 206 217 222 230 238 254 297
SEEN-BY: 640/305 309 370 375 386 547 820 821 822 823 837 890 690/660 711/413
SEEN-BY: 711/430 934 712/311 407 505 506 517 623 624 704 841 713/317 714/906
SEEN-BY: 800/1
@PATH: 711/934


<<< Previous Index Next >>>