[fpc-devel]Source files involved in (text) file handling (Q & A)
Jonas Maebe
jonas at zeus.rug.ac.be
Tue Jul 16 11:05:55 CEST 2002
On Sun, 14 Jul 2002, Tom Verhoeff wrote:
> routines named sys_xxx define in rtl/linux/syscalls.inc. A rather
> contorted maze, if I may say so, :-).
It's mostly there to allow easy porting.
> By the way, in the implementation for SeekEof (in text.inc), I read
> that the file position is NOT actually advanced, UNLESS the file is
> associated with a device. The implementation for SeekEoln always
> advances the file position. The documentation (ref.pdf) states that
> both SeekEof and SeekEoln advance the file position.
In the past this was true, but we got a bug report stating that the
seekeof() behaviour was incompatible with TP, so I changed it. I didn't
think of the fact that seekeoln() probably had the same problem. I'll have
a look at it.
> An experiment
> shows that the implementation is right (small wonder :-).
Michael, that's a job for you :)
> Reason for my interest is that I wanted to know why FilePos
> and Seek are not implemented for text files. The answer seems to
> be that there is a problem if they are associated with devices,
> which are not seekable.
That's possible. We just copied the behaviour of TP in this regard, I
don't know why Borland chose it that way.
Jonas
More information about the fpc-devel
mailing list