From: Andrew Innes Date: Sun, 3 Sep 2000 17:50:12 +0000 (+0000) Subject: (compare_env): Convert to uppercase for comparison, X-Git-Tag: emacs-pretest-21.0.90~1823 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=11c22fffa0c86727fad2b57d2a8f26d6bc026a84;p=emacs.git (compare_env): Convert to uppercase for comparison, not lowercase, to match how the native Windows shell works. --- diff --git a/src/w32proc.c b/src/w32proc.c index 1f7df5e8578..0397e16a80c 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -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++; }