* script.c (scm_compile_shell_switches): If we hit the -c or --
authorJim Blandy <jimb@red-bean.com>
Sun, 28 Sep 1997 03:13:36 +0000 (03:13 +0000)
committerJim Blandy <jimb@red-bean.com>
Sun, 28 Sep 1997 03:13:36 +0000 (03:13 +0000)
arguments, don't set the car of (command-line) to scm_usage_name,
the prettified name of the guile executable; give it the full
path, the way shells usually handle $0.

libguile/script.c

index 6eee76b..859746a 100644 (file)
@@ -461,7 +461,7 @@ scm_compile_shell_switches (int argc, char **argv)
   int interactive = 1;         /* Should we go interactive when done? */
   int use_emacs_interface = 0;
   int i;
-  char *argv0;
+  char *argv0 = argv[0];
 
   if (argc > 0)
     {
@@ -473,7 +473,6 @@ scm_compile_shell_switches (int argc, char **argv)
     }
   if (! scm_usage_name)
     scm_usage_name = "guile";
-  argv0 = scm_usage_name;
   
   for (i = 1; i < argc; i++)
     {