www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/25/18:45:23

Message-ID: <34CA9618.6108@compuserve.com>
Date: Sat, 24 Jan 1998 20:32:08 -0500
From: Laurent Turcotte <lturcott AT compuserve DOT com>
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>
Newsgroups: comp.os.msdos.djgpp
Lines: 30
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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

- Raw text -


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