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: Kim F. Storm
Subject: [Emacs-diffs] Changes to emacs/src/process.c
Date: Tue, 14 Jan 2003 04:55:29 -0500

Index: emacs/src/process.c
diff -c emacs/src/process.c:1.393 emacs/src/process.c:1.394
*** emacs/src/process.c:1.393   Sun Jan 12 15:24:06 2003
--- emacs/src/process.c Tue Jan 14 04:55:27 2003
***************
*** 132,138 ****
  Lisp_Object QCname, QCbuffer, QChost, QCservice, QCtype;
  Lisp_Object QClocal, QCremote, QCcoding;
  Lisp_Object QCserver, QCnowait, QCnoquery, QCstop;
! Lisp_Object QCsentinel, QClog, QCoptions, QCvars;
  Lisp_Object Qlast_nonmenu_event;
  /* QCfamily is declared and initialized in xfaces.c,
     QCfilter in keyboard.c.  */
--- 132,138 ----
  Lisp_Object QCname, QCbuffer, QChost, QCservice, QCtype;
  Lisp_Object QClocal, QCremote, QCcoding;
  Lisp_Object QCserver, QCnowait, QCnoquery, QCstop;
! Lisp_Object QCsentinel, QClog, QCoptions, QCplist;
  Lisp_Object Qlast_nonmenu_event;
  /* QCfamily is declared and initialized in xfaces.c,
     QCfilter in keyboard.c.  */
***************
*** 1037,1072 ****
    return Fplist_get (contact, key);
  }
  
! DEFUN ("process-variable", Fprocess_variable, Sprocess_variable,
!        1, 2, 0,
!        doc: /* Return the value of PROCESS' private variable VAR.
! If VARIABLE is omitted or nil, return plist with all PROCESS variables.  */)
!      (process, var)
!      register Lisp_Object process, var;
  {
    CHECK_PROCESS (process);
! 
!   if (NILP (var))
!     return XPROCESS (process)->private_vars;
! 
!   return Fplist_get (XPROCESS (process)->private_vars, var);
  }
  
! DEFUN ("set-process-variable", Fset_process_variable, Sset_process_variable,
!        3, 3, 0,
!        doc: /* Change value of PROCESS' private variable VAR to VAL, and 
return VAL.
! If VAR is nil, set all PROCESS' private variables according to plist VAL.  */)
!      (process, var, val)
!      register Lisp_Object process, var, val;
  {
    CHECK_PROCESS (process);
  
!   XPROCESS (process)->private_vars
!     = (NILP (var)
!        ? val
!        : Fplist_put (XPROCESS (process)->private_vars, var, val));
! 
!   return val;
  }
  
  #if 0 /* Turned off because we don't currently record this info
--- 1037,1062 ----
    return Fplist_get (contact, key);
  }
  
! DEFUN ("process-plist", Fprocess_plist, Sprocess_plist,
!        1, 1, 0,
!        doc: /* Return the plist of PROCESS.  */)
!      (process)
!      register Lisp_Object process;
  {
    CHECK_PROCESS (process);
!   return XPROCESS (process)->plist;
  }
  
! DEFUN ("set-process-plist", Fset_process_plist, Sset_process_plist,
!        2, 2, 0,
!        doc: /* Replace the plist of PROCESS with PLIST.  */)
!      (process, plist)
!      register Lisp_Object process, plist;
  {
    CHECK_PROCESS (process);
+   CHECK_LIST (plist);
  
!   XPROCESS (process)->plist = plist;
  }
  
  #if 0 /* Turned off because we don't currently record this info
***************
*** 1434,1440 ****
    record_unwind_protect (start_process_unwind, proc);
  
    XPROCESS (proc)->childp = Qt;
!   XPROCESS (proc)->private_vars = Qnil;
    XPROCESS (proc)->command_channel_p = Qnil;
    XPROCESS (proc)->buffer = buffer;
    XPROCESS (proc)->sentinel = Qnil;
--- 1424,1430 ----
    record_unwind_protect (start_process_unwind, proc);
  
    XPROCESS (proc)->childp = Qt;
