changeset 15324:6fd4e01fd332

(DRIVE_LETTER): [DOS_NT] New macro. (expand_file_name): Apply DRIVE_LETTER macro to drive names.
author Richard M. Stallman <rms@gnu.org>
date Mon, 03 Jun 1996 21:16:17 +0000
parents af013b84d1ad
children 5c8e4ef3137c
files src/fileio.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c	Mon Jun 03 20:06:27 1996 +0000
+++ b/src/fileio.c	Mon Jun 03 21:16:17 1996 +0000
@@ -102,9 +102,12 @@
    redirector allows the six letters between 'Z' and 'a' as well. */
 #ifdef MSDOS
 #define IS_DRIVE(x) ((x) >= 'A' && (x) <= 'z')
+#define DRIVE_LETTER(x) (x)
 #endif
 #ifdef WINDOWSNT
 #define IS_DRIVE(x) isalpha (x)
+extern Lisp_Object Vwin32_downcase_file_names;
+#define DRIVE_LETTER(x) (NILP (Vwin32_downcase_file_names) ? (x) : tolower (x))
 #endif
 #endif
 
@@ -1065,7 +1068,7 @@
 	  if (strcmp (nm - 2, XSTRING (name)->data) != 0)
 	    {
 	      name = make_string (nm - 2, p - nm + 2);
-	      XSTRING (name)->data[0] = drive;
+	      XSTRING (name)->data[0] = DRIVE_LETTER (drive);
 	      XSTRING (name)->data[1] = ':';
 	    }
 	  return name;
@@ -1159,7 +1162,7 @@
 	{
 	  /* Either nm starts with /, or drive isn't mounted. */
 	  newdir = alloca (4);
-	  newdir[0] = drive;
+	  newdir[0] = DRIVE_LETTER (drive);
 	  newdir[1] = ':';
 	  newdir[2] = '/';
 	  newdir[3] = 0;
@@ -1407,7 +1410,7 @@
     {
       if (!drive) abort ();
       target -= 2;
-      target[0] = drive;
+      target[0] = DRIVE_LETTER (drive);
       target[1] = ':';
     }
   CORRECT_DIR_SEPS (target);