Mail Archives: djgpp-workers/1999/02/03/12:09:32
On Wed, 3 Feb 1999, I wrote:
> > Somebody doesn't happen to know some interrupt for seeking that
> > returns valid data on file positions bigger than 2^31?
>
> I will try to search my references.
I looked, but didn't find anything.
You could work around the problem by going all the way back to the
beginning of the file from the original position, and then computing the
final position on your own, though. The simple-minded way would be to go
back one byte at a time until you hit the beginning; a much faster way is
to use whatever is returned by lseek as the step size, until you get past
the beginning, then compute the size by adding the last (negative) result
with the positive steps you did before that.
If the above works and isn't too slow, maybe that's the way to go?
- Raw text -