X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com Date: Tue, 24 Mar 2009 18:43:21 +0200 From: Eli Zaretskii Subject: Re: DJGPP Setup? In-reply-to: <0KGZ00GQ8UBIYMM0@mta4.srv.hcvlny.cv.net> X-012-Sender: halo1 AT inter DOT net DOT il To: djgpp AT delorie DOT com Message-id: References: <0KGZ00GQ8UBIYMM0 AT mta4 DOT srv DOT hcvlny DOT cv DOT net> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Date: Tue, 24 Mar 2009 00:40:03 -0400 > From: Ethan Rosenberg > > I have a program that opens almost 30 files. My config.sys has > files=50. The function listed below is where the problem is. It > runs perfectly when there are approx less than 20 writes to each of > the file pointers. With fptr27 and fptr25, after approx 20 writes, > it gives garbage. When I examine the output from the write, [fptr27 > and fptr25], the beginning approx 20 lines of the output is OK, and > then garbage. The sprintf function works perfectly. I have stepped > thru the program and seen that the fwrite function is getting the > correct input. I have checked the function with splint, and it finds > no errors. You didn't show the code which opens the files, and I think you are assuming too much about the root cause of the problem. I suggest to separate the variables: first, can you write a simple program that just opens more than 20 files, writes a constant string into each one of them, and the exits? If you run such a program, do you get all the files on disk with the string you wrote into them, or don't you?