etags: Downcase drive letters, for consistency with Emacs proper.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 22 Feb 2011 17:37:06 +0000 (09:37 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 22 Feb 2011 17:37:06 +0000 (09:37 -0800)
* etags.c (upcase): Remove; no longer used.
(canonicalize_filename): Downcase drive letters.

lib-src/ChangeLog
lib-src/etags.c

index c30e71b..84e2ac3 100644 (file)
@@ -1,5 +1,9 @@
 2011-02-22  Paul Eggert  <eggert@cs.ucla.edu>
 
+       etags: Downcase drive letters, for consistency with Emacs proper.
+       * etags.c (upcase): Remove; no longer used.
+       (canonicalize_filename): Downcase drive letters.
+
        Assume S_ISLNK etc. work, since gnulib supports this.
        * etags.c (S_ISREG): Remove.
 
index 9ca1077..29b8301 100644 (file)
@@ -239,7 +239,6 @@ If you want regular expression support, you should delete this notice and
 #define ISLOWER(c)     islower (CHAR(c))
 
 #define lowcase(c)     tolower (CHAR(c))
-#define upcase(c)      toupper (CHAR(c))
 
 
 /*
@@ -6638,7 +6637,7 @@ filename_is_absolute (char *fn)
          );
 }
 
-/* Upcase DOS drive letter and collapse separators into single slashes.
+/* Downcase DOS drive letter and collapse separators into single slashes.
    Works in place. */
 static void
 canonicalize_filename (register char *fn)
@@ -6648,8 +6647,8 @@ canonicalize_filename (register char *fn)
 
 #ifdef DOS_NT
   /* Canonicalize drive letter case.  */
-  if (fn[0] != '\0' && fn[1] == ':' && ISLOWER (fn[0]))
-    fn[0] = upcase (fn[0]);
+  if (fn[0] != '\0' && fn[1] == ':' && ISUPPER (fn[0]))
+    fn[0] = downcase (fn[0]);
 
   sep = '\\';
 #endif