delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/11/15/05:33:57

Date: Mon, 15 Nov 1999 11:26:33 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Laurynas Biveinis <lauras AT softhome DOT net>
cc: DJGPP Workers <djgpp-workers AT delorie DOT com>
Subject: Re: First alpha symlink patch
In-Reply-To: <382EC055.8726D5BF@softhome.net>
Message-ID: <Pine.SUN.3.91.991115112547.26969A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 14 Nov 1999, Laurynas Biveinis wrote:

> Eli Zaretskii wrote:
> > I don't like static global variables: they are evil in recursive
> > situations.
> 
> Are they harmful in this particular case ?

I don't know, they might.  Did you try to call `getcwd' in a recursive
program, like the one which calls `ftw'?  If not, it might be a good
idea.

> I wanted that first symlink file test would be fast and sort 
> out 95% of non symlink cases, and only remaining 5% or so files would be 
> opened, readed first few charactes

Understood.  I thought about this a bit, and it seems to me that the
only other way to do it would be to have symlinks be of constant known
size.  Then you can call findfirst and look at the size to sort out
most of the files.  It should be as fast as the attribute check, since
_chmod shares lots of code with findfirst (inside DOS, I mean).

- Raw text -


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