delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/08/26/05:22:59

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10108260808.AA13822@clio.rice.edu>
Subject: Re: Read 3F00 STDIN problem on Win 2K ( was Re: Fseek on STDIN problem on Win 2K)
To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
Date: Sun, 26 Aug 2001 03:08:15 -0500 (CDT)
Cc: acottrel AT ihug DOT com DOT au, djgpp-workers AT delorie DOT com
In-Reply-To: <Pine.SUN.3.91.1010826105340.3978N-100000@is> from "Eli Zaretskii" at Aug 26, 2001 10:56:13 AM
X-Mailer: ELM [version 2.5 PL2]
Mime-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> On Sun, 26 Aug 2001, Charles Sandmann wrote:
> 
> > > > But if the seek to end behavior provides bug immunity, a much simpler fix.
> > > 
> > > Doesn't seek to current also solve the problem?  If it does, it should be 
> > > much cheaper (seek to end could be slow on large files).
> > 
> > But seek to end is a one time fix (never have to do it again)
> 
> Are we sure this is indeed the case?

I'm never sure anymore.  More tests would be needed.  I just put it back
to the 2.03 behavior for file handle 0, NT and I couldn't break it anymore.

> > while the
> > seek to current must be done before each seek (or so we currently believe,
> > maybe it only has to be done once ?)
> 
> How can we arrange things to be able to take advantage of this one-time 
> fix?  

I'm not sure it's a one time fix for seek current.  But if we made the 5
routines that seek call a single core routine, we could set a flag for
handle 0.

> Do we maintain flag per handle which says we already did that or 
> not?

Only needed for handle 0 anyway, so at worse one flag, and only for NT-type.

> I'm thinking about getting lseek work reliably, not just lseek's callers.

To make it reliable everone would have to call lseek's primative instead
of doing the same thing themselves.

Actually doing BOTH of these fixes wouldn't be a bad idea - if we didn't 
turn on the fix in the seek common routine we still would have cleaned up
5 pieces of identical code ...

- Raw text -


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