Mail Archives: djgpp/1995/11/05/01:44:16
On Thu, 2 Nov 1995, Alexander V. Lukyanov wrote:
> The so called text mode works fine until using fseek/ftell. I saw
> the bug in Borland C 2,3,4. I didn't test it on gcc, but I'm sure,
> that it is there in many other compilers.
fseek()/ftell() are NOT the portable method of random access to files.
These functions aren't even ANSI. If you want portability, use fgetpos()
and fsetpos().
Btw, fseek()/ftell() will also work, if you only call fseek() with values
returned by ftell(), and not with values produced through arithmetics on
byte offsets.
- Raw text -