delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/03/27/19:48:07

From: Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: fread() problems
Date: Tue, 27 Mar 2001 23:34:51 +0100
Lines: 23
Message-ID: <do42ct85cn1obsapq1330tt5qcmu3mm2an@4ax.com>
References: <e37w6.982$eX4 DOT 229562 AT typhoon DOT tampabay DOT rr DOT com>
NNTP-Posting-Host: modem-229.xenon.dialup.pol.co.uk
Mime-Version: 1.0
X-Trace: newsg3.svr.pol.co.uk 985732450 2697 62.136.45.229 (27 Mar 2001 22:34:10 GMT)
NNTP-Posting-Date: 27 Mar 2001 22:34:10 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Newsreader: Forte Agent 1.7/32.534
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Greg Donnells" <gad AT donnesys DOT com> wrote:

> I'm currently using 2.03 to write and read information from a binary file.
> (records are 516 bytes in length). fread() will read the 1st 6 records
> perfectly - then it locks up on the next read and requires me to kill the
> program (3-fingered salute), and to kill the window the program is running
> in. It's like fread() doesn't know hos to read the next disk cluster in the
> file.
> 
> The docs state that if it has a read problem, that it will return the number
> of recs read - it locks.
> 
> I've searched (as best as I know how) the bug archives, but have seen
> nothing like this. Any help would be greatly appreciated (I'll be hapy to
> share input/out and source files if necessary).

Yes, please do share your code, especially if you suspect a bug in the C
library.  It's best to post a complete program, that will compile cleanly
with -Wall, and say what it does and what you expected it to do.

But first try to reduce the program to the smallest that demonstrates the
problem.  If this a bug in your code then the exercise of reducing it
will either reveal the bug, or make it easier for someone else to spot.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019