diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-06-03 21:16:17 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-06-03 21:16:17 +0000 |
commit | 8d98ea2303d5d0636ec2e7282dc3d89777fd8f71 (patch) | |
tree | ede558a0e14a7733134a7b2ce9cca821a47309b0 /src/fileio.c | |
parent | 1dbdfafea8721a008fd1086adf68410348f3d61d (diff) | |
download | emacs-8d98ea2303d5d0636ec2e7282dc3d89777fd8f71.tar.gz |
(DRIVE_LETTER): [DOS_NT] New macro.
(expand_file_name): Apply DRIVE_LETTER macro to drive names.
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/fileio.c b/src/fileio.c index 062f75ede81..30ff2c4570b 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -102,9 +102,12 @@ extern char *strerror (); 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 @@ See also the function `substitute-in-file-name'.") 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 @@ See also the function `substitute-in-file-name'.") { /* 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 @@ See also the function `substitute-in-file-name'.") { if (!drive) abort (); target -= 2; - target[0] = drive; + target[0] = DRIVE_LETTER (drive); target[1] = ':'; } CORRECT_DIR_SEPS (target); |