Mail Archives: djgpp/1996/10/15/14:21:09
>hello:
> I am using ftell() function with a text file. If I opened unbuffered
>ftell() works good, but if I opened buffered ftell() does'nt work
>properly. I am using libc dated 22 Feb 96.
> Thanks.
Yes ftell have bugs, but, can you use the binary mode?, if you really need to
be seeking in a text file open it in binary mode you'll avoid problems of ftell
(even the comercial packages have some troubles) and you'll get much (really
much) more speed. Some common problem with the ftell is that an advance in the
file may be reported as a retrocess by ftell if you make arithmetic with the
file pointers, so you are limited in the use of ftell (this thing can be
observed in BC++ 3.1 and DJGPP v2.0 22 Feb 96).
SET
********************************************************************************
Salvador Eduardo Tropea (SET) - salvador AT inti DOT edu DOT ar
Work: INTI (National Institute of Industrial Technology) Sector: ICE
(Electronic Control & Instrumentation)
Post (Home): Curapaligue 2124 - Caseros (1678)- Buenos Aires - Argentina
- Raw text -