Mail Archives: djgpp/1996/12/21/06:50:59
In article <32BB5A76 DOT 27EC1FC AT alcyone DOT com>, max AT alcyone DOT com says...
>
>Roland Nilsson wrote:
>
>> I've been using djgpp for a few months, and has experienced some
>> problems during heavy usage of C-style FILE io. It seems fread()
>> and fwrite() cannot handle reads of any size, they fail in certain
>> situations. I have not been able to find any logical pattern, they
>> just bomb sometimes. Are there any restrictions on FILE usage which
>> could explain this behaviour (maximum transfer sizes, reads at odd
>> positions, etc) ???
>
>How large?
>
>The only thing that comes to mind offhand: Are you trying to read binary
>data? If so, are you sure you've opened the file in binary mode? (If not,
>this would likely explain your problems, depending on your definition of
>"they just bomb sometimes.")
Yes, I'm parsing binary files. I believe C FILE i/o is always in raw
mode. The only fopen() flags available are those relating to i/o
direction and overwrite, according to my djgpp function list.
I usually fopen() with "r".
----------------------------------------------------------- - - -
Roland Nilsson, Pitea, SWEDEN
--/ member of the \--
--( Avante OS Development Group )-- www.mediaport.org/~wierdo/
--\ (project coordinator) /--
- Raw text -