Date: Mon, 15 Nov 1999 11:26:33 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Laurynas Biveinis cc: DJGPP Workers Subject: Re: First alpha symlink patch In-Reply-To: <382EC055.8726D5BF@softhome.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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).