changeset 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 7ba96d66b0c5
children d883244d9cf4
files src/w32proc.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
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++;
     }