1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 02:51:31 -08:00

(compare_env): Convert to uppercase for comparison,

not lowercase, to match how the native Windows shell works.
This commit is contained in:
Andrew Innes 2000-09-03 17:50:12 +00:00
parent 9a6f5b63a3
commit 11c22fffa0

View file

@ -664,9 +664,11 @@ compare_env (const void *strp1, const void *strp2)
while (*str1 && *str2 && *str1 != '=' && *str2 != '=')
{
if (tolower (*str1) > tolower (*str2))
/* Sort order in command.com/cmd.exe is based on uppercasing
names, so do the same here. */
if (toupper (*str1) > toupper (*str2))
return 1;
else if (tolower (*str1) < tolower (*str2))
else if (toupper (*str1) < toupper (*str2))
return -1;
str1++, str2++;
}