Date: Sun, 16 Feb 1997 13:27:46 +0200 (IST) From: Eli Zaretskii To: Robert Hoehne cc: DJGPP workers Subject: Re: Patch for _use_lfn.c In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Fri, 14 Feb 1997, Robert Hoehne wrote: > The patch for _use_lfn.c is to speed up _use_lfn(). > When I understood the function correct, the variable > 'filesystem_flags' is used to avoid unneccessary calls > to getenv(). But with the current implementation it is > set only, when "LFN=y". I see your point, but I suggest to fix this problem in a slightly different manner (which I think is both faster and safer, since it doesn't call `_get_volume_info' when LFN is set to N). Can you see if the patch below works for you with the same efficiency as yours? *** src/libc/dos/lfn/_use_lfn.c~0 Sun Feb 16 11:32:06 1997 --- src/libc/dos/lfn/_use_lfn.c Sun Feb 16 11:35:48 1997 *************** _use_lfn (const char *path) *** 153,159 **** lfnenv = getenv ("LFN"); if(lfnenv && (tolower (lfnenv[0]) == 'n')) { ! filesystem_flags &= ~_FILESYS_LFN_SUPPORTED; last_drive = 0; return 0; } --- 153,162 ---- lfnenv = getenv ("LFN"); if(lfnenv && (tolower (lfnenv[0]) == 'n')) { ! if (filesystem_flags == _FILESYS_UNKNOWN) ! filesystem_flags = 0; ! else ! filesystem_flags &= ~_FILESYS_LFN_SUPPORTED; last_drive = 0; return 0; }