From: kagel AT quasar DOT bloomberg DOT com Date: Tue, 10 Dec 1996 18:53:40 -0500 Message-Id: <9612102353.AA05604@quasar.bloomberg.com > To: Dik DOT Kettenis AT USERS DOT INFO DOT WAU DOT NL Cc: djgpp AT delorie DOT com In-Reply-To: (message from dik kettenis on Mon, 09 Dec 1996 15:06:25 +0100 (MET)) Subject: Re: A problem with binary I/O Reply-To: kagel AT dg1 DOT bloomberg DOT com Errors-To: postmaster AT ns1 Date: Mon, 09 Dec 1996 15:06:25 +0100 (MET) From: dik kettenis 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