delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/05/15/22:12:49

From: tjoen AT dds DOT nl
Subject: Re: B19.1 ftell(), fseek() bug
15 May 1998 22:12:49 -0700 :
Message-ID: <199805151732.TAA01877.cygnus.gnu-win32@k9.dds.nl>
References: <199805140759 DOT JAA11137 AT dione>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

> Date:          Thu, 14 May 1998 09:59:36 +0200
> From:          "Carsten Roedel K8/DIC2 Tel. 4276" <Carsten DOT Roedel AT rt DOT bosch DOT de>

> I discovered a problem with ftell() and fseek() in cygwin32-B19.1 under Win95.
> The problem is, when passing the position got from ftell() to fseek(),
> it does not end up at the same location!? Apparantly ftell does account
> the <cr>/<lf> in the byte stream, where fseek does NOT! It seems that
> fseek skips the <cr> bytes. I think that the ftell behaviour is correct,
> it should always tell the correct position in any byte stream, as it does.
> But, however, it is obvious that ftell and fseek must match together to
> be compatible. 

I remember the same behaviour from an old turboc.
My sollution was to write my own myfseek().

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019