Mail Archives: djgpp/2009/03/24/14:06:16
At 12:43 PM 3/24/2009, you wrote:
> > Date: Tue, 24 Mar 2009 00:40:03 -0400
> > From: Ethan Rosenberg <ethros AT earthlink DOT net>
> >
> > 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?
+++++
Thanks.
1] The program correctly opens all the files and runs. It fails
after about 20 writes to the files in the code that I sent you.
2] RE: The code that you sent me... which header files do I need?
Ethan
- Raw text -