summaryrefslogtreecommitdiff
path: root/src/w32.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2001-12-19 19:00:44 +0000
committerEli Zaretskii <eliz@gnu.org>2001-12-19 19:00:44 +0000
commitbf7943066e1b52284bafe142626ff8c87609a0da (patch)
treed39b23f4cf3411565c611917e0998e7b0e0bed92 /src/w32.c
parentdd693537fd33a3771cb4001373038c50529a3d85 (diff)
downloademacs-bf7943066e1b52284bafe142626ff8c87609a0da.tar.gz
(emacs_root_dir): New function.
Diffstat (limited to 'src/w32.c')
-rw-r--r--src/w32.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/w32.c b/src/w32.c
index dbdd13d4d33..a8e4a5f37da 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -875,6 +875,21 @@ init_environment (char ** argv)
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
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