[Top][All Lists]
[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: |
Sun, 12 Jan 2003 15:24:07 -0500 |
Index: emacs/src/process.c
diff -c emacs/src/process.c:1.392 emacs/src/process.c:1.393
*** emacs/src/process.c:1.392 Fri Jan 10 17:24:41 2003
--- emacs/src/process.c Sun Jan 12 15:24:06 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;
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, QCvars;
Lisp_Object Qlast_nonmenu_event;
/* QCfamily is declared and initialized in xfaces.c,
QCfilter in keyboard.c. */
***************
*** 1037,1056 ****
return Fplist_get (contact, key);
}
! DEFUN ("set-process-contact", Fset_process_contact, Sset_process_contact,
! 3, 3, 0,
! doc: /* Change value in PROCESS' contact information list of KEY to
VAL.
! If KEY is already a property on the list, its value is set to VAL,
! otherwise the new KEY VAL pair is added. Returns VAL. */)
! (process, key, val)
! register Lisp_Object process, key, val;
{
! Lisp_Object contact;
CHECK_PROCESS (process);
! if (NETCONN_P (process))
! XPROCESS (process)->childp = Fplist_put (XPROCESS (process)->childp, key,
val);
return val;
}
--- 1037,1070 ----
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;
}
***************
*** 1420,1425 ****
--- 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;
***************
*** 2584,2589 ****
--- 2599,2607 ----
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).
Default is a client process.
***************
*** 2601,2606 ****
--- 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
***************
*** 2609,2615 ****
The original argument list, modified with the actual connection
information, is available via the `process-contact' function.
- Additional arguments may be added via `set-process-contact'.
usage: (make-network-process &rest ARGS) */)
(nargs, args)
--- 2629,2634 ----
***************
*** 3164,3169 ****
--- 3183,3190 ----
p = XPROCESS (proc);
p->childp = contact;
+ p->private_vars = Fcopy_sequence (Fplist_get (contact, QCvars));
+
p->buffer = buffer;
p->sentinel = sentinel;
p->filter = filter;
***************
*** 3595,3600 ****
--- 3616,3623 ----
#endif
p->childp = contact;
+ p->private_vars = Fcopy_sequence (ps->private_vars);
+
p->buffer = buffer;
p->sentinel = ps->sentinel;
p->filter = ps->filter;
***************
*** 6320,6325 ****
--- 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);
***************
*** 6363,6369 ****
defsubr (&Sset_process_query_on_exit_flag);
defsubr (&Sprocess_query_on_exit_flag);
defsubr (&Sprocess_contact);
! defsubr (&Sset_process_contact);
defsubr (&Slist_processes);
defsubr (&Sprocess_list);
defsubr (&Sstart_process);
--- 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);
- [Emacs-diffs] Changes to emacs/src/process.c, Kim F. Storm, 2003/01/08
- [Emacs-diffs] Changes to emacs/src/process.c, Kim F. Storm, 2003/01/08
- [Emacs-diffs] Changes to emacs/src/process.c, Kim F. Storm, 2003/01/08
- [Emacs-diffs] Changes to emacs/src/process.c, Kim F. Storm, 2003/01/10
- [Emacs-diffs] Changes to emacs/src/process.c,
Kim F. Storm <=
- [Emacs-diffs] Changes to emacs/src/process.c, Kim F. Storm, 2003/01/14
- [Emacs-diffs] Changes to emacs/src/process.c, Kim F. Storm, 2003/01/14
- [Emacs-diffs] Changes to emacs/src/process.c, Kim F. Storm, 2003/01/16