diff src/w32proc.c @ 31354:547138676a74

(compare_env): Convert to uppercase for comparison, not lowercase, to match how the native Windows shell works.
author Andrew Innes <andrewi@gnu.org>
date Sun, 03 Sep 2000 17:50:12 +0000
parents 42753ce203f8
children 3f0eabdbb9aa
line wrap: on
line diff
--- a/src/w32proc.c	Sun Sep 03 17:47:54 2000 +0000
+++ b/src/w32proc.c	Sun Sep 03 17:50:12 2000 +0000
@@ -664,9 +664,11 @@
 
   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++;
     }