diff options
Diffstat (limited to 'src/process.h')
| -rw-r--r-- | src/process.h | 47 |
1 files changed, 21 insertions, 26 deletions
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. */ |