Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
31353:7ba96d66b0c5 | 31354:547138676a74 |
---|---|
662 { | 662 { |
663 const char *str1 = *(const char **)strp1, *str2 = *(const char **)strp2; | 663 const char *str1 = *(const char **)strp1, *str2 = *(const char **)strp2; |
664 | 664 |
665 while (*str1 && *str2 && *str1 != '=' && *str2 != '=') | 665 while (*str1 && *str2 && *str1 != '=' && *str2 != '=') |
666 { | 666 { |
667 if (tolower (*str1) > tolower (*str2)) | 667 /* Sort order in command.com/cmd.exe is based on uppercasing |
668 names, so do the same here. */ | |
669 if (toupper (*str1) > toupper (*str2)) | |
668 return 1; | 670 return 1; |
669 else if (tolower (*str1) < tolower (*str2)) | 671 else if (toupper (*str1) < toupper (*str2)) |
670 return -1; | 672 return -1; |
671 str1++, str2++; | 673 str1++, str2++; |
672 } | 674 } |
673 | 675 |
674 if (*str1 == '=' && *str2 == '=') | 676 if (*str1 == '=' && *str2 == '=') |