Mail Archives: djgpp-workers/1999/11/15/05:33:57
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 -