Hi!
Thursday, 10 May, 2001 Christopher Faylor [EMAIL PROTECTED] wrote:
CF> The difference is the call to the "OS". It's optional in my case and
CF> mandatory in yours. I don't know if this makes a difference but I would
CF> bet that the scanning of the environment is not a quick process. That
CF> would be weighed against the potentially extra two elements to be sorted
CF> by qsort.
CF> Hmm. Actually, you stop checking for the extra variables after the
CF> build of winenv passes the place where they would be placed, too,
CF> so that is a difference.
yes, because both lists are sorted.
CF> I don't know. I think that the calls to GetEnvironmentVariable outweigh
CF> anything else, especially since most of the time they probably aren't
CF> needed.
CF> Comments?
you're right. always calling GetEnvironmentVariable is a waste of
time. i've changed my patch to
- avoid repeated scanning of forced env vars list.
- look into native environment only when needed.
- don't truncate forced vars values to MAX_PATH symbols.
Egor. mailto:[EMAIL PROTECTED] ICQ 5165414 FidoNet 2:5020/496.19
force-systemroot-2.diff
force-systemroot-2.ChangeLog