shortshort way of reversing the lines in a file
John White
jnw at mcnc.UUCP
Fri Sep 20 09:55:23 AEST 1985
> I found that the "shorter version" segemention faulted when
> reading the 50th line of a file (and I tried several several
> different files). I haven't tried to run the problem down yet.
> Does anyone have any ideas?
I assume you are refering to the program with the routine that reads
a line into a local buffer, recurses, and prints the line. This routine
requires a buffer on the stack for each line of the file. If you have
a 1k buffer size on your machine and a 64k segment size, then you will
run out of memory at around 50 lines.
- John
More information about the Comp.sources.bugs
mailing list