Mail Archives: djgpp/2001/03/27/19:48:07
"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 -