emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/src/callproc.c
Date: Tue, 04 Feb 2003 09:03:22 -0500

Index: emacs/src/callproc.c
diff -c emacs/src/callproc.c:1.195 emacs/src/callproc.c:1.196
*** emacs/src/callproc.c:1.195  Fri Aug 23 23:14:32 2002
--- emacs/src/callproc.c        Tue Feb  4 09:03:11 2003
***************
*** 253,259 ****
  
  #ifndef subprocesses
    /* Without asynchronous processes we cannot have BUFFER == 0.  */
!   if (nargs >= 3 
        && (INTEGERP (CONSP (args[2]) ? XCAR (args[2]) : args[2])))
      error ("Operating system cannot handle asynchronous subprocesses");
  #endif /* subprocesses */
--- 253,259 ----
  
  #ifndef subprocesses
    /* Without asynchronous processes we cannot have BUFFER == 0.  */
!   if (nargs >= 3
        && (INTEGERP (CONSP (args[2]) ? XCAR (args[2]) : args[2])))
      error ("Operating system cannot handle asynchronous subprocesses");
  #endif /* subprocesses */
***************
*** 339,345 ****
          CHECK_BUFFER (buffer);
        }
      }
!   else 
      buffer = Qnil;
  
    /* Make sure that the child will be able to chdir to the current
--- 339,345 ----
          CHECK_BUFFER (buffer);
        }
      }
!   else
      buffer = Qnil;
  
    /* Make sure that the child will be able to chdir to the current
***************
*** 431,437 ****
        *tempfile = '\0';
      }
    dostounix_filename (tempfile);
!   if (*tempfile == '\0' || tempfile[strlen (tempfile) - 1] != '/') 
      strcat (tempfile, "/");
    strcat (tempfile, "detmp.XXX");
    mktemp (tempfile);
--- 431,437 ----
        *tempfile = '\0';
      }
    dostounix_filename (tempfile);
!   if (*tempfile == '\0' || tempfile[strlen (tempfile) - 1] != '/')
      strcat (tempfile, "/");
    strcat (tempfile, "detmp.XXX");
    mktemp (tempfile);
***************
*** 545,551 ****
           code does not handle passing the environment to the synchronous
           Mac subprocess.  */
        char *infn, *outfn, *errfn, *currdn;
!       
        /* close these files so subprocess can write to them */
        close (outfilefd);
        if (fd_error != outfilefd)
--- 545,551 ----
           code does not handle passing the environment to the synchronous
           Mac subprocess.  */
        char *infn, *outfn, *errfn, *currdn;
! 
        /* close these files so subprocess can write to them */
        close (outfilefd);
        if (fd_error != outfilefd)
***************
*** 780,786 ****
  
        /* Now NREAD is the total amount of data in the buffer.  */
        immediate_quit = 0;
!       
        if (!NILP (buffer))
          {
            if (! CODING_MAY_REQUIRE_DECODING (&process_coding))
--- 780,786 ----
  
        /* Now NREAD is the total amount of data in the buffer.  */
        immediate_quit = 0;
! 
        if (!NILP (buffer))
          {
            if (! CODING_MAY_REQUIRE_DECODING (&process_coding))
***************
*** 793,799 ****
              repeat_decoding:
                size = decoding_buffer_size (&process_coding, nread);
                decoding_buf = (char *) xmalloc (size);
!               
                /* We can't use the macro CODING_REQUIRE_DETECTION
                   because it always returns nonzero if the coding
                   system requires EOL detection.  Here, we have to
--- 793,799 ----
              repeat_decoding:
                size = decoding_buffer_size (&process_coding, nread);
                decoding_buf = (char *) xmalloc (size);
! 
                /* We can't use the macro CODING_REQUIRE_DETECTION
                   because it always returns nonzero if the coding
                   system requires EOL detection.  Here, we have to
***************
*** 807,816 ****
                  }
                if (process_coding.cmp_data)
                  process_coding.cmp_data->char_offset = PT;
!               
                decode_coding (&process_coding, bufptr, decoding_buf,
                               nread, size);
!               
                if (display_on_the_fly
                    && saved_coding.type == coding_type_undecided
                    && process_coding.type != coding_type_undecided)
--- 807,816 ----
                  }
                if (process_coding.cmp_data)
                  process_coding.cmp_data->char_offset = PT;
! 
                decode_coding (&process_coding, bufptr, decoding_buf,
                               nread, size);
! 
                if (display_on_the_fly
                    && saved_coding.type == coding_type_undecided
                    && process_coding.type != coding_type_undecided)
***************
*** 825,831 ****
                    carryover = nread;
                    continue;
                  }
!               
                if (process_coding.produced > 0)
                  insert_1_both (decoding_buf, process_coding.produced_char,
                                 process_coding.produced, 0, 1, 0);
--- 825,831 ----
                    carryover = nread;
                    continue;
                  }
! 
                if (process_coding.produced > 0)
                  insert_1_both (decoding_buf, process_coding.produced_char,
                                 process_coding.produced, 0, 1, 0);
***************
*** 840,848 ****
                        /* CRs have been replaced with LFs.  Undo
                           that in the text inserted above.  */
                        unsigned char *p;
!                       
                        move_gap_both (PT, PT_BYTE);
!                       
                        p = BYTE_POS_ADDR (pt_byte_orig);
                        for (; p < GPT_ADDR; ++p)
                          if (*p == '\n')
--- 840,848 ----
                        /* CRs have been replaced with LFs.  Undo
                           that in the text inserted above.  */
                        unsigned char *p;
! 
                        move_gap_both (PT, PT_BYTE);
! 
                        p = BYTE_POS_ADDR (pt_byte_orig);
                        for (; p < GPT_ADDR; ++p)
                          if (*p == '\n')
***************
*** 858,864 ****
                        old_pt = PT;
                        old_pt_byte = PT_BYTE;
                        nCR = 0;
!                       
                        for (bytepos = PT_BYTE - 1;
                             bytepos >= pt_byte_orig;
                             --bytepos)
--- 858,864 ----
                        old_pt = PT;
                        old_pt_byte = PT_BYTE;
                        nCR = 0;
! 
                        for (bytepos = PT_BYTE - 1;
                             bytepos >= pt_byte_orig;
                             --bytepos)
***************
*** 882,894 ****
                      coding = AREF (eol_type, CODING_EOL_LF);
                    else
                      coding = saved_coding.symbol;
!                   
                    process_coding.symbol = coding;
                    process_coding.eol_type = CODING_EOL_LF;
                    process_coding.mode
                      &= ~CODING_MODE_INHIBIT_INCONSISTENT_EOL;
                  }
!               
                nread -= process_coding.consumed;
                carryover = nread;
                if (carryover > 0)
--- 882,894 ----
                      coding = AREF (eol_type, CODING_EOL_LF);
                    else
                      coding = saved_coding.symbol;
! 
                    process_coding.symbol = coding;
                    process_coding.eol_type = CODING_EOL_LF;
                    process_coding.mode
                      &= ~CODING_MODE_INHIBIT_INCONSISTENT_EOL;
                  }
! 
                nread -= process_coding.consumed;
                carryover = nread;
                if (carryover > 0)
***************
*** 1106,1112 ****
      unbind_to (count1, Qnil);
    }
  
!   /* Note that Fcall_process takes care of binding 
       coding-system-for-read.  */
  
    record_unwind_protect (delete_temp_file, filename_string);
--- 1106,1112 ----
      unbind_to (count1, Qnil);
    }
  
!   /* Note that Fcall_process takes care of binding
       coding-system-for-read.  */
  
    record_unwind_protect (delete_temp_file, filename_string);
***************
*** 1144,1150 ****
     of environ around the vfork and the call to this function.
  
     SET_PGRP is nonzero if we should put the subprocess into a separate
!    process group.  
  
     CURRENT_DIR is an elisp string giving the path of the current
     directory the subprocess should have.  Since we can't really signal
--- 1144,1150 ----
     of environ around the vfork and the call to this function.
  
     SET_PGRP is nonzero if we should put the subprocess into a separate
!    process group.
  
     CURRENT_DIR is an elisp string giving the path of the current
     directory the subprocess should have.  Since we can't really signal
***************
*** 1467,1473 ****
  #endif /* not VMS */
  
  /* This is run before init_cmdargs.  */
!   
  void
  init_callproc_1 ()
  {
--- 1467,1473 ----
  #endif /* not VMS */
  
  /* This is run before init_cmdargs.  */
! 
  void
  init_callproc_1 ()
  {
***************
*** 1475,1481 ****
    char *doc_dir = egetenv ("EMACSDOC");
  
    Vdata_directory
!     = Ffile_name_as_directory (build_string (data_dir ? data_dir 
                                             : PATH_DATA));
    Vdoc_directory
      = Ffile_name_as_directory (build_string (doc_dir ? doc_dir
--- 1475,1481 ----
    char *doc_dir = egetenv ("EMACSDOC");
  
    Vdata_directory
!     = Ffile_name_as_directory (build_string (data_dir ? data_dir
                                             : PATH_DATA));
    Vdoc_directory
      = Ffile_name_as_directory (build_string (doc_dir ? doc_dir
***************
*** 1494,1500 ****
  init_callproc ()
  {
    char *data_dir = egetenv ("EMACSDATA");
!     
    register char * sh;
    Lisp_Object tempdir;
  
--- 1494,1500 ----
  init_callproc ()
  {
    char *data_dir = egetenv ("EMACSDATA");
! 
    register char * sh;
    Lisp_Object tempdir;
  
***************
*** 1512,1518 ****
          Vexec_path = Fcons (tem, Vexec_path);
          Vexec_path = nconc2 (decode_env_path ("PATH", ""), Vexec_path);
        }
!       
        Vexec_directory = Ffile_name_as_directory (tem);
  #endif /* not DOS_NT */
  
--- 1512,1518 ----
          Vexec_path = Fcons (tem, Vexec_path);
          Vexec_path = nconc2 (decode_env_path ("PATH", ""), Vexec_path);
        }
! 
        Vexec_directory = Ffile_name_as_directory (tem);
  #endif /* not DOS_NT */
  




reply via email to

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