changeset 24229:fc89585ce76f

(init_environment): Change argv[0] to contain the full path to Emacs.
author Andrew Innes <andrewi@gnu.org>
date Sat, 30 Jan 1999 18:48:57 +0000
parents 6ed588e4dd94
children ee835eec7607
files src/w32.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32.c	Sat Jan 30 18:47:52 1999 +0000
+++ b/src/w32.c	Sat Jan 30 18:48:57 1999 +0000
@@ -639,7 +639,7 @@
 extern Lisp_Object Vsystem_configuration;
 
 void
-init_environment ()
+init_environment (char ** argv)
 {
   int len;
   static const char * const tempdirs[] = {
@@ -758,7 +758,7 @@
 
   {
     char *p;
-    char modname[MAX_PATH];
+    static char modname[MAX_PATH];
 
     if (!GetModuleFileName (NULL, modname, MAX_PATH))
       abort ();
@@ -767,6 +767,10 @@
     *p = 0;
 
     SetCurrentDirectory (modname);
+
+    /* Ensure argv[0] has the full path to Emacs.  */
+    *p = '\\';
+    argv[0] = modname;
   }
 
   init_user_info ();