aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov2012-08-07 11:42:34 +0400
committerDmitry Antipov2012-08-07 11:42:34 +0400
commit4d2b044cdc0cb1edc8150772fbbb24e2e55c4b77 (patch)
treea6de5fdb164bad38a3389f9d7e0703b9ab8a0043 /src
parentd3d50620ed3a8066c15ae3d3701b83371ca5382a (diff)
downloademacs-4d2b044cdc0cb1edc8150772fbbb24e2e55c4b77.tar.gz
emacs-4d2b044cdc0cb1edc8150772fbbb24e2e55c4b77.zip
Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
* process.h (PGET): Remove. (struct Lisp_Process): Do not use INTERNAL_FIELD. * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/print.c4
-rw-r--r--src/process.c287
-rw-r--r--src/process.h47
-rw-r--r--src/sysdep.c12
-rw-r--r--src/w32.c12
-rw-r--r--src/xdisp.c4
7 files changed, 187 insertions, 186 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 0c7d927bf0e..fe7ffd5d14f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,12 @@
12012-08-07 Dmitry Antipov <dmantipov@yandex.ru> 12012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2 2
3 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
4 * process.h (PGET): Remove.
5 (struct Lisp_Process): Do not use INTERNAL_FIELD.
6 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
7
82012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
9
3 Drop WGET and revert read access to Lisp_Objects slots of struct window. 10 Drop WGET and revert read access to Lisp_Objects slots of struct window.
4 * window.h (WGET): Remove. 11 * window.h (WGET): Remove.
5 (struct window): Do not use INTERNAL_FIELD. 12 (struct window): Do not use INTERNAL_FIELD.
diff --git a/src/print.c b/src/print.c
index ffa8a9b1b48..4a8c3fda319 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1697,11 +1697,11 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
1697 if (escapeflag) 1697 if (escapeflag)
1698 { 1698 {
1699 strout ("#<process ", -1, -1, printcharfun); 1699 strout ("#<process ", -1, -1, printcharfun);
1700 print_string (PGET (XPROCESS (obj), name), printcharfun); 1700 print_string (XPROCESS (obj)->name, printcharfun);
1701 PRINTCHAR ('>'); 1701 PRINTCHAR ('>');
1702 } 1702 }
1703 else 1703 else
1704 print_string (PGET (XPROCESS (obj), name), printcharfun); 1704 print_string (XPROCESS (obj)->name, printcharfun);
1705 } 1705 }
1706 else if (BOOL_VECTOR_P (obj)) 1706 else if (BOOL_VECTOR_P (obj))
1707 { 1707 {
diff --git a/src/process.c b/src/process.c
index fbc03493f80..0be624af0d2 100644
--- a/src/process.c
+++ b/src/process.c
@@ -172,10 +172,10 @@ extern Lisp_Object QCfamily;
172/* QCfilter is defined in keyboard.c. */ 172/* QCfilter is defined in keyboard.c. */
173extern Lisp_Object QCfilter; 173extern Lisp_Object QCfilter;
174 174
175#define NETCONN_P(p) (EQ (PGET (XPROCESS (p), type), Qnetwork)) 175#define NETCONN_P(p) (EQ (XPROCESS (p)->type, Qnetwork))
176#define NETCONN1_P(p) (EQ (PGET (p, type), Qnetwork)) 176#define NETCONN1_P(p) (EQ (p->type, Qnetwork))
177#define SERIALCONN_P(p) (EQ (PGET (XPROCESS (p), type), Qserial)) 177#define SERIALCONN_P(p) (EQ (XPROCESS (p)->type, Qserial))
178#define SERIALCONN1_P(p) (EQ (PGET (p, type), Qserial)) 178#define SERIALCONN1_P(p) (EQ (p->type, Qserial))
179 179
180#ifndef HAVE_H_ERRNO 180#ifndef HAVE_H_ERRNO
181extern int h_errno; 181extern int h_errno;
@@ -479,7 +479,7 @@ decode_status (Lisp_Object l, Lisp_Object *symbol, int *code, int *coredump)
479static Lisp_Object 479static Lisp_Object
480status_message (struct Lisp_Process *p) 480status_message (struct Lisp_Process *p)
481{ 481{
482 Lisp_Object status = PGET (p, status); 482 Lisp_Object status = p->status;
483 Lisp_Object symbol; 483 Lisp_Object symbol;
484 int code, coredump; 484 int code, coredump;
485 Lisp_Object string, string2; 485 Lisp_Object string, string2;
@@ -763,9 +763,9 @@ nil, indicating the current buffer's process. */)
763 /* If the process has already signaled, remove it from the list. */ 763 /* If the process has already signaled, remove it from the list. */
764 if (p->raw_status_new) 764 if (p->raw_status_new)
765 update_status (p); 765 update_status (p);
766 symbol = PGET (p, status); 766 symbol = p->status;
767 if (CONSP (PGET (p, status))) 767 if (CONSP (p->status))
768 symbol = XCAR (PGET (p, status)); 768 symbol = XCAR (p->status);
769 if (EQ (symbol, Qsignal) || EQ (symbol, Qexit)) 769 if (EQ (symbol, Qsignal) || EQ (symbol, Qexit))
770 deleted_pid_list 770 deleted_pid_list
771 = Fdelete (make_fixnum_or_float (pid), deleted_pid_list); 771 = Fdelete (make_fixnum_or_float (pid), deleted_pid_list);
@@ -815,14 +815,14 @@ nil, indicating the current buffer's process. */)
815 p = XPROCESS (process); 815 p = XPROCESS (process);
816 if (p->raw_status_new) 816 if (p->raw_status_new)
817 update_status (p); 817 update_status (p);
818 status = PGET (p, status); 818 status = p->status;
819 if (CONSP (status)) 819 if (CONSP (status))
820 status = XCAR (status); 820 status = XCAR (status);
821 if (NETCONN1_P (p) || SERIALCONN1_P (p)) 821 if (NETCONN1_P (p) || SERIALCONN1_P (p))
822 { 822 {
823 if (EQ (status, Qexit)) 823 if (EQ (status, Qexit))
824 status = Qclosed; 824 status = Qclosed;
825 else if (EQ (PGET (p, command), Qt)) 825 else if (EQ (p->command, Qt))
826 status = Qstop; 826 status = Qstop;
827 else if (EQ (status, Qrun)) 827 else if (EQ (status, Qrun))
828 status = Qopen; 828 status = Qopen;
@@ -839,8 +839,8 @@ If PROCESS has not yet exited or died, return 0. */)
839 CHECK_PROCESS (process); 839 CHECK_PROCESS (process);
840 if (XPROCESS (process)->raw_status_new) 840 if (XPROCESS (process)->raw_status_new)
841 update_status (XPROCESS (process)); 841 update_status (XPROCESS (process));
842 if (CONSP (PGET (XPROCESS (process), status))) 842 if (CONSP (XPROCESS (process)->status))
843 return XCAR (XCDR (PGET (XPROCESS (process), status))); 843 return XCAR (XCDR (XPROCESS (process)->status));
844 return make_number (0); 844 return make_number (0);
845} 845}
846 846
@@ -864,7 +864,7 @@ possibly modified to make it unique among process names. */)
864 (register Lisp_Object process) 864 (register Lisp_Object process)
865{ 865{
866 CHECK_PROCESS (process); 866 CHECK_PROCESS (process);
867 return PGET (XPROCESS (process), name); 867 return XPROCESS (process)->name;
868} 868}
869 869
870DEFUN ("process-command", Fprocess_command, Sprocess_command, 1, 1, 0, 870DEFUN ("process-command", Fprocess_command, Sprocess_command, 1, 1, 0,
@@ -876,7 +876,7 @@ For a network or serial process, this is nil (process is running) or t
876 (register Lisp_Object process) 876 (register Lisp_Object process)
877{ 877{
878 CHECK_PROCESS (process); 878 CHECK_PROCESS (process);
879 return PGET (XPROCESS (process), command); 879 return XPROCESS (process)->command;
880} 880}
881 881
882DEFUN ("process-tty-name", Fprocess_tty_name, Sprocess_tty_name, 1, 1, 0, 882DEFUN ("process-tty-name", Fprocess_tty_name, Sprocess_tty_name, 1, 1, 0,
@@ -886,7 +886,7 @@ not the name of the pty that Emacs uses to talk with that terminal. */)
886 (register Lisp_Object process) 886 (register Lisp_Object process)
887{ 887{
888 CHECK_PROCESS (process); 888 CHECK_PROCESS (process);
889 return PGET (XPROCESS (process), tty_name); 889 return XPROCESS (process)->tty_name;
890} 890}
891 891
892DEFUN ("set-process-buffer", Fset_process_buffer, Sset_process_buffer, 892DEFUN ("set-process-buffer", Fset_process_buffer, Sset_process_buffer,
@@ -903,7 +903,7 @@ Return BUFFER. */)
903 p = XPROCESS (process); 903 p = XPROCESS (process);
904 PSET (p, buffer, buffer); 904 PSET (p, buffer, buffer);
905 if (NETCONN1_P (p) || SERIALCONN1_P (p)) 905 if (NETCONN1_P (p) || SERIALCONN1_P (p))
906 PSET (p, childp, Fplist_put (PGET (p, childp), QCbuffer, buffer)); 906 PSET (p, childp, Fplist_put (p->childp, QCbuffer, buffer));
907 setup_process_coding_systems (process); 907 setup_process_coding_systems (process);
908 return buffer; 908 return buffer;
909} 909}
@@ -915,7 +915,7 @@ Output from PROCESS is inserted in this buffer unless PROCESS has a filter. */)
915 (register Lisp_Object process) 915 (register Lisp_Object process)
916{ 916{
917 CHECK_PROCESS (process); 917 CHECK_PROCESS (process);
918 return PGET (XPROCESS (process), buffer); 918 return XPROCESS (process)->buffer;
919} 919}
920 920
921DEFUN ("process-mark", Fprocess_mark, Sprocess_mark, 921DEFUN ("process-mark", Fprocess_mark, Sprocess_mark,
@@ -924,7 +924,7 @@ DEFUN ("process-mark", Fprocess_mark, Sprocess_mark,
924 (register Lisp_Object process) 924 (register Lisp_Object process)
925{ 925{
926 CHECK_PROCESS (process); 926 CHECK_PROCESS (process);
927 return PGET (XPROCESS (process), mark); 927 return XPROCESS (process)->mark;
928} 928}
929 929
930DEFUN ("set-process-filter", Fset_process_filter, Sset_process_filter, 930DEFUN ("set-process-filter", Fset_process_filter, Sset_process_filter,
@@ -960,14 +960,14 @@ The string argument is normally a multibyte string, except:
960 960
961 if (p->infd >= 0) 961 if (p->infd >= 0)
962 { 962 {
963 if (EQ (filter, Qt) && !EQ (PGET (p, status), Qlisten)) 963 if (EQ (filter, Qt) && !EQ (p->status, Qlisten))
964 { 964 {
965 FD_CLR (p->infd, &input_wait_mask); 965 FD_CLR (p->infd, &input_wait_mask);
966 FD_CLR (p->infd, &non_keyboard_wait_mask); 966 FD_CLR (p->infd, &non_keyboard_wait_mask);
967 } 967 }
968 else if (EQ (PGET (p, filter), Qt) 968 else if (EQ (p->filter, Qt)
969 /* Network or serial process not stopped: */ 969 /* Network or serial process not stopped: */
970 && !EQ (PGET (p, command), Qt)) 970 && !EQ (p->command, Qt))
971 { 971 {
972 FD_SET (p->infd, &input_wait_mask); 972 FD_SET (p->infd, &input_wait_mask);
973 FD_SET (p->infd, &non_keyboard_wait_mask); 973 FD_SET (p->infd, &non_keyboard_wait_mask);
@@ -976,7 +976,7 @@ The string argument is normally a multibyte string, except:
976 976
977 PSET (p, filter, filter); 977 PSET (p, filter, filter);
978 if (NETCONN1_P (p) || SERIALCONN1_P (p)) 978 if (NETCONN1_P (p) || SERIALCONN1_P (p))
979 PSET (p, childp, Fplist_put (PGET (p, childp), QCfilter, filter)); 979 PSET (p, childp, Fplist_put (p->childp, QCfilter, filter));
980 setup_process_coding_systems (process); 980 setup_process_coding_systems (process);
981 return filter; 981 return filter;
982} 982}
@@ -988,7 +988,7 @@ See `set-process-filter' for more info on filter functions. */)
988 (register Lisp_Object process) 988 (register Lisp_Object process)
989{ 989{
990 CHECK_PROCESS (process); 990 CHECK_PROCESS (process);
991 return PGET (XPROCESS (process), filter); 991 return XPROCESS (process)->filter;
992} 992}
993 993
994DEFUN ("set-process-sentinel", Fset_process_sentinel, Sset_process_sentinel, 994DEFUN ("set-process-sentinel", Fset_process_sentinel, Sset_process_sentinel,
@@ -1005,7 +1005,7 @@ It gets two arguments: the process, and a string describing the change. */)
1005 1005
1006 PSET (p, sentinel, sentinel); 1006 PSET (p, sentinel, sentinel);
1007 if (NETCONN1_P (p) || SERIALCONN1_P (p)) 1007 if (NETCONN1_P (p) || SERIALCONN1_P (p))
1008 PSET (p, childp, Fplist_put (PGET (p, childp), QCsentinel, sentinel)); 1008 PSET (p, childp, Fplist_put (p->childp, QCsentinel, sentinel));
1009 return sentinel; 1009 return sentinel;
1010} 1010}
1011 1011
@@ -1016,7 +1016,7 @@ See `set-process-sentinel' for more info on sentinels. */)
1016 (register Lisp_Object process) 1016 (register Lisp_Object process)
1017{ 1017{
1018 CHECK_PROCESS (process); 1018 CHECK_PROCESS (process);
1019 return PGET (XPROCESS (process), sentinel); 1019 return XPROCESS (process)->sentinel;
1020} 1020}
1021 1021
1022DEFUN ("set-process-window-size", Fset_process_window_size, 1022DEFUN ("set-process-window-size", Fset_process_window_size,
@@ -1101,7 +1101,7 @@ list of keywords. */)
1101 Lisp_Object contact; 1101 Lisp_Object contact;
1102 1102
1103 CHECK_PROCESS (process); 1103 CHECK_PROCESS (process);
1104 contact = PGET (XPROCESS (process), childp); 1104 contact = XPROCESS (process)->childp;
1105 1105
1106#ifdef DATAGRAM_SOCKETS 1106#ifdef DATAGRAM_SOCKETS
1107 if (DATAGRAM_CONN_P (process) 1107 if (DATAGRAM_CONN_P (process)
@@ -1127,7 +1127,7 @@ DEFUN ("process-plist", Fprocess_plist, Sprocess_plist,
1127 (register Lisp_Object process) 1127 (register Lisp_Object process)
1128{ 1128{
1129 CHECK_PROCESS (process); 1129 CHECK_PROCESS (process);
1130 return PGET (XPROCESS (process), plist); 1130 return XPROCESS (process)->plist;
1131} 1131}
1132 1132
1133DEFUN ("set-process-plist", Fset_process_plist, Sset_process_plist, 1133DEFUN ("set-process-plist", Fset_process_plist, Sset_process_plist,
@@ -1150,7 +1150,7 @@ The value is nil for a pipe, t or `pty' for a pty, or `stream' for
1150a socket connection. */) 1150a socket connection. */)
1151 (Lisp_Object process) 1151 (Lisp_Object process)
1152{ 1152{
1153 return PGET (XPROCESS (process), type); 1153 return XPROCESS (process)->type;
1154} 1154}
1155#endif 1155#endif
1156 1156
@@ -1163,7 +1163,7 @@ nil, indicating the current buffer's process. */)
1163{ 1163{
1164 Lisp_Object proc; 1164 Lisp_Object proc;
1165 proc = get_process (process); 1165 proc = get_process (process);
1166 return PGET (XPROCESS (proc), type); 1166 return XPROCESS (proc)->type;
1167} 1167}
1168 1168
1169DEFUN ("format-network-address", Fformat_network_address, Sformat_network_address, 1169DEFUN ("format-network-address", Fformat_network_address, Sformat_network_address,
@@ -1346,7 +1346,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */)
1346 1346
1347 /* Make the process marker point into the process buffer (if any). */ 1347 /* Make the process marker point into the process buffer (if any). */
1348 if (BUFFERP (buffer)) 1348 if (BUFFERP (buffer))
1349 set_marker_both (PGET (XPROCESS (proc), mark), buffer, 1349 set_marker_both (XPROCESS (proc)->mark, buffer,
1350 BUF_ZV (XBUFFER (buffer)), 1350 BUF_ZV (XBUFFER (buffer)),
1351 BUF_ZV_BYTE (XBUFFER (buffer))); 1351 BUF_ZV_BYTE (XBUFFER (buffer)));
1352 1352
@@ -1464,7 +1464,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */)
1464 { 1464 {
1465 if (NILP (arg_encoding)) 1465 if (NILP (arg_encoding))
1466 arg_encoding = (complement_process_encoding_system 1466 arg_encoding = (complement_process_encoding_system
1467 (PGET (XPROCESS (proc), encode_coding_system))); 1467 (XPROCESS (proc)->encode_coding_system));
1468 XSETCAR (tem, 1468 XSETCAR (tem,
1469 code_convert_string_norecord 1469 code_convert_string_norecord
1470 (XCAR (tem), arg_encoding, 1)); 1470 (XCAR (tem), arg_encoding, 1));
@@ -2368,7 +2368,7 @@ OPTION is not a supported option, return nil instead; otherwise return t. */)
2368 2368
2369 if (set_socket_option (s, option, value)) 2369 if (set_socket_option (s, option, value))
2370 { 2370 {
2371 PSET (p, childp, Fplist_put (PGET (p, childp), option, value)); 2371 PSET (p, childp, Fplist_put (p->childp, option, value));
2372 return Qt; 2372 return Qt;
2373 } 2373 }
2374 2374
@@ -2457,10 +2457,10 @@ usage: (serial-process-configure &rest ARGS) */)
2457 proc = Fplist_get (contact, QCport); 2457 proc = Fplist_get (contact, QCport);
2458 proc = get_process (proc); 2458 proc = get_process (proc);
2459 p = XPROCESS (proc); 2459 p = XPROCESS (proc);
2460 if (!EQ (PGET (p, type), Qserial)) 2460 if (!EQ (p->type, Qserial))
2461 error ("Not a serial process"); 2461 error ("Not a serial process");
2462 2462
2463 if (NILP (Fplist_get (PGET (p, childp), QCspeed))) 2463 if (NILP (Fplist_get (p->childp, QCspeed)))
2464 { 2464 {
2465 UNGCPRO; 2465 UNGCPRO;
2466 return Qnil; 2466 return Qnil;
@@ -2615,7 +2615,7 @@ usage: (make-serial-process &rest ARGS) */)
2615 PSET (p, command, Qt); 2615 PSET (p, command, Qt);
2616 p->pty_flag = 0; 2616 p->pty_flag = 0;
2617 2617
2618 if (!EQ (PGET (p, command), Qt)) 2618 if (!EQ (p->command, Qt))
2619 { 2619 {
2620 FD_SET (fd, &input_wait_mask); 2620 FD_SET (fd, &input_wait_mask);
2621 FD_SET (fd, &non_keyboard_wait_mask); 2621 FD_SET (fd, &non_keyboard_wait_mask);
@@ -2623,7 +2623,7 @@ usage: (make-serial-process &rest ARGS) */)
2623 2623
2624 if (BUFFERP (buffer)) 2624 if (BUFFERP (buffer))
2625 { 2625 {
2626 set_marker_both (PGET (p, mark), buffer, 2626 set_marker_both (p->mark, buffer,
2627 BUF_ZV (XBUFFER (buffer)), 2627 BUF_ZV (XBUFFER (buffer)),
2628 BUF_ZV_BYTE (XBUFFER (buffer))); 2628 BUF_ZV_BYTE (XBUFFER (buffer)));
2629 } 2629 }
@@ -3420,7 +3420,7 @@ usage: (make-network-process &rest ARGS) */)
3420 3420
3421 /* Make the process marker point into the process buffer (if any). */ 3421 /* Make the process marker point into the process buffer (if any). */
3422 if (BUFFERP (buffer)) 3422 if (BUFFERP (buffer))
3423 set_marker_both (PGET (p, mark), buffer, 3423 set_marker_both (p->mark, buffer,
3424 BUF_ZV (XBUFFER (buffer)), 3424 BUF_ZV (XBUFFER (buffer)),
3425 BUF_ZV_BYTE (XBUFFER (buffer))); 3425 BUF_ZV_BYTE (XBUFFER (buffer)));
3426 3426
@@ -3442,8 +3442,8 @@ usage: (make-network-process &rest ARGS) */)
3442#endif 3442#endif
3443 /* A server may have a client filter setting of Qt, but it must 3443 /* A server may have a client filter setting of Qt, but it must
3444 still listen for incoming connects unless it is stopped. */ 3444 still listen for incoming connects unless it is stopped. */
3445 if ((!EQ (PGET (p, filter), Qt) && !EQ (PGET (p, command), Qt)) 3445 if ((!EQ (p->filter, Qt) && !EQ (p->command, Qt))
3446 || (EQ (PGET (p, status), Qlisten) && NILP (PGET (p, command)))) 3446 || (EQ (p->status, Qlisten) && NILP (p->command)))
3447 { 3447 {
3448 FD_SET (inch, &input_wait_mask); 3448 FD_SET (inch, &input_wait_mask);
3449 FD_SET (inch, &non_keyboard_wait_mask); 3449 FD_SET (inch, &non_keyboard_wait_mask);
@@ -4030,8 +4030,8 @@ server_accept_connection (Lisp_Object server, int channel)
4030 return; 4030 return;
4031#endif 4031#endif
4032 4032
4033 if (!NILP (PGET (ps, log))) 4033 if (!NILP (ps->log))
4034 call3 (PGET (ps, log), server, Qnil, 4034 call3 (ps->log, server, Qnil,
4035 concat3 (build_string ("accept failed with code"), 4035 concat3 (build_string ("accept failed with code"),
4036 Fnumber_to_string (make_number (code)), 4036 Fnumber_to_string (make_number (code)),
4037 build_string ("\n"))); 4037 build_string ("\n")));
@@ -4101,15 +4101,15 @@ server_accept_connection (Lisp_Object server, int channel)
4101 process name of the server process concatenated with the caller 4101 process name of the server process concatenated with the caller
4102 identification. */ 4102 identification. */
4103 4103
4104 if (!NILP (PGET (ps, filter)) && !EQ (PGET (ps, filter), Qt)) 4104 if (!NILP (ps->filter) && !EQ (ps->filter, Qt))
4105 buffer = Qnil; 4105 buffer = Qnil;
4106 else 4106 else
4107 { 4107 {
4108 buffer = PGET (ps, buffer); 4108 buffer = ps->buffer;
4109 if (!NILP (buffer)) 4109 if (!NILP (buffer))
4110 buffer = Fbuffer_name (buffer); 4110 buffer = Fbuffer_name (buffer);
4111 else 4111 else
4112 buffer = PGET (ps, name); 4112 buffer = ps->name;
4113 if (!NILP (buffer)) 4113 if (!NILP (buffer))
4114 { 4114 {
4115 buffer = concat2 (buffer, caller); 4115 buffer = concat2 (buffer, caller);
@@ -4120,7 +4120,7 @@ server_accept_connection (Lisp_Object server, int channel)
4120 /* Generate a unique name for the new server process. Combine the 4120 /* Generate a unique name for the new server process. Combine the
4121 server process name with the caller identification. */ 4121 server process name with the caller identification. */
4122 4122
4123 name = concat2 (PGET (ps, name), caller); 4123 name = concat2 (ps->name, caller);
4124 proc = make_process (name); 4124 proc = make_process (name);
4125 4125
4126 chan_process[s] = proc; 4126 chan_process[s] = proc;
@@ -4136,7 +4136,7 @@ server_accept_connection (Lisp_Object server, int channel)
4136 p = XPROCESS (proc); 4136 p = XPROCESS (proc);
4137 4137
4138 /* Build new contact information for this setup. */ 4138 /* Build new contact information for this setup. */
4139 contact = Fcopy_sequence (PGET (ps, childp)); 4139 contact = Fcopy_sequence (ps->childp);
4140 contact = Fplist_put (contact, QCserver, Qnil); 4140 contact = Fplist_put (contact, QCserver, Qnil);
4141 contact = Fplist_put (contact, QChost, host); 4141 contact = Fplist_put (contact, QChost, host);
4142 if (!NILP (service)) 4142 if (!NILP (service))
@@ -4151,12 +4151,12 @@ server_accept_connection (Lisp_Object server, int channel)
4151#endif 4151#endif
4152 4152
4153 PSET (p, childp, contact); 4153 PSET (p, childp, contact);
4154 PSET (p, plist, Fcopy_sequence (PGET (ps, plist))); 4154 PSET (p, plist, Fcopy_sequence (ps->plist));
4155 PSET (p, type, Qnetwork); 4155 PSET (p, type, Qnetwork);
4156 4156
4157 PSET (p, buffer, buffer); 4157 PSET (p, buffer, buffer);
4158 PSET (p, sentinel, PGET (ps, sentinel)); 4158 PSET (p, sentinel, ps->sentinel);
4159 PSET (p, filter, PGET (ps, filter)); 4159 PSET (p, filter, ps->filter);
4160 PSET (p, command, Qnil); 4160 PSET (p, command, Qnil);
4161 p->pid = 0; 4161 p->pid = 0;
4162 p->infd = s; 4162 p->infd = s;
@@ -4164,7 +4164,7 @@ server_accept_connection (Lisp_Object server, int channel)
4164 PSET (p, status, Qrun); 4164 PSET (p, status, Qrun);
4165 4165
4166 /* Client processes for accepted connections are not stopped initially. */ 4166 /* Client processes for accepted connections are not stopped initially. */
4167 if (!EQ (PGET (p, filter), Qt)) 4167 if (!EQ (p->filter, Qt))
4168 { 4168 {
4169 FD_SET (s, &input_wait_mask); 4169 FD_SET (s, &input_wait_mask);
4170 FD_SET (s, &non_keyboard_wait_mask); 4170 FD_SET (s, &non_keyboard_wait_mask);
@@ -4178,8 +4178,8 @@ server_accept_connection (Lisp_Object server, int channel)
4178 of the new process should reflect the settings at the time the 4178 of the new process should reflect the settings at the time the
4179 server socket was opened; not the current settings. */ 4179 server socket was opened; not the current settings. */
4180 4180
4181 PSET (p, decode_coding_system, PGET (ps, decode_coding_system)); 4181 PSET (p, decode_coding_system, ps->decode_coding_system);
4182 PSET (p, encode_coding_system, PGET (ps, encode_coding_system)); 4182 PSET (p, encode_coding_system, ps->encode_coding_system);
4183 setup_process_coding_systems (proc); 4183 setup_process_coding_systems (proc);
4184 4184
4185 PSET (p, decoding_buf, empty_unibyte_string); 4185 PSET (p, decoding_buf, empty_unibyte_string);
@@ -4189,13 +4189,13 @@ server_accept_connection (Lisp_Object server, int channel)
4189 p->inherit_coding_system_flag 4189 p->inherit_coding_system_flag
4190 = (NILP (buffer) ? 0 : ps->inherit_coding_system_flag); 4190 = (NILP (buffer) ? 0 : ps->inherit_coding_system_flag);
4191 4191
4192 if (!NILP (PGET (ps, log))) 4192 if (!NILP (ps->log))
4193 call3 (PGET (ps, log), server, proc, 4193 call3 (ps->log, server, proc,
4194 concat3 (build_string ("accept from "), 4194 concat3 (build_string ("accept from "),
4195 (STRINGP (host) ? host : build_string ("-")), 4195 (STRINGP (host) ? host : build_string ("-")),
4196 build_string ("\n"))); 4196 build_string ("\n")));
4197 4197
4198 if (!NILP (PGET (p, sentinel))) 4198 if (!NILP (p->sentinel))
4199 exec_sentinel (proc, 4199 exec_sentinel (proc,
4200 concat3 (build_string ("open from "), 4200 concat3 (build_string ("open from "),
4201 (STRINGP (host) ? host : build_string ("-")), 4201 (STRINGP (host) ? host : build_string ("-")),
@@ -4286,8 +4286,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
4286 FD_ZERO (&Writeok); 4286 FD_ZERO (&Writeok);
4287 4287
4288 if (time_limit == 0 && nsecs == 0 && wait_proc && !NILP (Vinhibit_quit) 4288 if (time_limit == 0 && nsecs == 0 && wait_proc && !NILP (Vinhibit_quit)
4289 && !(CONSP (PGET (wait_proc, status)) 4289 && !(CONSP (wait_proc->status)
4290 && EQ (XCAR (PGET (wait_proc, status)), Qexit))) 4290 && EQ (XCAR (wait_proc->status), Qexit)))
4291 message ("Blocking call to accept-process-output with quit inhibited!!"); 4291 message ("Blocking call to accept-process-output with quit inhibited!!");
4292 4292
4293 /* If wait_proc is a process to watch, set wait_channel accordingly. */ 4293 /* If wait_proc is a process to watch, set wait_channel accordingly. */
@@ -4460,8 +4460,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
4460 if (wait_proc && wait_proc->raw_status_new) 4460 if (wait_proc && wait_proc->raw_status_new)
4461 update_status (wait_proc); 4461 update_status (wait_proc);
4462 if (wait_proc 4462 if (wait_proc
4463 && ! EQ (PGET (wait_proc, status), Qrun) 4463 && ! EQ (wait_proc->status, Qrun)
4464 && ! EQ (PGET (wait_proc, status), Qconnect)) 4464 && ! EQ (wait_proc->status, Qconnect))
4465 { 4465 {
4466 int nread, total_nread = 0; 4466 int nread, total_nread = 0;
4467 4467
@@ -4820,7 +4820,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
4820 continue; 4820 continue;
4821 4821
4822 /* If this is a server stream socket, accept connection. */ 4822 /* If this is a server stream socket, accept connection. */
4823 if (EQ (PGET (XPROCESS (proc), status), Qlisten)) 4823 if (EQ (XPROCESS (proc)->status, Qlisten))
4824 { 4824 {
4825 server_accept_connection (proc, channel); 4825 server_accept_connection (proc, channel);
4826 continue; 4826 continue;
@@ -4908,7 +4908,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
4908 deactivate_process (proc); 4908 deactivate_process (proc);
4909 if (XPROCESS (proc)->raw_status_new) 4909 if (XPROCESS (proc)->raw_status_new)
4910 update_status (XPROCESS (proc)); 4910 update_status (XPROCESS (proc));
4911 if (EQ (PGET (XPROCESS (proc), status), Qrun)) 4911 if (EQ (XPROCESS (proc)->status, Qrun))
4912 PSET (XPROCESS (proc), status, 4912 PSET (XPROCESS (proc), status,
4913 Fcons (Qexit, Fcons (make_number (256), Qnil))); 4913 Fcons (Qexit, Fcons (make_number (256), Qnil)));
4914 } 4914 }
@@ -4969,7 +4969,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
4969 status_notify to do it later, it will read input 4969 status_notify to do it later, it will read input
4970 from the process before calling the sentinel. */ 4970 from the process before calling the sentinel. */
4971 exec_sentinel (proc, build_string ("open\n")); 4971 exec_sentinel (proc, build_string ("open\n"));
4972 if (!EQ (PGET (p, filter), Qt) && !EQ (PGET (p, command), Qt)) 4972 if (!EQ (p->filter, Qt) && !EQ (p->command, Qt))
4973 { 4973 {
4974 FD_SET (p->infd, &input_wait_mask); 4974 FD_SET (p->infd, &input_wait_mask);
4975 FD_SET (p->infd, &non_keyboard_wait_mask); 4975 FD_SET (p->infd, &non_keyboard_wait_mask);
@@ -5041,7 +5041,7 @@ read_process_output (Lisp_Object proc, register int channel)
5041 chars = alloca (carryover + readmax); 5041 chars = alloca (carryover + readmax);
5042 if (carryover) 5042 if (carryover)
5043 /* See the comment above. */ 5043 /* See the comment above. */
5044 memcpy (chars, SDATA (PGET (p, decoding_buf)), carryover); 5044 memcpy (chars, SDATA (p->decoding_buf), carryover);
5045 5045
5046#ifdef DATAGRAM_SOCKETS 5046#ifdef DATAGRAM_SOCKETS
5047 /* We have a working select, so proc_buffered_char is always -1. */ 5047 /* We have a working select, so proc_buffered_char is always -1. */
@@ -5120,7 +5120,7 @@ read_process_output (Lisp_Object proc, register int channel)
5120 record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ()); 5120 record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ());
5121 5121
5122 /* Read and dispose of the process output. */ 5122 /* Read and dispose of the process output. */
5123 outstream = PGET (p, filter); 5123 outstream = p->filter;
5124 if (!NILP (outstream)) 5124 if (!NILP (outstream))
5125 { 5125 {
5126 Lisp_Object text; 5126 Lisp_Object text;
@@ -5162,7 +5162,7 @@ read_process_output (Lisp_Object proc, register int channel)
5162 text = coding->dst_object; 5162 text = coding->dst_object;
5163 Vlast_coding_system_used = CODING_ID_NAME (coding->id); 5163 Vlast_coding_system_used = CODING_ID_NAME (coding->id);
5164 /* A new coding system might be found. */ 5164 /* A new coding system might be found. */
5165 if (!EQ (PGET (p, decode_coding_system), Vlast_coding_system_used)) 5165 if (!EQ (p->decode_coding_system, Vlast_coding_system_used))
5166 { 5166 {
5167 PSET (p, decode_coding_system, Vlast_coding_system_used); 5167 PSET (p, decode_coding_system, Vlast_coding_system_used);
5168 5168
@@ -5177,21 +5177,21 @@ read_process_output (Lisp_Object proc, register int channel)
5177 proc_encode_coding_system[p->outfd] surely points to a 5177 proc_encode_coding_system[p->outfd] surely points to a
5178 valid memory because p->outfd will be changed once EOF is 5178 valid memory because p->outfd will be changed once EOF is
5179 sent to the process. */ 5179 sent to the process. */
5180 if (NILP (PGET (p, encode_coding_system)) 5180 if (NILP (p->encode_coding_system)
5181 && proc_encode_coding_system[p->outfd]) 5181 && proc_encode_coding_system[p->outfd])
5182 { 5182 {
5183 PSET (p, encode_coding_system, 5183 PSET (p, encode_coding_system,
5184 coding_inherit_eol_type (Vlast_coding_system_used, Qnil)); 5184 coding_inherit_eol_type (Vlast_coding_system_used, Qnil));
5185 setup_coding_system (PGET (p, encode_coding_system), 5185 setup_coding_system (p->encode_coding_system,
5186 proc_encode_coding_system[p->outfd]); 5186 proc_encode_coding_system[p->outfd]);
5187 } 5187 }
5188 } 5188 }
5189 5189
5190 if (coding->carryover_bytes > 0) 5190 if (coding->carryover_bytes > 0)
5191 { 5191 {
5192 if (SCHARS (PGET (p, decoding_buf)) < coding->carryover_bytes) 5192 if (SCHARS (p->decoding_buf) < coding->carryover_bytes)
5193 PSET (p, decoding_buf, make_uninit_string (coding->carryover_bytes)); 5193 PSET (p, decoding_buf, make_uninit_string (coding->carryover_bytes));
5194 memcpy (SDATA (PGET (p, decoding_buf)), coding->carryover, 5194 memcpy (SDATA (p->decoding_buf), coding->carryover,
5195 coding->carryover_bytes); 5195 coding->carryover_bytes);
5196 p->decoding_carryover = coding->carryover_bytes; 5196 p->decoding_carryover = coding->carryover_bytes;
5197 } 5197 }
@@ -5227,7 +5227,7 @@ read_process_output (Lisp_Object proc, register int channel)
5227 } 5227 }
5228 5228
5229 /* If no filter, write into buffer if it isn't dead. */ 5229 /* If no filter, write into buffer if it isn't dead. */
5230 else if (!NILP (PGET (p, buffer)) && !NILP (BVAR (XBUFFER (PGET (p, buffer)), name))) 5230 else if (!NILP (p->buffer) && !NILP (BVAR (XBUFFER (p->buffer), name)))
5231 { 5231 {
5232 Lisp_Object old_read_only; 5232 Lisp_Object old_read_only;
5233 ptrdiff_t old_begv, old_zv; 5233 ptrdiff_t old_begv, old_zv;
@@ -5237,7 +5237,7 @@ read_process_output (Lisp_Object proc, register int channel)
5237 Lisp_Object text; 5237 Lisp_Object text;
5238 struct buffer *b; 5238 struct buffer *b;
5239 5239
5240 Fset_buffer (PGET (p, buffer)); 5240 Fset_buffer (p->buffer);
5241 opoint = PT; 5241 opoint = PT;
5242 opoint_byte = PT_BYTE; 5242 opoint_byte = PT_BYTE;
5243 old_read_only = BVAR (current_buffer, read_only); 5243 old_read_only = BVAR (current_buffer, read_only);
@@ -5251,11 +5251,11 @@ read_process_output (Lisp_Object proc, register int channel)
5251 /* Insert new output into buffer 5251 /* Insert new output into buffer
5252 at the current end-of-output marker, 5252 at the current end-of-output marker,
5253 thus preserving logical ordering of input and output. */ 5253 thus preserving logical ordering of input and output. */
5254 if (XMARKER (PGET (p, mark))->buffer) 5254 if (XMARKER (p->mark)->buffer)
5255 SET_PT_BOTH (clip_to_bounds (BEGV, 5255 SET_PT_BOTH (clip_to_bounds (BEGV,
5256 marker_position (PGET (p, mark)), ZV), 5256 marker_position (p->mark), ZV),
5257 clip_to_bounds (BEGV_BYTE, 5257 clip_to_bounds (BEGV_BYTE,
5258 marker_byte_position (PGET (p, mark)), 5258 marker_byte_position (p->mark),
5259 ZV_BYTE)); 5259 ZV_BYTE));
5260 else 5260 else
5261 SET_PT_BOTH (ZV, ZV_BYTE); 5261 SET_PT_BOTH (ZV, ZV_BYTE);
@@ -5272,23 +5272,23 @@ read_process_output (Lisp_Object proc, register int channel)
5272 Vlast_coding_system_used = CODING_ID_NAME (coding->id); 5272 Vlast_coding_system_used = CODING_ID_NAME (coding->id);
5273 /* A new coding system might be found. See the comment in the 5273 /* A new coding system might be found. See the comment in the
5274 similar code in the previous `if' block. */ 5274 similar code in the previous `if' block. */
5275 if (!EQ (PGET (p, decode_coding_system), Vlast_coding_system_used)) 5275 if (!EQ (p->decode_coding_system, Vlast_coding_system_used))
5276 { 5276 {
5277 PSET (p, decode_coding_system, Vlast_coding_system_used); 5277 PSET (p, decode_coding_system, Vlast_coding_system_used);
5278 if (NILP (PGET (p, encode_coding_system)) 5278 if (NILP (p->encode_coding_system)
5279 && proc_encode_coding_system[p->outfd]) 5279 && proc_encode_coding_system[p->outfd])
5280 { 5280 {
5281 PSET (p, encode_coding_system, 5281 PSET (p, encode_coding_system,
5282 coding_inherit_eol_type (Vlast_coding_system_used, Qnil)); 5282 coding_inherit_eol_type (Vlast_coding_system_used, Qnil));
5283 setup_coding_system (PGET (p, encode_coding_system), 5283 setup_coding_system (p->encode_coding_system,
5284 proc_encode_coding_system[p->outfd]); 5284 proc_encode_coding_system[p->outfd]);
5285 } 5285 }
5286 } 5286 }
5287 if (coding->carryover_bytes > 0) 5287 if (coding->carryover_bytes > 0)
5288 { 5288 {
5289 if (SCHARS (PGET (p, decoding_buf)) < coding->carryover_bytes) 5289 if (SCHARS (p->decoding_buf) < coding->carryover_bytes)
5290 PSET (p, decoding_buf, make_uninit_string (coding->carryover_bytes)); 5290 PSET (p, decoding_buf, make_uninit_string (coding->carryover_bytes));
5291 memcpy (SDATA (PGET (p, decoding_buf)), coding->carryover, 5291 memcpy (SDATA (p->decoding_buf), coding->carryover,
5292 coding->carryover_bytes); 5292 coding->carryover_bytes);
5293 p->decoding_carryover = coding->carryover_bytes; 5293 p->decoding_carryover = coding->carryover_bytes;
5294 } 5294 }
@@ -5306,11 +5306,11 @@ read_process_output (Lisp_Object proc, register int channel)
5306 /* Make sure the process marker's position is valid when the 5306 /* Make sure the process marker's position is valid when the
5307 process buffer is changed in the signal_after_change above. 5307 process buffer is changed in the signal_after_change above.
5308 W3 is known to do that. */ 5308 W3 is known to do that. */
5309 if (BUFFERP (PGET (p, buffer)) 5309 if (BUFFERP (p->buffer)
5310 && (b = XBUFFER (PGET (p, buffer)), b != current_buffer)) 5310 && (b = XBUFFER (p->buffer), b != current_buffer))
5311 set_marker_both (PGET (p, mark), PGET (p, buffer), BUF_PT (b), BUF_PT_BYTE (b)); 5311 set_marker_both (p->mark, p->buffer, BUF_PT (b), BUF_PT_BYTE (b));
5312 else 5312 else
5313 set_marker_both (PGET (p, mark), PGET (p, buffer), PT, PT_BYTE); 5313 set_marker_both (p->mark, p->buffer, PT, PT_BYTE);
5314 5314
5315 update_mode_lines++; 5315 update_mode_lines++;
5316 5316
@@ -5404,9 +5404,9 @@ write_queue_push (struct Lisp_Process *p, Lisp_Object input_obj,
5404 entry = Fcons (obj, Fcons (make_number (offset), make_number (len))); 5404 entry = Fcons (obj, Fcons (make_number (offset), make_number (len)));
5405 5405
5406 if (front) 5406 if (front)
5407 PSET (p, write_queue, Fcons (entry, PGET (p, write_queue))); 5407 PSET (p, write_queue, Fcons (entry, p->write_queue));
5408 else 5408 else
5409 PSET (p, write_queue, nconc2 (PGET (p, write_queue), Fcons (entry, Qnil))); 5409 PSET (p, write_queue, nconc2 (p->write_queue, Fcons (entry, Qnil)));
5410} 5410}
5411 5411
5412/* Remove the first element in the write_queue of process P, put its 5412/* Remove the first element in the write_queue of process P, put its
@@ -5420,11 +5420,11 @@ write_queue_pop (struct Lisp_Process *p, Lisp_Object *obj,
5420 Lisp_Object entry, offset_length; 5420 Lisp_Object entry, offset_length;
5421 ptrdiff_t offset; 5421 ptrdiff_t offset;
5422 5422
5423 if (NILP (PGET (p, write_queue))) 5423 if (NILP (p->write_queue))
5424 return 0; 5424 return 0;
5425 5425
5426 entry = XCAR (PGET (p, write_queue)); 5426 entry = XCAR (p->write_queue);
5427 PSET (p, write_queue, XCDR (PGET (p, write_queue))); 5427 PSET (p, write_queue, XCDR (p->write_queue));
5428 5428
5429 *obj = XCAR (entry); 5429 *obj = XCAR (entry);
5430 offset_length = XCDR (entry); 5430 offset_length = XCDR (entry);
@@ -5458,10 +5458,10 @@ send_process (volatile Lisp_Object proc, const char *volatile buf,
5458 5458
5459 if (p->raw_status_new) 5459 if (p->raw_status_new)
5460 update_status (p); 5460 update_status (p);
5461 if (! EQ (PGET (p, status), Qrun)) 5461 if (! EQ (p->status, Qrun))
5462 error ("Process %s not running", SDATA (PGET (p, name))); 5462 error ("Process %s not running", SDATA (p->name));
5463 if (p->outfd < 0) 5463 if (p->outfd < 0)
5464 error ("Output file descriptor of %s is closed", SDATA (PGET (p, name))); 5464 error ("Output file descriptor of %s is closed", SDATA (p->name));
5465 5465
5466 coding = proc_encode_coding_system[p->outfd]; 5466 coding = proc_encode_coding_system[p->outfd];
5467 Vlast_coding_system_used = CODING_ID_NAME (coding->id); 5467 Vlast_coding_system_used = CODING_ID_NAME (coding->id);
@@ -5472,8 +5472,8 @@ send_process (volatile Lisp_Object proc, const char *volatile buf,
5472 || EQ (object, Qt)) 5472 || EQ (object, Qt))
5473 { 5473 {
5474 PSET (p, encode_coding_system, 5474 PSET (p, encode_coding_system,
5475 complement_process_encoding_system (PGET (p, encode_coding_system))); 5475 complement_process_encoding_system (p->encode_coding_system));
5476 if (!EQ (Vlast_coding_system_used, PGET (p, encode_coding_system))) 5476 if (!EQ (Vlast_coding_system_used, p->encode_coding_system))
5477 { 5477 {
5478 /* The coding system for encoding was changed to raw-text 5478 /* The coding system for encoding was changed to raw-text
5479 because we sent a unibyte text previously. Now we are 5479 because we sent a unibyte text previously. Now we are
@@ -5483,8 +5483,8 @@ send_process (volatile Lisp_Object proc, const char *volatile buf,
5483 Another reason we come here is that the coding system 5483 Another reason we come here is that the coding system
5484 was just complemented and a new one was returned by 5484 was just complemented and a new one was returned by
5485 complement_process_encoding_system. */ 5485 complement_process_encoding_system. */
5486 setup_coding_system (PGET (p, encode_coding_system), coding); 5486 setup_coding_system (p->encode_coding_system, coding);
5487 Vlast_coding_system_used = PGET (p, encode_coding_system); 5487 Vlast_coding_system_used = p->encode_coding_system;
5488 } 5488 }
5489 coding->src_multibyte = 1; 5489 coding->src_multibyte = 1;
5490 } 5490 }
@@ -5571,7 +5571,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf,
5571 5571
5572 /* If there is already data in the write_queue, put the new data 5572 /* If there is already data in the write_queue, put the new data
5573 in the back of queue. Otherwise, ignore it. */ 5573 in the back of queue. Otherwise, ignore it. */
5574 if (!NILP (PGET (p, write_queue))) 5574 if (!NILP (p->write_queue))
5575 write_queue_push (p, object, buf, len, 0); 5575 write_queue_push (p, object, buf, len, 0);
5576 5576
5577 do /* while !NILP (p->write_queue) */ 5577 do /* while !NILP (p->write_queue) */
@@ -5685,7 +5685,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf,
5685 cur_len -= written; 5685 cur_len -= written;
5686 } 5686 }
5687 } 5687 }
5688 while (!NILP (PGET (p, write_queue))); 5688 while (!NILP (p->write_queue));
5689 } 5689 }
5690 else 5690 else
5691 { 5691 {
@@ -5696,7 +5696,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf,
5696 PSET (p, status, Fcons (Qexit, Fcons (make_number (256), Qnil))); 5696 PSET (p, status, Fcons (Qexit, Fcons (make_number (256), Qnil)));
5697 p->tick = ++process_tick; 5697 p->tick = ++process_tick;
5698 deactivate_process (proc); 5698 deactivate_process (proc);
5699 error ("SIGPIPE raised on process %s; closed it", SDATA (PGET (p, name))); 5699 error ("SIGPIPE raised on process %s; closed it", SDATA (p->name));
5700 } 5700 }
5701} 5701}
5702 5702
@@ -5754,12 +5754,12 @@ emacs_get_tty_pgrp (struct Lisp_Process *p)
5754 pid_t gid = -1; 5754 pid_t gid = -1;
5755 5755
5756#ifdef TIOCGPGRP 5756#ifdef TIOCGPGRP
5757 if (ioctl (p->infd, TIOCGPGRP, &gid) == -1 && ! NILP (PGET (p, tty_name))) 5757 if (ioctl (p->infd, TIOCGPGRP, &gid) == -1 && ! NILP (p->tty_name))
5758 { 5758 {
5759 int fd; 5759 int fd;
5760 /* Some OS:es (Solaris 8/9) does not allow TIOCGPGRP from the 5760 /* Some OS:es (Solaris 8/9) does not allow TIOCGPGRP from the
5761 master side. Try the slave side. */ 5761 master side. Try the slave side. */
5762 fd = emacs_open (SSDATA (PGET (p, tty_name)), O_RDONLY, 0); 5762 fd = emacs_open (SSDATA (p->tty_name), O_RDONLY, 0);
5763 5763
5764 if (fd != -1) 5764 if (fd != -1)
5765 { 5765 {
@@ -5788,12 +5788,12 @@ return t unconditionally. */)
5788 proc = get_process (process); 5788 proc = get_process (process);
5789 p = XPROCESS (proc); 5789 p = XPROCESS (proc);
5790 5790
5791 if (!EQ (PGET (p, type), Qreal)) 5791 if (!EQ (p->type, Qreal))
5792 error ("Process %s is not a subprocess", 5792 error ("Process %s is not a subprocess",
5793 SDATA (PGET (p, name))); 5793 SDATA (p->name));
5794 if (p->infd < 0) 5794 if (p->infd < 0)
5795 error ("Process %s is not active", 5795 error ("Process %s is not active",
5796 SDATA (PGET (p, name))); 5796 SDATA (p->name));
5797 5797
5798 gid = emacs_get_tty_pgrp (p); 5798 gid = emacs_get_tty_pgrp (p);
5799 5799
@@ -5828,12 +5828,12 @@ process_send_signal (Lisp_Object process, int signo, Lisp_Object current_group,
5828 proc = get_process (process); 5828 proc = get_process (process);
5829 p = XPROCESS (proc); 5829 p = XPROCESS (proc);
5830 5830
5831 if (!EQ (PGET (p, type), Qreal)) 5831 if (!EQ (p->type, Qreal))
5832 error ("Process %s is not a subprocess", 5832 error ("Process %s is not a subprocess",
5833 SDATA (PGET (p, name))); 5833 SDATA (p->name));
5834 if (p->infd < 0) 5834 if (p->infd < 0)
5835 error ("Process %s is not active", 5835 error ("Process %s is not active",
5836 SDATA (PGET (p, name))); 5836 SDATA (p->name));
5837 5837
5838 if (!p->pty_flag) 5838 if (!p->pty_flag)
5839 current_group = Qnil; 5839 current_group = Qnil;
@@ -6012,7 +6012,7 @@ traffic. */)
6012 struct Lisp_Process *p; 6012 struct Lisp_Process *p;
6013 6013
6014 p = XPROCESS (process); 6014 p = XPROCESS (process);
6015 if (NILP (PGET (p, command)) 6015 if (NILP (p->command)
6016 && p->infd >= 0) 6016 && p->infd >= 0)
6017 { 6017 {
6018 FD_CLR (p->infd, &input_wait_mask); 6018 FD_CLR (p->infd, &input_wait_mask);
@@ -6041,9 +6041,9 @@ traffic. */)
6041 struct Lisp_Process *p; 6041 struct Lisp_Process *p;
6042 6042
6043 p = XPROCESS (process); 6043 p = XPROCESS (process);
6044 if (EQ (PGET (p, command), Qt) 6044 if (EQ (p->command, Qt)
6045 && p->infd >= 0 6045 && p->infd >= 0
6046 && (!EQ (PGET (p, filter), Qt) || EQ (PGET (p, status), Qlisten))) 6046 && (!EQ (p->filter, Qt) || EQ (p->status, Qlisten)))
6047 { 6047 {
6048 FD_SET (p->infd, &input_wait_mask); 6048 FD_SET (p->infd, &input_wait_mask);
6049 FD_SET (p->infd, &non_keyboard_wait_mask); 6049 FD_SET (p->infd, &non_keyboard_wait_mask);
@@ -6101,8 +6101,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */)
6101 CHECK_PROCESS (process); 6101 CHECK_PROCESS (process);
6102 pid = XPROCESS (process)->pid; 6102 pid = XPROCESS (process)->pid;
6103 if (pid <= 0) 6103 if (pid <= 0)
6104 error ("Cannot signal process %s", 6104 error ("Cannot signal process %s", SDATA (XPROCESS (process)->name));
6105 SDATA (PGET (XPROCESS (process), name)));
6106 } 6105 }
6107 6106
6108#define parse_signal(NAME, VALUE) \ 6107#define parse_signal(NAME, VALUE) \
@@ -6246,8 +6245,8 @@ process has been transmitted to the serial port. */)
6246 /* Make sure the process is really alive. */ 6245 /* Make sure the process is really alive. */
6247 if (XPROCESS (proc)->raw_status_new) 6246 if (XPROCESS (proc)->raw_status_new)
6248 update_status (XPROCESS (proc)); 6247 update_status (XPROCESS (proc));
6249 if (! EQ (PGET (XPROCESS (proc), status), Qrun)) 6248 if (! EQ (XPROCESS (proc)->status, Qrun))
6250 error ("Process %s not running", SDATA (PGET (XPROCESS (proc), name))); 6249 error ("Process %s not running", SDATA (XPROCESS (proc)->name));
6251 6250
6252 if (CODING_REQUIRE_FLUSHING (coding)) 6251 if (CODING_REQUIRE_FLUSHING (coding))
6253 { 6252 {
@@ -6257,7 +6256,7 @@ process has been transmitted to the serial port. */)
6257 6256
6258 if (XPROCESS (proc)->pty_flag) 6257 if (XPROCESS (proc)->pty_flag)
6259 send_process (proc, "\004", 1, Qnil); 6258 send_process (proc, "\004", 1, Qnil);
6260 else if (EQ (PGET (XPROCESS (proc), type), Qserial)) 6259 else if (EQ (XPROCESS (proc)->type, Qserial))
6261 { 6260 {
6262#ifndef WINDOWSNT 6261#ifndef WINDOWSNT
6263 if (tcdrain (XPROCESS (proc)->outfd) != 0) 6262 if (tcdrain (XPROCESS (proc)->outfd) != 0)
@@ -6274,7 +6273,7 @@ process has been transmitted to the serial port. */)
6274 for communication with the subprocess, call shutdown to cause EOF. 6273 for communication with the subprocess, call shutdown to cause EOF.
6275 (In some old system, shutdown to socketpair doesn't work. 6274 (In some old system, shutdown to socketpair doesn't work.
6276 Then we just can't win.) */ 6275 Then we just can't win.) */
6277 if (EQ (PGET (XPROCESS (proc), type), Qnetwork) 6276 if (EQ (XPROCESS (proc)->type, Qnetwork)
6278 || XPROCESS (proc)->outfd == XPROCESS (proc)->infd) 6277 || XPROCESS (proc)->outfd == XPROCESS (proc)->infd)
6279 shutdown (XPROCESS (proc)->outfd, 1); 6278 shutdown (XPROCESS (proc)->outfd, 1);
6280 /* In case of socketpair, outfd == infd, so don't close it. */ 6279 /* In case of socketpair, outfd == infd, so don't close it. */
@@ -6387,7 +6386,7 @@ sigchld_handler (int signo)
6387 { 6386 {
6388 proc = XCDR (XCAR (tail)); 6387 proc = XCDR (XCAR (tail));
6389 p = XPROCESS (proc); 6388 p = XPROCESS (proc);
6390 if (EQ (PGET (p, type), Qreal) && p->pid == pid) 6389 if (EQ (p->type, Qreal) && p->pid == pid)
6391 break; 6390 break;
6392 p = 0; 6391 p = 0;
6393 } 6392 }
@@ -6511,7 +6510,7 @@ exec_sentinel (Lisp_Object proc, Lisp_Object reason)
6511 friends don't expect current-buffer to be changed from under them. */ 6510 friends don't expect current-buffer to be changed from under them. */
6512 record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ()); 6511 record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ());
6513 6512
6514 sentinel = PGET (p, sentinel); 6513 sentinel = p->sentinel;
6515 if (NILP (sentinel)) 6514 if (NILP (sentinel))
6516 return; 6515 return;
6517 6516
@@ -6605,16 +6604,16 @@ status_notify (struct Lisp_Process *deleting_process)
6605 p->update_tick = p->tick; 6604 p->update_tick = p->tick;
6606 6605
6607 /* If process is still active, read any output that remains. */ 6606 /* If process is still active, read any output that remains. */
6608 while (! EQ (PGET (p, filter), Qt) 6607 while (! EQ (p->filter, Qt)
6609 && ! EQ (PGET (p, status), Qconnect) 6608 && ! EQ (p->status, Qconnect)
6610 && ! EQ (PGET (p, status), Qlisten) 6609 && ! EQ (p->status, Qlisten)
6611 /* Network or serial process not stopped: */ 6610 /* Network or serial process not stopped: */
6612 && ! EQ (PGET (p, command), Qt) 6611 && ! EQ (p->command, Qt)
6613 && p->infd >= 0 6612 && p->infd >= 0
6614 && p != deleting_process 6613 && p != deleting_process
6615 && read_process_output (proc, p->infd) > 0); 6614 && read_process_output (proc, p->infd) > 0);
6616 6615
6617 buffer = PGET (p, buffer); 6616 buffer = p->buffer;
6618 6617
6619 /* Get the text to use for the message. */ 6618 /* Get the text to use for the message. */
6620 if (p->raw_status_new) 6619 if (p->raw_status_new)
@@ -6622,9 +6621,9 @@ status_notify (struct Lisp_Process *deleting_process)
6622 msg = status_message (p); 6621 msg = status_message (p);
6623 6622
6624 /* If process is terminated, deactivate it or delete it. */ 6623 /* If process is terminated, deactivate it or delete it. */
6625 symbol = PGET (p, status); 6624 symbol = p->status;
6626 if (CONSP (PGET (p, status))) 6625 if (CONSP (p->status))
6627 symbol = XCAR (PGET (p, status)); 6626 symbol = XCAR (p->status);
6628 6627
6629 if (EQ (symbol, Qsignal) || EQ (symbol, Qexit) 6628 if (EQ (symbol, Qsignal) || EQ (symbol, Qexit)
6630 || EQ (symbol, Qclosed)) 6629 || EQ (symbol, Qclosed))
@@ -6641,7 +6640,7 @@ status_notify (struct Lisp_Process *deleting_process)
6641 this code to be run again. */ 6640 this code to be run again. */
6642 p->update_tick = p->tick; 6641 p->update_tick = p->tick;
6643 /* Now output the message suitably. */ 6642 /* Now output the message suitably. */
6644 if (!NILP (PGET (p, sentinel))) 6643 if (!NILP (p->sentinel))
6645 exec_sentinel (proc, msg); 6644 exec_sentinel (proc, msg);
6646 /* Don't bother with a message in the buffer 6645 /* Don't bother with a message in the buffer
6647 when a process becomes runnable. */ 6646 when a process becomes runnable. */
@@ -6663,8 +6662,8 @@ status_notify (struct Lisp_Process *deleting_process)
6663 /* Insert new output into buffer 6662 /* Insert new output into buffer
6664 at the current end-of-output marker, 6663 at the current end-of-output marker,
6665 thus preserving logical ordering of input and output. */ 6664 thus preserving logical ordering of input and output. */
6666 if (XMARKER (PGET (p, mark))->buffer) 6665 if (XMARKER (p->mark)->buffer)
6667 Fgoto_char (PGET (p, mark)); 6666 Fgoto_char (p->mark);
6668 else 6667 else
6669 SET_PT_BOTH (ZV, ZV_BYTE); 6668 SET_PT_BOTH (ZV, ZV_BYTE);
6670 6669
@@ -6675,11 +6674,11 @@ status_notify (struct Lisp_Process *deleting_process)
6675 BVAR (current_buffer, read_only) = Qnil; 6674 BVAR (current_buffer, read_only) = Qnil;
6676 insert_string ("\nProcess "); 6675 insert_string ("\nProcess ");
6677 { /* FIXME: temporary kludge */ 6676 { /* FIXME: temporary kludge */
6678 Lisp_Object tem2 = PGET (p, name); Finsert (1, &tem2); } 6677 Lisp_Object tem2 = p->name; Finsert (1, &tem2); }
6679 insert_string (" "); 6678 insert_string (" ");
6680 Finsert (1, &msg); 6679 Finsert (1, &msg);
6681 BVAR (current_buffer, read_only) = tem; 6680 BVAR (current_buffer, read_only) = tem;
6682 set_marker_both (PGET (p, mark), PGET (p, buffer), PT, PT_BYTE); 6681 set_marker_both (p->mark, p->buffer, PT, PT_BYTE);
6683 6682
6684 if (opoint >= before) 6683 if (opoint >= before)
6685 SET_PT_BOTH (opoint + (PT - before), 6684 SET_PT_BOTH (opoint + (PT - before),
@@ -6709,9 +6708,9 @@ encode subprocess input. */)
6709 CHECK_PROCESS (process); 6708 CHECK_PROCESS (process);
6710 p = XPROCESS (process); 6709 p = XPROCESS (process);
6711 if (p->infd < 0) 6710 if (p->infd < 0)
6712 error ("Input file descriptor of %s closed", SDATA (PGET (p, name))); 6711 error ("Input file descriptor of %s closed", SDATA (p->name));
6713 if (p->outfd < 0) 6712 if (p->outfd < 0)
6714 error ("Output file descriptor of %s closed", SDATA (PGET (p, name))); 6713 error ("Output file descriptor of %s closed", SDATA (p->name));
6715 Fcheck_coding_system (decoding); 6714 Fcheck_coding_system (decoding);
6716 Fcheck_coding_system (encoding); 6715 Fcheck_coding_system (encoding);
6717 encoding = coding_inherit_eol_type (encoding, Qnil); 6716 encoding = coding_inherit_eol_type (encoding, Qnil);
@@ -6728,8 +6727,8 @@ DEFUN ("process-coding-system",
6728 (register Lisp_Object process) 6727 (register Lisp_Object process)
6729{ 6728{
6730 CHECK_PROCESS (process); 6729 CHECK_PROCESS (process);
6731 return Fcons (PGET (XPROCESS (process), decode_coding_system), 6730 return Fcons (XPROCESS (process)->decode_coding_system,
6732 PGET (XPROCESS (process), encode_coding_system)); 6731 XPROCESS (process)->encode_coding_system);
6733} 6732}
6734 6733
6735DEFUN ("set-process-filter-multibyte", Fset_process_filter_multibyte, 6734DEFUN ("set-process-filter-multibyte", Fset_process_filter_multibyte,
@@ -6747,7 +6746,7 @@ suppressed. */)
6747 p = XPROCESS (process); 6746 p = XPROCESS (process);
6748 if (NILP (flag)) 6747 if (NILP (flag))
6749 PSET (p, decode_coding_system, 6748 PSET (p, decode_coding_system,
6750 raw_text_coding_system (PGET (p, decode_coding_system))); 6749 raw_text_coding_system (p->decode_coding_system));
6751 setup_process_coding_systems (process); 6750 setup_process_coding_systems (process);
6752 6751
6753 return Qnil; 6752 return Qnil;
@@ -7085,19 +7084,19 @@ setup_process_coding_systems (Lisp_Object process)
7085 7084
7086 if (!proc_decode_coding_system[inch]) 7085 if (!proc_decode_coding_system[inch])
7087 proc_decode_coding_system[inch] = xmalloc (sizeof (struct coding_system)); 7086 proc_decode_coding_system[inch] = xmalloc (sizeof (struct coding_system));
7088 coding_system = PGET (p, decode_coding_system); 7087 coding_system = p->decode_coding_system;
7089 if (! NILP (PGET (p, filter))) 7088 if (! NILP (p->filter))
7090 ; 7089 ;
7091 else if (BUFFERP (PGET (p, buffer))) 7090 else if (BUFFERP (p->buffer))
7092 { 7091 {
7093 if (NILP (BVAR (XBUFFER (PGET (p, buffer)), enable_multibyte_characters))) 7092 if (NILP (BVAR (XBUFFER (p->buffer), enable_multibyte_characters)))
7094 coding_system = raw_text_coding_system (coding_system); 7093 coding_system = raw_text_coding_system (coding_system);
7095 } 7094 }
7096 setup_coding_system (coding_system, proc_decode_coding_system[inch]); 7095 setup_coding_system (coding_system, proc_decode_coding_system[inch]);
7097 7096
7098 if (!proc_encode_coding_system[outch]) 7097 if (!proc_encode_coding_system[outch])
7099 proc_encode_coding_system[outch] = xmalloc (sizeof (struct coding_system)); 7098 proc_encode_coding_system[outch] = xmalloc (sizeof (struct coding_system));
7100 setup_coding_system (PGET (p, encode_coding_system), 7099 setup_coding_system (p->encode_coding_system,
7101 proc_encode_coding_system[outch]); 7100 proc_encode_coding_system[outch]);
7102#endif 7101#endif
7103} 7102}
@@ -7143,7 +7142,7 @@ BUFFER may be a buffer or the name of one. */)
7143 for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail)) 7142 for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail))
7144 { 7143 {
7145 proc = Fcdr (XCAR (tail)); 7144 proc = Fcdr (XCAR (tail));
7146 if (PROCESSP (proc) && EQ (PGET (XPROCESS (proc), buffer), buf)) 7145 if (PROCESSP (proc) && EQ (XPROCESS (proc)->buffer, buf))
7147 return proc; 7146 return proc;
7148 } 7147 }
7149#endif /* subprocesses */ 7148#endif /* subprocesses */
@@ -7182,7 +7181,7 @@ kill_buffer_processes (Lisp_Object buffer)
7182 { 7181 {
7183 proc = XCDR (XCAR (tail)); 7182 proc = XCDR (XCAR (tail));
7184 if (PROCESSP (proc) 7183 if (PROCESSP (proc)
7185 && (NILP (buffer) || EQ (PGET (XPROCESS (proc), buffer), buffer))) 7184 && (NILP (buffer) || EQ (XPROCESS (proc)->buffer, buffer)))
7186 { 7185 {
7187 if (NETCONN_P (proc) || SERIALCONN_P (proc)) 7186 if (NETCONN_P (proc) || SERIALCONN_P (proc))
7188 Fdelete_process (proc); 7187 Fdelete_process (proc);
diff --git a/src/process.h b/src/process.h
index 2bcb0c4bff6..43cc7ea33c0 100644
--- a/src/process.h
+++ b/src/process.h
@@ -26,15 +26,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
26#include "gnutls.h" 26#include "gnutls.h"
27#endif 27#endif
28 28
29/* Most code should use these macros to access Lisp fields in 29/* Most code should use these macros to set
30 struct Lisp_Process. PGET should not be used as lvalue. */ 30 Lisp fields in struct Lisp_Process. */
31 31
32#define PGET(p, field) \ 32#define PSET(p, field, value) ((p)->field = (value))
33 (eassert (offsetof (struct Lisp_Process, field ## _) \
34 < offsetof (struct Lisp_Process, pid)), \
35 ((p)->INTERNAL_FIELD (field)))
36
37#define PSET(p, field, value) ((p)->INTERNAL_FIELD (field) = (value))
38 33
39/* This structure records information about a subprocess 34/* This structure records information about a subprocess
40 or network connection. */ 35 or network connection. */
@@ -44,68 +39,68 @@ struct Lisp_Process
44 struct vectorlike_header header; 39 struct vectorlike_header header;
45 40
46 /* Name of subprocess terminal. */ 41 /* Name of subprocess terminal. */
47 Lisp_Object INTERNAL_FIELD (tty_name); 42 Lisp_Object tty_name;
48 43
49 /* Name of this process */ 44 /* Name of this process */
50 Lisp_Object INTERNAL_FIELD (name); 45 Lisp_Object name;
51 46
52 /* List of command arguments that this process was run with. 47 /* List of command arguments that this process was run with.
53 Is set to t for a stopped network process; nil otherwise. */ 48 Is set to t for a stopped network process; nil otherwise. */
54 Lisp_Object INTERNAL_FIELD (command); 49 Lisp_Object command;
55 50
56 /* (funcall FILTER PROC STRING) (if FILTER is non-nil) 51 /* (funcall FILTER PROC STRING) (if FILTER is non-nil)
57 to dispose of a bunch of chars from the process all at once */ 52 to dispose of a bunch of chars from the process all at once */
58 Lisp_Object INTERNAL_FIELD (filter); 53 Lisp_Object filter;
59 54
60 /* (funcall SENTINEL PROCESS) when process state changes */ 55 /* (funcall SENTINEL PROCESS) when process state changes */
61 Lisp_Object INTERNAL_FIELD (sentinel); 56 Lisp_Object sentinel;
62 57
63 /* (funcall LOG SERVER CLIENT MESSAGE) when a server process 58 /* (funcall LOG SERVER CLIENT MESSAGE) when a server process
64 accepts a connection from a client. */ 59 accepts a connection from a client. */
65 Lisp_Object INTERNAL_FIELD (log); 60 Lisp_Object log;
66 61
67 /* Buffer that output is going to */ 62 /* Buffer that output is going to */
68 Lisp_Object INTERNAL_FIELD (buffer); 63 Lisp_Object buffer;
69 64
70 /* t if this is a real child process. For a network or serial 65 /* t if this is a real child process. For a network or serial
71 connection, it is a plist based on the arguments to 66 connection, it is a plist based on the arguments to
72 make-network-process or make-serial-process. */ 67 make-network-process or make-serial-process. */
73 68
74 Lisp_Object INTERNAL_FIELD (childp); 69 Lisp_Object childp;
75 70
76 /* Plist for programs to keep per-process state information, parameters, etc. */ 71 /* Plist for programs to keep per-process state information, parameters, etc. */
77 Lisp_Object INTERNAL_FIELD (plist); 72 Lisp_Object plist;
78 73
79 /* Symbol indicating the type of process: real, network, serial */ 74 /* Symbol indicating the type of process: real, network, serial */
80 Lisp_Object INTERNAL_FIELD (type); 75 Lisp_Object type;
81 76
82 /* Marker set to end of last buffer-inserted output from this process */ 77 /* Marker set to end of last buffer-inserted output from this process */
83 Lisp_Object INTERNAL_FIELD (mark); 78 Lisp_Object mark;
84 79
85 /* Symbol indicating status of process. 80 /* Symbol indicating status of process.
86 This may be a symbol: run, open, or closed. 81 This may be a symbol: run, open, or closed.
87 Or it may be a list, whose car is stop, exit or signal 82 Or it may be a list, whose car is stop, exit or signal
88 and whose cdr is a pair (EXIT_CODE . COREDUMP_FLAG) 83 and whose cdr is a pair (EXIT_CODE . COREDUMP_FLAG)
89 or (SIGNAL_NUMBER . COREDUMP_FLAG). */ 84 or (SIGNAL_NUMBER . COREDUMP_FLAG). */
90 Lisp_Object INTERNAL_FIELD (status); 85 Lisp_Object status;
91 86
92 /* Coding-system for decoding the input from this process. */ 87 /* Coding-system for decoding the input from this process. */
93 Lisp_Object INTERNAL_FIELD (decode_coding_system); 88 Lisp_Object decode_coding_system;
94 89
95 /* Working buffer for decoding. */ 90 /* Working buffer for decoding. */
96 Lisp_Object INTERNAL_FIELD (decoding_buf); 91 Lisp_Object decoding_buf;
97 92
98 /* Coding-system for encoding the output to this process. */ 93 /* Coding-system for encoding the output to this process. */
99 Lisp_Object INTERNAL_FIELD (encode_coding_system); 94 Lisp_Object encode_coding_system;
100 95
101 /* Working buffer for encoding. */ 96 /* Working buffer for encoding. */
102 Lisp_Object INTERNAL_FIELD (encoding_buf); 97 Lisp_Object encoding_buf;
103 98
104 /* Queue for storing waiting writes */ 99 /* Queue for storing waiting writes */
105 Lisp_Object INTERNAL_FIELD (write_queue); 100 Lisp_Object write_queue;
106 101
107#ifdef HAVE_GNUTLS 102#ifdef HAVE_GNUTLS
108 Lisp_Object INTERNAL_FIELD (gnutls_cred_type); 103 Lisp_Object gnutls_cred_type;
109#endif 104#endif
110 105
111 /* After this point, there are no Lisp_Objects any more. */ 106 /* After this point, there are no Lisp_Objects any more. */
diff --git a/src/sysdep.c b/src/sysdep.c
index d9e239d77c3..01ca905a987 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -2159,7 +2159,7 @@ serial_configure (struct Lisp_Process *p,
2159 int err = -1; 2159 int err = -1;
2160 char summary[4] = "???"; /* This usually becomes "8N1". */ 2160 char summary[4] = "???"; /* This usually becomes "8N1". */
2161 2161
2162 childp2 = Fcopy_sequence (PGET (p, childp)); 2162 childp2 = Fcopy_sequence (p->childp);
2163 2163
2164 /* Read port attributes and prepare default configuration. */ 2164 /* Read port attributes and prepare default configuration. */
2165 err = tcgetattr (p->outfd, &attr); 2165 err = tcgetattr (p->outfd, &attr);
@@ -2177,7 +2177,7 @@ serial_configure (struct Lisp_Process *p,
2177 if (!NILP (Fplist_member (contact, QCspeed))) 2177 if (!NILP (Fplist_member (contact, QCspeed)))
2178 tem = Fplist_get (contact, QCspeed); 2178 tem = Fplist_get (contact, QCspeed);
2179 else 2179 else
2180 tem = Fplist_get (PGET (p, childp), QCspeed); 2180 tem = Fplist_get (p->childp, QCspeed);
2181 CHECK_NUMBER (tem); 2181 CHECK_NUMBER (tem);
2182 err = cfsetspeed (&attr, XINT (tem)); 2182 err = cfsetspeed (&attr, XINT (tem));
2183 if (err != 0) 2183 if (err != 0)
@@ -2189,7 +2189,7 @@ serial_configure (struct Lisp_Process *p,
2189 if (!NILP (Fplist_member (contact, QCbytesize))) 2189 if (!NILP (Fplist_member (contact, QCbytesize)))
2190 tem = Fplist_get (contact, QCbytesize); 2190 tem = Fplist_get (contact, QCbytesize);
2191 else 2191 else
2192 tem = Fplist_get (PGET (p, childp), QCbytesize); 2192 tem = Fplist_get (p->childp, QCbytesize);
2193 if (NILP (tem)) 2193 if (NILP (tem))
2194 tem = make_number (8); 2194 tem = make_number (8);
2195 CHECK_NUMBER (tem); 2195 CHECK_NUMBER (tem);
@@ -2210,7 +2210,7 @@ serial_configure (struct Lisp_Process *p,
2210 if (!NILP (Fplist_member (contact, QCparity))) 2210 if (!NILP (Fplist_member (contact, QCparity)))
2211 tem = Fplist_get (contact, QCparity); 2211 tem = Fplist_get (contact, QCparity);
2212 else 2212 else
2213 tem = Fplist_get (PGET (p, childp), QCparity); 2213 tem = Fplist_get (p->childp, QCparity);
2214 if (!NILP (tem) && !EQ (tem, Qeven) && !EQ (tem, Qodd)) 2214 if (!NILP (tem) && !EQ (tem, Qeven) && !EQ (tem, Qodd))
2215 error (":parity must be nil (no parity), `even', or `odd'"); 2215 error (":parity must be nil (no parity), `even', or `odd'");
2216#if defined (PARENB) && defined (PARODD) && defined (IGNPAR) && defined (INPCK) 2216#if defined (PARENB) && defined (PARODD) && defined (IGNPAR) && defined (INPCK)
@@ -2243,7 +2243,7 @@ serial_configure (struct Lisp_Process *p,
2243 if (!NILP (Fplist_member (contact, QCstopbits))) 2243 if (!NILP (Fplist_member (contact, QCstopbits)))
2244 tem = Fplist_get (contact, QCstopbits); 2244 tem = Fplist_get (contact, QCstopbits);
2245 else 2245 else
2246 tem = Fplist_get (PGET (p, childp), QCstopbits); 2246 tem = Fplist_get (p->childp, QCstopbits);
2247 if (NILP (tem)) 2247 if (NILP (tem))
2248 tem = make_number (1); 2248 tem = make_number (1);
2249 CHECK_NUMBER (tem); 2249 CHECK_NUMBER (tem);
@@ -2265,7 +2265,7 @@ serial_configure (struct Lisp_Process *p,
2265 if (!NILP (Fplist_member (contact, QCflowcontrol))) 2265 if (!NILP (Fplist_member (contact, QCflowcontrol)))
2266 tem = Fplist_get (contact, QCflowcontrol); 2266 tem = Fplist_get (contact, QCflowcontrol);
2267 else 2267 else
2268 tem = Fplist_get (PGET (p, childp), QCflowcontrol); 2268 tem = Fplist_get (p->childp, QCflowcontrol);
2269 if (!NILP (tem) && !EQ (tem, Qhw) && !EQ (tem, Qsw)) 2269 if (!NILP (tem) && !EQ (tem, Qhw) && !EQ (tem, Qsw))
2270 error (":flowcontrol must be nil (no flowcontrol), `hw', or `sw'"); 2270 error (":flowcontrol must be nil (no flowcontrol), `hw', or `sw'");
2271#if defined (CRTSCTS) 2271#if defined (CRTSCTS)
diff --git a/src/w32.c b/src/w32.c
index 4c17ce899a7..61de234cf70 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -6890,7 +6890,7 @@ serial_configure (struct Lisp_Process *p, Lisp_Object contact)
6890 error ("Not a serial process"); 6890 error ("Not a serial process");
6891 hnd = fd_info[ p->outfd ].hnd; 6891 hnd = fd_info[ p->outfd ].hnd;
6892 6892
6893 childp2 = Fcopy_sequence (PGET (p, childp)); 6893 childp2 = Fcopy_sequence (p->childp);
6894 6894
6895 /* Initialize timeouts for blocking read and blocking write. */ 6895 /* Initialize timeouts for blocking read and blocking write. */
6896 if (!GetCommTimeouts (hnd, &ct)) 6896 if (!GetCommTimeouts (hnd, &ct))
@@ -6919,7 +6919,7 @@ serial_configure (struct Lisp_Process *p, Lisp_Object contact)
6919 if (!NILP (Fplist_member (contact, QCspeed))) 6919 if (!NILP (Fplist_member (contact, QCspeed)))
6920 tem = Fplist_get (contact, QCspeed); 6920 tem = Fplist_get (contact, QCspeed);
6921 else 6921 else
6922 tem = Fplist_get (PGET (p, childp), QCspeed); 6922 tem = Fplist_get (p->childp, QCspeed);
6923 CHECK_NUMBER (tem); 6923 CHECK_NUMBER (tem);
6924 dcb.BaudRate = XINT (tem); 6924 dcb.BaudRate = XINT (tem);
6925 childp2 = Fplist_put (childp2, QCspeed, tem); 6925 childp2 = Fplist_put (childp2, QCspeed, tem);
@@ -6928,7 +6928,7 @@ serial_configure (struct Lisp_Process *p, Lisp_Object contact)
6928 if (!NILP (Fplist_member (contact, QCbytesize))) 6928 if (!NILP (Fplist_member (contact, QCbytesize)))
6929 tem = Fplist_get (contact, QCbytesize); 6929 tem = Fplist_get (contact, QCbytesize);
6930 else 6930 else
6931 tem = Fplist_get (PGET (p, childp), QCbytesize); 6931 tem = Fplist_get (p->childp, QCbytesize);
6932 if (NILP (tem)) 6932 if (NILP (tem))
6933 tem = make_number (8); 6933 tem = make_number (8);
6934 CHECK_NUMBER (tem); 6934 CHECK_NUMBER (tem);
@@ -6942,7 +6942,7 @@ serial_configure (struct Lisp_Process *p, Lisp_Object contact)
6942 if (!NILP (Fplist_member (contact, QCparity))) 6942 if (!NILP (Fplist_member (contact, QCparity)))
6943 tem = Fplist_get (contact, QCparity); 6943 tem = Fplist_get (contact, QCparity);
6944 else 6944 else
6945 tem = Fplist_get (PGET (p, childp), QCparity); 6945 tem = Fplist_get (p->childp, QCparity);
6946 if (!NILP (tem) && !EQ (tem, Qeven) && !EQ (tem, Qodd)) 6946 if (!NILP (tem) && !EQ (tem, Qeven) && !EQ (tem, Qodd))
6947 error (":parity must be nil (no parity), `even', or `odd'"); 6947 error (":parity must be nil (no parity), `even', or `odd'");
6948 dcb.fParity = FALSE; 6948 dcb.fParity = FALSE;
@@ -6972,7 +6972,7 @@ serial_configure (struct Lisp_Process *p, Lisp_Object contact)
6972 if (!NILP (Fplist_member (contact, QCstopbits))) 6972 if (!NILP (Fplist_member (contact, QCstopbits)))
6973 tem = Fplist_get (contact, QCstopbits); 6973 tem = Fplist_get (contact, QCstopbits);
6974 else 6974 else
6975 tem = Fplist_get (PGET (p, childp), QCstopbits); 6975 tem = Fplist_get (p->childp, QCstopbits);
6976 if (NILP (tem)) 6976 if (NILP (tem))
6977 tem = make_number (1); 6977 tem = make_number (1);
6978 CHECK_NUMBER (tem); 6978 CHECK_NUMBER (tem);
@@ -6989,7 +6989,7 @@ serial_configure (struct Lisp_Process *p, Lisp_Object contact)
6989 if (!NILP (Fplist_member (contact, QCflowcontrol))) 6989 if (!NILP (Fplist_member (contact, QCflowcontrol)))
6990 tem = Fplist_get (contact, QCflowcontrol); 6990 tem = Fplist_get (contact, QCflowcontrol);
6991 else 6991 else
6992 tem = Fplist_get (PGET (p, childp), QCflowcontrol); 6992 tem = Fplist_get (p->childp, QCflowcontrol);
6993 if (!NILP (tem) && !EQ (tem, Qhw) && !EQ (tem, Qsw)) 6993 if (!NILP (tem) && !EQ (tem, Qhw) && !EQ (tem, Qsw))
6994 error (":flowcontrol must be nil (no flowcontrol), `hw', or `sw'"); 6994 error (":flowcontrol must be nil (no flowcontrol), `hw', or `sw'");
6995 dcb.fOutxCtsFlow = FALSE; 6995 dcb.fOutxCtsFlow = FALSE;
diff --git a/src/xdisp.c b/src/xdisp.c
index abc98224ab6..73dc272e5e2 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -21676,9 +21676,9 @@ decode_mode_spec (struct window *w, register int c, int field_width,
21676 if (PROCESSP (obj)) 21676 if (PROCESSP (obj))
21677 { 21677 {
21678 p = decode_mode_spec_coding 21678 p = decode_mode_spec_coding
21679 (PGET (XPROCESS (obj), decode_coding_system), p, eol_flag); 21679 (XPROCESS (obj)->decode_coding_system, p, eol_flag);
21680 p = decode_mode_spec_coding 21680 p = decode_mode_spec_coding
21681 (PGET (XPROCESS (obj), encode_coding_system), p, eol_flag); 21681 (XPROCESS (obj)->encode_coding_system, p, eol_flag);
21682 } 21682 }
21683#endif /* subprocesses */ 21683#endif /* subprocesses */
21684#endif /* 0 */ 21684#endif /* 0 */