Mercurial > emacs
comparison src/process.c @ 49142:8dca38bc0261
(Fset_process_contact): New function.
(syms_of_process): defsubr it.
(make-network-process): Update doc.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Fri, 10 Jan 2003 22:24:41 +0000 |
parents | 938f153410ae |
children | 8bee0ccd5fd6 |
comparison
equal
deleted
inserted
replaced
49141:c00432dbb3de | 49142:8dca38bc0261 |
---|---|
144 extern Lisp_Object QCfamily; | 144 extern Lisp_Object QCfamily; |
145 /* QCfilter is defined in keyboard.c. */ | 145 /* QCfilter is defined in keyboard.c. */ |
146 extern Lisp_Object QCfilter; | 146 extern Lisp_Object QCfilter; |
147 | 147 |
148 /* a process object is a network connection when its childp field is neither | 148 /* a process object is a network connection when its childp field is neither |
149 Qt nor Qnil but is instead a cons cell (HOSTNAME PORTNUM). */ | 149 Qt nor Qnil but is instead a property list (KEY VAL ...). */ |
150 | 150 |
151 #ifdef HAVE_SOCKETS | 151 #ifdef HAVE_SOCKETS |
152 #define NETCONN_P(p) (GC_CONSP (XPROCESS (p)->childp)) | 152 #define NETCONN_P(p) (GC_CONSP (XPROCESS (p)->childp)) |
153 #define NETCONN1_P(p) (GC_CONSP ((p)->childp)) | 153 #define NETCONN1_P(p) (GC_CONSP ((p)->childp)) |
154 #else | 154 #else |
1033 return contact; | 1033 return contact; |
1034 if (NILP (key)) | 1034 if (NILP (key)) |
1035 return Fcons (Fplist_get (contact, QChost), | 1035 return Fcons (Fplist_get (contact, QChost), |
1036 Fcons (Fplist_get (contact, QCservice), Qnil)); | 1036 Fcons (Fplist_get (contact, QCservice), Qnil)); |
1037 return Fplist_get (contact, key); | 1037 return Fplist_get (contact, key); |
1038 } | |
1039 | |
1040 DEFUN ("set-process-contact", Fset_process_contact, Sset_process_contact, | |
1041 3, 3, 0, | |
1042 doc: /* Change value in PROCESS' contact information list of KEY to VAL. | |
1043 If KEY is already a property on the list, its value is set to VAL, | |
1044 otherwise the new KEY VAL pair is added. Returns VAL. */) | |
1045 (process, key, val) | |
1046 register Lisp_Object process, key, val; | |
1047 { | |
1048 Lisp_Object contact; | |
1049 | |
1050 CHECK_PROCESS (process); | |
1051 | |
1052 if (NETCONN_P (process)) | |
1053 XPROCESS (process)->childp = Fplist_put (XPROCESS (process)->childp, key, val); | |
1054 | |
1055 return val; | |
1038 } | 1056 } |
1039 | 1057 |
1040 #if 0 /* Turned off because we don't currently record this info | 1058 #if 0 /* Turned off because we don't currently record this info |
1041 in the process. Perhaps add it. */ | 1059 in the process. Perhaps add it. */ |
1042 DEFUN ("process-connection", Fprocess_connection, Sprocess_connection, 1, 1, 0, | 1060 DEFUN ("process-connection", Fprocess_connection, Sprocess_connection, 1, 1, 0, |
2586 | 2604 |
2587 Notice that the FILTER and SENTINEL args are never used directly by | 2605 Notice that the FILTER and SENTINEL args are never used directly by |
2588 the server process. Also, the BUFFER argument is not used directly by | 2606 the server process. Also, the BUFFER argument is not used directly by |
2589 the server process, but via the optional :log function, accepted (and | 2607 the server process, but via the optional :log function, accepted (and |
2590 failed) connections may be logged in the server process' buffer. | 2608 failed) connections may be logged in the server process' buffer. |
2609 | |
2610 The original argument list, modified with the actual connection | |
2611 information, is available via the `process-contact' function. | |
2612 Additional arguments may be added via `set-process-contact'. | |
2591 | 2613 |
2592 usage: (make-network-process &rest ARGS) */) | 2614 usage: (make-network-process &rest ARGS) */) |
2593 (nargs, args) | 2615 (nargs, args) |
2594 int nargs; | 2616 int nargs; |
2595 Lisp_Object *args; | 2617 Lisp_Object *args; |
6339 defsubr (&Sset_process_inherit_coding_system_flag); | 6361 defsubr (&Sset_process_inherit_coding_system_flag); |
6340 defsubr (&Sprocess_inherit_coding_system_flag); | 6362 defsubr (&Sprocess_inherit_coding_system_flag); |
6341 defsubr (&Sset_process_query_on_exit_flag); | 6363 defsubr (&Sset_process_query_on_exit_flag); |
6342 defsubr (&Sprocess_query_on_exit_flag); | 6364 defsubr (&Sprocess_query_on_exit_flag); |
6343 defsubr (&Sprocess_contact); | 6365 defsubr (&Sprocess_contact); |
6366 defsubr (&Sset_process_contact); | |
6344 defsubr (&Slist_processes); | 6367 defsubr (&Slist_processes); |
6345 defsubr (&Sprocess_list); | 6368 defsubr (&Sprocess_list); |
6346 defsubr (&Sstart_process); | 6369 defsubr (&Sstart_process); |
6347 #ifdef HAVE_SOCKETS | 6370 #ifdef HAVE_SOCKETS |
6348 defsubr (&Sset_network_process_options); | 6371 defsubr (&Sset_network_process_options); |