Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
bf794306
Commit
bf794306
authored
Dec 19, 2001
by
Eli Zaretskii
Browse files
(emacs_root_dir): New function.
parent
dd693537
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
0 deletions
+33
-0
src/ChangeLog
src/ChangeLog
+7
-0
src/msdos.c
src/msdos.c
+11
-0
src/w32.c
src/w32.c
+15
-0
No files found.
src/ChangeLog
View file @
bf794306
2001-12-19 Eli Zaretskii <eliz@is.elta.co.il>
2001-12-19 Eli Zaretskii <eliz@is.elta.co.il>
* w32.c (emacs_root_dir): New function.
* msdos.c (emacs_root_dir): New function.
* fileio.c (Fexpand_file_name) [DOS_NT]: Use the root directory
of the current drive as the fallback for default_directory.
* dired.c (file_name_completion): Run the elements of
* dired.c (file_name_completion): Run the elements of
completion-ignored-extensions through ENCODE_FILE.
completion-ignored-extensions through ENCODE_FILE.
...
...
src/msdos.c
View file @
bf794306
...
@@ -38,6 +38,7 @@ Boston, MA 02111-1307, USA. */
...
@@ -38,6 +38,7 @@ Boston, MA 02111-1307, USA. */
#include <string.h>
/* for bzero and string functions */
#include <string.h>
/* for bzero and string functions */
#include <sys/stat.h>
/* for _fixpath */
#include <sys/stat.h>
/* for _fixpath */
#include <unistd.h>
/* for chdir, dup, dup2, etc. */
#include <unistd.h>
/* for chdir, dup, dup2, etc. */
#include <dir.h>
/* for getdisk */
#if __DJGPP__ >= 2
#if __DJGPP__ >= 2
#include <fcntl.h>
#include <fcntl.h>
#include <io.h>
/* for setmode */
#include <io.h>
/* for setmode */
...
@@ -4118,6 +4119,16 @@ getdefdir (drive, dst)
...
@@ -4118,6 +4119,16 @@ getdefdir (drive, dst)
return
1
;
return
1
;
}
}
char
*
emacs_root_dir
(
void
)
{
static
char
root_dir
[
4
];
sprintf
(
root_dir
,
"%c:/"
,
'A'
+
getdisk
());
root_dir
[
0
]
=
tolower
(
root_dir
[
0
]);
return
root_dir
;
}
/* Remove all CR's that are followed by a LF. */
/* Remove all CR's that are followed by a LF. */
int
int
...
...
src/w32.c
View file @
bf794306
...
@@ -875,6 +875,21 @@ init_environment (char ** argv)
...
@@ -875,6 +875,21 @@ init_environment (char ** argv)
init_user_info
();
init_user_info
();
}
}
char
*
emacs_root_dir
(
void
)
{
static
char
root_dir
[
FILENAME_MAX
];
const
char
*
p
;
p
=
getenv
(
"emacs_dir"
);
if
(
p
==
NULL
)
abort
();
strcpy
(
root_dir
,
p
);
root_dir
[
parse_root
(
root_dir
,
NULL
)]
=
'\0'
;
dostounix_filename
(
root_dir
);
return
root_dir
;
}
/* We don't have scripts to automatically determine the system configuration
/* We don't have scripts to automatically determine the system configuration
for Emacs before it's compiled, and we don't want to have to make the
for Emacs before it's compiled, and we don't want to have to make the
user enter it, so we define EMACS_CONFIGURATION to invoke this runtime
user enter it, so we define EMACS_CONFIGURATION to invoke this runtime
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment