emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/process.c


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/src/process.c
Date: Thu, 29 Aug 2002 15:26:11 -0400

Index: emacs/src/process.c
diff -c emacs/src/process.c:1.378 emacs/src/process.c:1.379
*** emacs/src/process.c:1.378   Tue Jul 16 11:49:48 2002
--- emacs/src/process.c Fri Aug 23 23:16:03 2002
***************
*** 1421,1427 ****
  #else /* not VMS */
    new_argv = (unsigned char **) alloca ((nargs - 1) * sizeof (char *));
  
!   /* If program file name is not absolute, search our path for it */
    if (!IS_DIRECTORY_SEP (SREF (program, 0))
        && !(SCHARS (program) > 1
           && IS_DEVICE_SEP (SREF (program, 1))))
--- 1421,1428 ----
  #else /* not VMS */
    new_argv = (unsigned char **) alloca ((nargs - 1) * sizeof (char *));
  
!   /* If program file name is not absolute, search our path for it.
!      Put the name we will really use in TEM.  */
    if (!IS_DIRECTORY_SEP (SREF (program, 0))
        && !(SCHARS (program) > 1
           && IS_DEVICE_SEP (SREF (program, 1))))
***************
*** 1435,1451 ****
        if (NILP (tem))
        report_file_error ("Searching for program", Fcons (program, Qnil));
        tem = Fexpand_file_name (tem, Qnil);
-       tem = ENCODE_FILE (tem);
-       new_argv[0] = SDATA (tem);
      }
    else
      {
        if (!NILP (Ffile_directory_p (program)))
        error ("Specified program for new process is a directory");
! 
!       tem = ENCODE_FILE (program);
!       new_argv[0] = SDATA (tem);
      }
  
    /* Here we encode arguments by the coding system used for sending
       data to the process.  We don't support using different coding
--- 1436,1459 ----
        if (NILP (tem))
        report_file_error ("Searching for program", Fcons (program, Qnil));
        tem = Fexpand_file_name (tem, Qnil);
      }
    else
      {
        if (!NILP (Ffile_directory_p (program)))
        error ("Specified program for new process is a directory");
!       tem = program;
      }
+ 
+   /* If program file name starts with /: for quoting a magic name,
+      discard that.  */
+   if (SBYTES (tem) > 2 && SREF (tem, 0) == '/'
+       && SREF (tem, 1) == ':')
+     tem = Fsubstring (tem, make_number (2), Qnil);
+ 
+   /* Encode the file name and put it in NEW_ARGV.
+      That's where the child will use it to execute the program.  */
+   tem = ENCODE_FILE (tem);
+   new_argv[0] = SDATA (tem);
  
    /* Here we encode arguments by the coding system used for sending
       data to the process.  We don't support using different coding




reply via email to

[Prev in Thread] Current Thread [Next in Thread]