Mercurial > emacs
diff src/msdos.c @ 42192:bd23b0c564d9
(emacs_root_dir): New function.
| author | Eli Zaretskii <eliz@gnu.org> |
|---|---|
| date | Wed, 19 Dec 2001 18:56:44 +0000 |
| parents | 63819c5d6049 |
| children | e71102774d9b |
line wrap: on
line diff
--- a/src/msdos.c Wed Dec 19 18:55:01 2001 +0000 +++ b/src/msdos.c Wed Dec 19 18:56:44 2001 +0000 @@ -38,6 +38,7 @@ #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 @@ 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
