delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/03/11:35:19

From: Bjorn De Meyer <bgdmeyer AT eduserv2 DOT rug DOT ac DOT be>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: why is output different each time (2nd try)
Date: Tue, 3 Nov 1998 17:19:28 +0100
Organization: University of Ghent, Belgium
Lines: 41
Message-ID: <Pine.GSO.3.96.981103171748.22526D-100000@eduserv2.rug.ac.be>
References: <01be06eb$47b9e940$5640ab95 AT JUry DOT law DOT unsw DOT edu DOT au> <363F08C7 DOT 6853F8B5 AT montana DOT com>
NNTP-Posting-Host: eduserv2.rug.ac.be
Mime-Version: 1.0
In-Reply-To: <363F08C7.6853F8B5@montana.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Tue, 3 Nov 1998, bowman wrote:

> 
> 
> Joe Ury wrote:
> > 
> > Sorry my first message had a error in the code.
> > Why do I get differing output each time.  Its reading a marked up text file
> > and the first time it works ok then the next time what looks like memory
> > dump is added at the beginning of each line then the next time more of the
> > same and after a while its ok again - should I be flushing memory
> > somewhere?
> 
> I haven't had time to look at the code deeply, but I do not see the
> files being closed anyplace. I would try that first, rather than
> depending on exit code to clean up after you.
> 
> 

Also, you're opening your files in text mode rather than in binary mode,
and get you use fgetc. fuse fopen("foo.bar","rb") to open for reading in
binary mode.


Bjorn De Meyer.
IA #i^4
Homepage: http://studwww.rug.ac.be/~bgdmeyer
E-mail: bjorn DOT demeyer AT rug DOT ac DOT be 
Licentiate Chemistry. 
Coordinator of the "Tales of Artah: First Sword" CRPG project.         
  
 "I've shaven. I'm happy. I have no religion. Don't pray for me." 
                                                Illusion of Gaia 2
         
                                   

        
              
                                   
            

- Raw text -


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