!   XPROCESS (proc)->plist = Qnil;
    XPROCESS (proc)->command_channel_p = Qnil;
    XPROCESS (proc)->buffer = buffer;
    XPROCESS (proc)->sentinel = Qnil;
***************
*** 2599,2606 ****
  is the server process, CLIENT is the new process for the connection,
  and MESSAGE is a string.
  
! :vars VARS -- Initialize the process' private variables according to
! a list of variable/value pairs (VAR1 VAL1 VAR2 VAL2...).
   
  :server BOOL -- if BOOL is non-nil, create a server process for the
  specified FAMILY, SERVICE, and connection type (stream or datagram).
--- 2589,2595 ----
  is the server process, CLIENT is the new process for the connection,
  and MESSAGE is a string.
  
! :plist PLIST -- Install PLIST as the new process' initial plist.
   
  :server BOOL -- if BOOL is non-nil, create a server process for the
  specified FAMILY, SERVICE, and connection type (stream or datagram).
***************
*** 2619,2626 ****
  inherited from the server process' TYPE, FILTER and SENTINEL.
  - The client process' contact info is set according to the client's
  addressing information (typically an IP address and a port number).
! - The client process' private variables are initialized from the
! server's private variables.
  
  Notice that the FILTER and SENTINEL args are never used directly by
  the server process.  Also, the BUFFER argument is not used directly by
--- 2608,2614 ----
  inherited from the server process' TYPE, FILTER and SENTINEL.
  - The client process' contact info is set according to the client's
  addressing information (typically an IP address and a port number).
! - The client process' plist is initialized from the server's plist.
  
  Notice that the FILTER and SENTINEL args are never used directly by
  the server process.  Also, the BUFFER argument is not used directly by
***************
*** 3183,3189 ****
    p = XPROCESS (proc);
  
    p->childp = contact;
!   p->private_vars = Fcopy_sequence (Fplist_get (contact, QCvars));
    
    p->buffer = buffer;
    p->sentinel = sentinel;
--- 3171,3177 ----
    p = XPROCESS (proc);
  
    p->childp = contact;
!   p->plist = Fcopy_sequence (Fplist_get (contact, QCplist));
    
    p->buffer = buffer;
    p->sentinel = sentinel;
***************
*** 3616,3622 ****
  #endif
  
    p->childp = contact;
!   p->private_vars = Fcopy_sequence (ps->private_vars);
  
    p->buffer = buffer;
    p->sentinel = ps->sentinel;
--- 3604,3610 ----
  #endif
  
    p->childp = contact;
!   p->plist = Fcopy_sequence (ps->plist);
  
    p->buffer = buffer;
    p->sentinel = ps->sentinel;
***************
*** 6343,6350 ****
    staticpro (&QCstop);
    QCoptions = intern (":options");
    staticpro (&QCoptions);
!   QCvars = intern (":vars");
!   staticpro (&QCvars);
      
    Qlast_nonmenu_event = intern ("last-nonmenu-event");
    staticpro (&Qlast_nonmenu_event);
--- 6331,6338 ----
    staticpro (&QCstop);
    QCoptions = intern (":options");
    staticpro (&QCoptions);
!   QCplist = intern (":plist");
!   staticpro (&QCplist);
      
    Qlast_nonmenu_event = intern ("last-nonmenu-event");
    staticpro (&Qlast_nonmenu_event);
***************
*** 6388,6395 ****
    defsubr (&Sset_process_query_on_exit_flag);
    defsubr (&Sprocess_query_on_exit_flag);
    defsubr (&Sprocess_contact);
!   defsubr (&Sprocess_variable);
!   defsubr (&Sset_process_variable);
    defsubr (&Slist_processes);
    defsubr (&Sprocess_list);
    defsubr (&Sstart_process);
--- 6376,6383 ----
    defsubr (&Sset_process_query_on_exit_flag);
    defsubr (&Sprocess_query_on_exit_flag);
    defsubr (&Sprocess_contact);
!   defsubr (&Sprocess_plist);
!   defsubr (&Sset_process_plist);
    defsubr (&Slist_processes);
    defsubr (&Sprocess_list);
    defsubr (&Sstart_process);




reply via email to

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