diff options
author | Eli Zaretskii <eliz@gnu.org> | 2001-12-19 19:00:44 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2001-12-19 19:00:44 +0000 |
commit | bf7943066e1b52284bafe142626ff8c87609a0da (patch) | |
tree | d39b23f4cf3411565c611917e0998e7b0e0bed92 /src/msdos.c | |
parent | dd693537fd33a3771cb4001373038c50529a3d85 (diff) | |
download | emacs-bf7943066e1b52284bafe142626ff8c87609a0da.tar.gz |
(emacs_root_dir): New function.
Diffstat (limited to 'src/msdos.c')
-rw-r--r-- | src/msdos.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/msdos.c b/src/msdos.c index da39c9a99fa..168d3dfc88a 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -38,6 +38,7 @@ Boston, MA 02111-1307, USA. */ #include <string.h> /* for bzero and string functions */ #include <sys/stat.h> /* for _fixpath */ #include <unistd.h> /* for chdir, dup, dup2, etc. */ +#include <dir.h> /* for getdisk */ #if __DJGPP__ >= 2 #include <fcntl.h> #include <io.h> /* for setmode */ @@ -4118,6 +4119,16 @@ getdefdir (drive, dst) 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. */ int |