delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/01/13/05:30:34

Date: Wed, 13 Jan 1999 12:27:52 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Laszlo Molnar <laszlo DOT molnar AT eth DOT ericsson DOT se>
cc: djgpp-workers AT delorie DOT com
Subject: Re: djgpp 2.02 + perl + glob
In-Reply-To: <19990113103850.A1869@duna41>
Message-ID: <Pine.SUN.3.91.990113121740.27917Y-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

On Wed, 13 Jan 1999, Laszlo Molnar wrote:

> Yes, I use tell() before reading and lseek() after it. 

You will have to simulate the file pointer yourself now.

In general, relying on the normal file-oriented DOS functions to do 
something for a handle that you hooked with an fsext is a bad idea.  If 
you hook the handle, you should emulate everything.

Fsext only reserves a file handle to make sure no real file handle has 
the same value.  But you shouldn't rely on any hidden knowledge about the 
internal workings of fsext for other purposes.

> However I liked the 2.01 version better, because
> in that version the fsext handle worked just like a real file handle,
> it took care about the file position.

v2.01 implementation would fail after allocating a few handles.  Typical
systems have something like FILES=40.  Somebody complained that it is
unreasonable to limit filesystem extensions that don't really use any
files. 

- Raw text -


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