On Mon, 21 Jun 2004 14:32:41 +0800, "i386" < XXXX@XXXXX.COM >
1. Choose a buffer size, say N=256.
2. Seek to the end
3. Seek back N chars
4. Read in N chars
5. scan for newlines. Copy in complete lines
6. If at start, stop, else seek back N chars and repeat from 3.
IOW, there is no short cut - just read chunks from the end, an scan
for newlines in the string.
C++ FAQ: http://www.yqcomputer.com/
C FAQ: http://www.yqcomputer.com/