Date: Wed, 2 Oct 1996 10:06:33 +0400 (MSD) From: "Alexander V. Lukyanov" Message-Id: <199610020606.KAA05370@video.yars.free.net> To: djgpp AT delorie DOT com, stenns AT www DOT tci DOT uni-hannover DOT de Subject: Re: ftell bug with text files ? > It seems that the failure occurs when a line break is on a > mutilple of 16384 bytes (the value of BUFSIZ in stdio.h). > Line breaks in MSDOS are pairs, but in the internal buffer > a line break is only . Ftell scans the unread part of the buffer > to account for stripped 's, but if the buffer ends with a > this is currently not seen by ftell. Take a look at the alpha snapshots' libc. The problem you describe and many others are fixed there. To fix ftell/fseek, it was needed to make stdio buffers hold non-processed raw data, thus avoiding all collisions with hidden cr's.