aboutsummaryrefslogtreecommitdiffstats
path: root/src/msdos.c
diff options
context:
space:
mode:
authorEli Zaretskii <[email protected]>2013-02-02 19:14:24 +0200
committerEli Zaretskii <[email protected]>2013-02-02 19:14:24 +0200
commite7ac588e198385a9bc5a2338000ab6db69c2353c (patch)
treee25696520b4cc48bdf537afb8e9497663bd187b4 /src/msdos.c
parent85a83ea09dd2440187945ed4bb5f3f6fcebb9a71 (diff)
Avoid encoding file names run through dostounix_filename on MS-Windows.
src/w32.c (normalize_filename): Accept an additional argument MULTIBYTE; if non-zero, traverse the file name by bytes and don't downcase it even if w32-downcase-file-names is non-nil. (dostounix_filename): Accept an additional argument MULTIBYTE and pass it to normalize_filename. (emacs_root_dir): Adjust. src/msdos.h (dostounix_filename): Adjust prototype. src/w32.h (dostounix_filename): Adjust prototype. src/msdos.c (dostounix_filename): Accept an additional argument and ignore it. (init_environment): Adjust callers of dostounix_filename. src/fileio.c (Ffile_name_directory, file_name_as_directory) (directory_file_name, Fexpand_file_name) (Fsubstitute_in_file_name): [DOS_NT] Adjust call to dostounix_filename. [WINDOWSNT]: Downcase file names if w32-downcase-file-names is non-nil. (Fsubstitute_in_file_name): [DOS_NT] Don't downcase environment variables, as egetenv is case-insensitive for DOS_NT. src/dired.c (file_name_completion): Don't call Fdirectory_file_name with an encoded file name. src/w32proc.c (Fw32_short_file_name, Fw32_long_file_name): Adjust calls to dostounix_filename. src/w32fns.c (Fx_file_dialog): Adjust call to dostounix_filename. src/unexw32.c (unexec): Adjust call to dostounix_filename. src/termcap.c (tgetent) [MSDOS]: Adjust call to dostounix_filename. src/emacs.c (decode_env_path) [DOS_NT]: Adjust call to dostounix_filename. src/callproc.c (Fcall_process) [MSDOS]: Adjust call to dostounix_filename.
Diffstat (limited to 'src/msdos.c')
-rw-r--r--src/msdos.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/msdos.c b/src/msdos.c
index 5174bc4dfc..1b2deaf747 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -3339,7 +3339,7 @@ void msdos_downcase_filename (unsigned char *);
/* Destructively turn backslashes into slashes. */
void
-dostounix_filename (char *p)
+dostounix_filename (char *p, int ignore)
{
msdos_downcase_filename (p);
@@ -3603,7 +3603,7 @@ init_environment (int argc, char **argv, int skip_args)
if (!s) s = "c:/command.com";
t = alloca (strlen (s) + 1);
strcpy (t, s);
- dostounix_filename (t);
+ dostounix_filename (t, 0);
setenv ("SHELL", t, 0);
/* PATH is also downcased and backslashes mirrored. */
@@ -3613,7 +3613,7 @@ init_environment (int argc, char **argv, int skip_args)
/* Current directory is always considered part of MsDos's path but it is
not normally mentioned. Now it is. */
strcat (strcpy (t, ".;"), s);
- dostounix_filename (t); /* Not a single file name, but this should work. */
+ dostounix_filename (t, 0); /* Not a single file name, but this should work. */
setenv ("PATH", t, 1);
/* In some sense all dos users have root privileges, so... */