Mail Archives: djgpp/1996/12/10/19:21:20
Errors-To: postmaster AT ns1
Date: Mon, 09 Dec 1996 15:06:25 +0100 (MET)
From: dik kettenis <Dik DOT Kettenis AT USERS DOT INFO DOT WAU DOT NL>
X-Envelope-To: djgpp AT delorie DOT com
Content-Transfer-Encoding: 7BIT
X-Priority: 3 (Normal)
Content-Type: text
Content-Length: 832
Dear reader,
I encountered a problem with binary I/O using DJGPP for C. At this time I
cannot reach the website, and I am in a hurry to get an answer or an handle
where to look. I hope somebody can help me. Please answer to my email address
and not to the list, since do not read the list yet.
I write a number of doubles in binary format to a file. After a certain
number of numbers written on that file (binary) the information on the file
is not correct. In my test program this happens after 27 doubles written on
the file. In a larger program, this happens after 52 doubles. The larger
program works fine on a SUN workstation, so I guess my problem has something
to do with MS-DOS or the Gnu C compiler. Can somebody help me out of this
problem. Thans in advance, Dik Kettenis.
email: Dik DOT Kettenis AT Users DOT info DOT wau DOT nl
Please be more specific. Did you open the file in binary mode? Thus:
fd=open("myfile", O_BINARY..., O_RDWR );
--OR--
FP=fopen( "myfile", "rb" );
If so please post a code snip showing the open and write (or other I/O) calls.
--
Art S. Kagel, kagel AT quasar DOT bloomberg DOT com
A proverb is no proverb to you 'till life has illustrated it. -- John Keats
- Raw text -