ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1992/09/25/10:41:45

Date: Fri, 25 Sep 92 06:48:35 PDT
From: thomas AT imagen DOT com (thomas (tom) mullin)
To: kuku AT acds DOT physik DOT rwth-aachen DOT de
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: binary files

> I'm after a bug in a big f2c compiled program for days now and things
> concentrate around fread/fwrite/fopen on binary files.
> I'm getting some strange shifting of data during reading from a binary file
> and I wonder whether it is because these data are 0a0d. Hadn't there
> been some problem with binary files in the djgpp runtime library in
> the past? I'm using 1.08 now. But this problem existed in 1.07 also. All my
> sources are compiled under gcc-1.39 on a SCO system. The objects are then 
> inked together using libc.a etc. under djgpp. Is the ld reliable? My binary
> has 5700 symbols and is about text 5MB + data 2MB + bss 4 MB in size.

If you never read/write larger then 512 bytes, fread/fwrite work.  Try breaking
up large reads/writes into smaller chunks.


Thomas

- Raw text -


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