diff options
| author | Dmitry Antipov | 2012-08-07 11:42:34 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-08-07 11:42:34 +0400 |
| commit | 4d2b044cdc0cb1edc8150772fbbb24e2e55c4b77 (patch) | |
| tree | a6de5fdb164bad38a3389f9d7e0703b9ab8a0043 /src/process.c | |
| parent | d3d50620ed3a8066c15ae3d3701b83371ca5382a (diff) | |
| download | emacs-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/process.c')
| -rw-r--r-- | src/process.c | 287 |
1 files changed, 143 insertions, 144 deletions
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. */ |
| 173 | extern Lisp_Object QCfilter; | 173 | extern 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 |
| 181 | extern int h_errno; | 181 | extern int h_errno; |
| @@ -479,7 +479,7 @@ decode_status (Lisp_Object l, Lisp_Object *symbol, int *code, int *coredump) | |||
| 479 | static Lisp_Object | 479 | static Lisp_Object |
| 480 | status_message (struct Lisp_Process *p) | 480 | status_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 | ||
| 870 | DEFUN ("process-command", Fprocess_command, Sprocess_command, 1, 1, 0, | 870 | DEFUN ("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 | ||
| 882 | DEFUN ("process-tty-name", Fprocess_tty_name, Sprocess_tty_name, 1, 1, 0, | 882 | DEFUN ("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 | ||
| 892 | DEFUN ("set-process-buffer", Fset_process_buffer, Sset_process_buffer, | 892 | DEFUN ("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 | ||
| 921 | DEFUN ("process-mark", Fprocess_mark, Sprocess_mark, | 921 | DEFUN ("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 | ||
| 930 | DEFUN ("set-process-filter", Fset_process_filter, Sset_process_filter, | 930 | DEFUN ("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 | ||
| 994 | DEFUN ("set-process-sentinel", Fset_process_sentinel, Sset_process_sentinel, | 994 | DEFUN ("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 | ||
| 1022 | DEFUN ("set-process-window-size", Fset_process_window_size, | 1022 | DEFUN ("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 | ||
| 1133 | DEFUN ("set-process-plist", Fset_process_plist, Sset_process_plist, | 1133 | DEFUN ("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 | |||
| 1150 | a socket connection. */) | 1150 | a 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 | ||
| 1169 | DEFUN ("format-network-address", Fformat_network_address, Sformat_network_address, | 1169 | DEFUN ("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 | ||
| 6735 | DEFUN ("set-process-filter-multibyte", Fset_process_filter_multibyte, | 6734 | DEFUN ("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); |