Message-ID: <34CA9618.6108@compuserve.com> Date: Sat, 24 Jan 1998 20:32:08 -0500 From: Laurent Turcotte MIME-Version: 1.0 Subject: Re: whats wromg with my file program? - HELP! References: <199801220709 DOT UAA24275 AT fep1-orange DOT clear DOT net DOT nz> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Newsgroups: comp.os.msdos.djgpp Lines: 30 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hi Jamie Jamie Love wrote: > > Not specifically a djgpp question, but it does happen to involve the > djgpp.env file > > So, can anyone tell my why, when I compile and run the binary with the > following command line: > (the sprites.set is certainly a real file) > remdefs sprites.set > I get the djgpp.env file!!! instead of the correct sprites.set file. BTW I > run this under dos. > . > . > . > if((length = fread(data, 1, length, inFile)) != -1) > { > printf("Error: unable to read %d bytes from %s", length, argv[1]); > return 0; > } > . > . > . You shoukd probably have this: if((length = fread(data, 1, length, inFile)) == -1) Regards Laurent Turcotte