diff options
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 156 |
1 files changed, 50 insertions, 106 deletions
diff --git a/src/process.c b/src/process.c index 255803c92fd..313663e5d42 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -297,8 +297,8 @@ static void create_pty (Lisp_Object); | |||
| 297 | #define POLL_FOR_INPUT | 297 | #define POLL_FOR_INPUT |
| 298 | #endif | 298 | #endif |
| 299 | 299 | ||
| 300 | static Lisp_Object get_process (); | 300 | static Lisp_Object get_process (register Lisp_Object name); |
| 301 | static void exec_sentinel (); | 301 | static void exec_sentinel (Lisp_Object proc, Lisp_Object reason); |
| 302 | 302 | ||
| 303 | extern int timers_run; | 303 | extern int timers_run; |
| 304 | 304 | ||
| @@ -399,8 +399,7 @@ static char pty_name[24]; | |||
| 399 | static Lisp_Object status_convert (int); | 399 | static Lisp_Object status_convert (int); |
| 400 | 400 | ||
| 401 | static void | 401 | static void |
| 402 | update_status (p) | 402 | update_status (struct Lisp_Process *p) |
| 403 | struct Lisp_Process *p; | ||
| 404 | { | 403 | { |
| 405 | eassert (p->raw_status_new); | 404 | eassert (p->raw_status_new); |
| 406 | p->status = status_convert (p->raw_status); | 405 | p->status = status_convert (p->raw_status); |
| @@ -429,11 +428,7 @@ status_convert (int w) | |||
| 429 | and store them individually through the three pointers. */ | 428 | and store them individually through the three pointers. */ |
| 430 | 429 | ||
| 431 | static void | 430 | static void |
| 432 | decode_status (l, symbol, code, coredump) | 431 | decode_status (Lisp_Object l, Lisp_Object *symbol, int *code, int *coredump) |
| 433 | Lisp_Object l; | ||
| 434 | Lisp_Object *symbol; | ||
| 435 | int *code; | ||
| 436 | int *coredump; | ||
| 437 | { | 432 | { |
| 438 | Lisp_Object tem; | 433 | Lisp_Object tem; |
| 439 | 434 | ||
| @@ -456,8 +451,7 @@ decode_status (l, symbol, code, coredump) | |||
| 456 | /* Return a string describing a process status list. */ | 451 | /* Return a string describing a process status list. */ |
| 457 | 452 | ||
| 458 | static Lisp_Object | 453 | static Lisp_Object |
| 459 | status_message (p) | 454 | status_message (struct Lisp_Process *p) |
| 460 | struct Lisp_Process *p; | ||
| 461 | { | 455 | { |
| 462 | Lisp_Object status = p->status; | 456 | Lisp_Object status = p->status; |
| 463 | Lisp_Object symbol; | 457 | Lisp_Object symbol; |
| @@ -519,7 +513,7 @@ status_message (p) | |||
| 519 | is left in the variable pty_name. */ | 513 | is left in the variable pty_name. */ |
| 520 | 514 | ||
| 521 | static int | 515 | static int |
| 522 | allocate_pty () | 516 | allocate_pty (void) |
| 523 | { | 517 | { |
| 524 | register int c, i; | 518 | register int c, i; |
| 525 | int fd; | 519 | int fd; |
| @@ -593,8 +587,7 @@ allocate_pty () | |||
| 593 | #endif /* HAVE_PTYS */ | 587 | #endif /* HAVE_PTYS */ |
| 594 | 588 | ||
| 595 | static Lisp_Object | 589 | static Lisp_Object |
| 596 | make_process (name) | 590 | make_process (Lisp_Object name) |
| 597 | Lisp_Object name; | ||
| 598 | { | 591 | { |
| 599 | register Lisp_Object val, tem, name1; | 592 | register Lisp_Object val, tem, name1; |
| 600 | register struct Lisp_Process *p; | 593 | register struct Lisp_Process *p; |
| @@ -638,8 +631,7 @@ make_process (name) | |||
| 638 | } | 631 | } |
| 639 | 632 | ||
| 640 | static void | 633 | static void |
| 641 | remove_process (proc) | 634 | remove_process (register Lisp_Object proc) |
| 642 | register Lisp_Object proc; | ||
| 643 | { | 635 | { |
| 644 | register Lisp_Object pair; | 636 | register Lisp_Object pair; |
| 645 | 637 | ||
| @@ -652,8 +644,7 @@ remove_process (proc) | |||
| 652 | /* Setup coding systems of PROCESS. */ | 644 | /* Setup coding systems of PROCESS. */ |
| 653 | 645 | ||
| 654 | void | 646 | void |
| 655 | setup_process_coding_systems (process) | 647 | setup_process_coding_systems (Lisp_Object process) |
| 656 | Lisp_Object process; | ||
| 657 | { | 648 | { |
| 658 | struct Lisp_Process *p = XPROCESS (process); | 649 | struct Lisp_Process *p = XPROCESS (process); |
| 659 | int inch = p->infd; | 650 | int inch = p->infd; |
| @@ -729,8 +720,7 @@ BUFFER may be a buffer or the name of one. */) | |||
| 729 | current buffer. */ | 720 | current buffer. */ |
| 730 | 721 | ||
| 731 | static Lisp_Object | 722 | static Lisp_Object |
| 732 | get_process (name) | 723 | get_process (register Lisp_Object name) |
| 733 | register Lisp_Object name; | ||
| 734 | { | 724 | { |
| 735 | register Lisp_Object proc, obj; | 725 | register Lisp_Object proc, obj; |
| 736 | if (STRINGP (name)) | 726 | if (STRINGP (name)) |
| @@ -1161,7 +1151,7 @@ DEFUN ("process-query-on-exit-flag", | |||
| 1161 | } | 1151 | } |
| 1162 | 1152 | ||
| 1163 | #ifdef DATAGRAM_SOCKETS | 1153 | #ifdef DATAGRAM_SOCKETS |
| 1164 | Lisp_Object Fprocess_datagram_address (); | 1154 | Lisp_Object Fprocess_datagram_address (Lisp_Object process); |
| 1165 | #endif | 1155 | #endif |
| 1166 | 1156 | ||
| 1167 | DEFUN ("process-contact", Fprocess_contact, Sprocess_contact, | 1157 | DEFUN ("process-contact", Fprocess_contact, Sprocess_contact, |
| @@ -1327,8 +1317,7 @@ Returns nil if format of ADDRESS is invalid. */) | |||
| 1327 | #endif | 1317 | #endif |
| 1328 | 1318 | ||
| 1329 | static Lisp_Object | 1319 | static Lisp_Object |
| 1330 | list_processes_1 (query_only) | 1320 | list_processes_1 (Lisp_Object query_only) |
| 1331 | Lisp_Object query_only; | ||
| 1332 | { | 1321 | { |
| 1333 | register Lisp_Object tail, tem; | 1322 | register Lisp_Object tail, tem; |
| 1334 | Lisp_Object proc, minspace, tem1; | 1323 | Lisp_Object proc, minspace, tem1; |
| @@ -1579,7 +1568,7 @@ DEFUN ("process-list", Fprocess_list, Sprocess_list, 0, 0, 0, | |||
| 1579 | 1568 | ||
| 1580 | /* Starting asynchronous inferior processes. */ | 1569 | /* Starting asynchronous inferior processes. */ |
| 1581 | 1570 | ||
| 1582 | static Lisp_Object start_process_unwind (); | 1571 | static Lisp_Object start_process_unwind (Lisp_Object proc); |
| 1583 | 1572 | ||
| 1584 | DEFUN ("start-process", Fstart_process, Sstart_process, 3, MANY, 0, | 1573 | DEFUN ("start-process", Fstart_process, Sstart_process, 3, MANY, 0, |
| 1585 | doc: /* Start a program in a subprocess. Return the process object for it. | 1574 | doc: /* Start a program in a subprocess. Return the process object for it. |
| @@ -1814,8 +1803,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1814 | an error and the process wasn't started successfully, so we should | 1803 | an error and the process wasn't started successfully, so we should |
| 1815 | remove it from the process list. */ | 1804 | remove it from the process list. */ |
| 1816 | static Lisp_Object | 1805 | static Lisp_Object |
| 1817 | start_process_unwind (proc) | 1806 | start_process_unwind (Lisp_Object proc) |
| 1818 | Lisp_Object proc; | ||
| 1819 | { | 1807 | { |
| 1820 | if (!PROCESSP (proc)) | 1808 | if (!PROCESSP (proc)) |
| 1821 | abort (); | 1809 | abort (); |
| @@ -1828,8 +1816,7 @@ start_process_unwind (proc) | |||
| 1828 | } | 1816 | } |
| 1829 | 1817 | ||
| 1830 | static void | 1818 | static void |
| 1831 | create_process_1 (timer) | 1819 | create_process_1 (struct atimer *timer) |
| 1832 | struct atimer *timer; | ||
| 1833 | { | 1820 | { |
| 1834 | /* Nothing to do. */ | 1821 | /* Nothing to do. */ |
| 1835 | } | 1822 | } |
| @@ -1855,10 +1842,7 @@ create_process_sigchld () | |||
| 1855 | #endif | 1842 | #endif |
| 1856 | 1843 | ||
| 1857 | void | 1844 | void |
| 1858 | create_process (process, new_argv, current_dir) | 1845 | create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) |
| 1859 | Lisp_Object process; | ||
| 1860 | char **new_argv; | ||
| 1861 | Lisp_Object current_dir; | ||
| 1862 | { | 1846 | { |
| 1863 | int inchannel, outchannel; | 1847 | int inchannel, outchannel; |
| 1864 | pid_t pid; | 1848 | pid_t pid; |
| @@ -2245,8 +2229,7 @@ create_process (process, new_argv, current_dir) | |||
| 2245 | } | 2229 | } |
| 2246 | 2230 | ||
| 2247 | void | 2231 | void |
| 2248 | create_pty (process) | 2232 | create_pty (Lisp_Object process) |
| 2249 | Lisp_Object process; | ||
| 2250 | { | 2233 | { |
| 2251 | int inchannel, outchannel; | 2234 | int inchannel, outchannel; |
| 2252 | 2235 | ||
| @@ -2333,9 +2316,7 @@ create_pty (process) | |||
| 2333 | The address family of sa is not included in the result. */ | 2316 | The address family of sa is not included in the result. */ |
| 2334 | 2317 | ||
| 2335 | static Lisp_Object | 2318 | static Lisp_Object |
| 2336 | conv_sockaddr_to_lisp (sa, len) | 2319 | conv_sockaddr_to_lisp (struct sockaddr *sa, int len) |
| 2337 | struct sockaddr *sa; | ||
| 2338 | int len; | ||
| 2339 | { | 2320 | { |
| 2340 | Lisp_Object address; | 2321 | Lisp_Object address; |
| 2341 | int i; | 2322 | int i; |
| @@ -2404,9 +2385,7 @@ conv_sockaddr_to_lisp (sa, len) | |||
| 2404 | /* Get family and required size for sockaddr structure to hold ADDRESS. */ | 2385 | /* Get family and required size for sockaddr structure to hold ADDRESS. */ |
| 2405 | 2386 | ||
| 2406 | static int | 2387 | static int |
| 2407 | get_lisp_to_sockaddr_size (address, familyp) | 2388 | get_lisp_to_sockaddr_size (Lisp_Object address, int *familyp) |
| 2408 | Lisp_Object address; | ||
| 2409 | int *familyp; | ||
| 2410 | { | 2389 | { |
| 2411 | register struct Lisp_Vector *p; | 2390 | register struct Lisp_Vector *p; |
| 2412 | 2391 | ||
| @@ -2451,11 +2430,7 @@ get_lisp_to_sockaddr_size (address, familyp) | |||
| 2451 | we return after zeroing *SA. */ | 2430 | we return after zeroing *SA. */ |
| 2452 | 2431 | ||
| 2453 | static void | 2432 | static void |
| 2454 | conv_lisp_to_sockaddr (family, address, sa, len) | 2433 | conv_lisp_to_sockaddr (int family, Lisp_Object address, struct sockaddr *sa, int len) |
| 2455 | int family; | ||
| 2456 | Lisp_Object address; | ||
| 2457 | struct sockaddr *sa; | ||
| 2458 | int len; | ||
| 2459 | { | 2434 | { |
| 2460 | register struct Lisp_Vector *p; | 2435 | register struct Lisp_Vector *p; |
| 2461 | register unsigned char *cp = NULL; | 2436 | register unsigned char *cp = NULL; |
| @@ -2612,9 +2587,7 @@ static const struct socket_options { | |||
| 2612 | */ | 2587 | */ |
| 2613 | 2588 | ||
| 2614 | static int | 2589 | static int |
| 2615 | set_socket_option (s, opt, val) | 2590 | set_socket_option (int s, Lisp_Object opt, Lisp_Object val) |
| 2616 | int s; | ||
| 2617 | Lisp_Object opt, val; | ||
| 2618 | { | 2591 | { |
| 2619 | char *name; | 2592 | char *name; |
| 2620 | const struct socket_options *sopt; | 2593 | const struct socket_options *sopt; |
| @@ -3701,7 +3674,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3701 | int len1 = sizeof (sa1); | 3674 | int len1 = sizeof (sa1); |
| 3702 | if (getsockname (s, (struct sockaddr *)&sa1, &len1) == 0) | 3675 | if (getsockname (s, (struct sockaddr *)&sa1, &len1) == 0) |
| 3703 | contact = Fplist_put (contact, QClocal, | 3676 | contact = Fplist_put (contact, QClocal, |
| 3704 | conv_sockaddr_to_lisp (&sa1, len1)); | 3677 | conv_sockaddr_to_lisp ((struct sockaddr *)&sa1, len1)); |
| 3705 | } | 3678 | } |
| 3706 | #endif | 3679 | #endif |
| 3707 | } | 3680 | } |
| @@ -4154,8 +4127,7 @@ FLAGS is the current flags of the interface. */) | |||
| 4154 | /* Turn off input and output for process PROC. */ | 4127 | /* Turn off input and output for process PROC. */ |
| 4155 | 4128 | ||
| 4156 | void | 4129 | void |
| 4157 | deactivate_process (proc) | 4130 | deactivate_process (Lisp_Object proc) |
| 4158 | Lisp_Object proc; | ||
| 4159 | { | 4131 | { |
| 4160 | register int inchannel, outchannel; | 4132 | register int inchannel, outchannel; |
| 4161 | register struct Lisp_Process *p = XPROCESS (proc); | 4133 | register struct Lisp_Process *p = XPROCESS (proc); |
| @@ -4220,7 +4192,7 @@ deactivate_process (proc) | |||
| 4220 | to get rid of irrelevant descriptors. */ | 4192 | to get rid of irrelevant descriptors. */ |
| 4221 | 4193 | ||
| 4222 | void | 4194 | void |
| 4223 | close_process_descs () | 4195 | close_process_descs (void) |
| 4224 | { | 4196 | { |
| 4225 | #ifndef WINDOWSNT | 4197 | #ifndef WINDOWSNT |
| 4226 | int i; | 4198 | int i; |
| @@ -4313,9 +4285,7 @@ Return non-nil if we received any output before the timeout expired. */) | |||
| 4313 | static int connect_counter = 0; | 4285 | static int connect_counter = 0; |
| 4314 | 4286 | ||
| 4315 | static void | 4287 | static void |
| 4316 | server_accept_connection (server, channel) | 4288 | server_accept_connection (Lisp_Object server, int channel) |
| 4317 | Lisp_Object server; | ||
| 4318 | int channel; | ||
| 4319 | { | 4289 | { |
| 4320 | Lisp_Object proc, caller, name, buffer; | 4290 | Lisp_Object proc, caller, name, buffer; |
| 4321 | Lisp_Object contact, host, service; | 4291 | Lisp_Object contact, host, service; |
| @@ -4531,8 +4501,7 @@ server_accept_connection (server, channel) | |||
| 4531 | static int waiting_for_user_input_p; | 4501 | static int waiting_for_user_input_p; |
| 4532 | 4502 | ||
| 4533 | static Lisp_Object | 4503 | static Lisp_Object |
| 4534 | wait_reading_process_output_unwind (data) | 4504 | wait_reading_process_output_unwind (Lisp_Object data) |
| 4535 | Lisp_Object data; | ||
| 4536 | { | 4505 | { |
| 4537 | waiting_for_user_input_p = XINT (data); | 4506 | waiting_for_user_input_p = XINT (data); |
| 4538 | return Qnil; | 4507 | return Qnil; |
| @@ -4540,7 +4509,7 @@ wait_reading_process_output_unwind (data) | |||
| 4540 | 4509 | ||
| 4541 | /* This is here so breakpoints can be put on it. */ | 4510 | /* This is here so breakpoints can be put on it. */ |
| 4542 | static void | 4511 | static void |
| 4543 | wait_reading_process_output_1 () | 4512 | wait_reading_process_output_1 (void) |
| 4544 | { | 4513 | { |
| 4545 | } | 4514 | } |
| 4546 | 4515 | ||
| @@ -4553,10 +4522,7 @@ wait_reading_process_output_1 () | |||
| 4553 | 4522 | ||
| 4554 | #ifndef select | 4523 | #ifndef select |
| 4555 | static INLINE int | 4524 | static INLINE int |
| 4556 | select_wrapper (n, rfd, wfd, xfd, tmo) | 4525 | select_wrapper (int n, fd_set *rfd, fd_set *wfd, fd_set *xfd, struct timeval *tmo) |
| 4557 | int n; | ||
| 4558 | SELECT_TYPE *rfd, *wfd, *xfd; | ||
| 4559 | EMACS_TIME *tmo; | ||
| 4560 | { | 4526 | { |
| 4561 | return select (n, rfd, wfd, xfd, tmo); | 4527 | return select (n, rfd, wfd, xfd, tmo); |
| 4562 | } | 4528 | } |
| @@ -5261,15 +5227,13 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, | |||
| 5261 | /* Given a list (FUNCTION ARGS...), apply FUNCTION to the ARGS. */ | 5227 | /* Given a list (FUNCTION ARGS...), apply FUNCTION to the ARGS. */ |
| 5262 | 5228 | ||
| 5263 | static Lisp_Object | 5229 | static Lisp_Object |
| 5264 | read_process_output_call (fun_and_args) | 5230 | read_process_output_call (Lisp_Object fun_and_args) |
| 5265 | Lisp_Object fun_and_args; | ||
| 5266 | { | 5231 | { |
| 5267 | return apply1 (XCAR (fun_and_args), XCDR (fun_and_args)); | 5232 | return apply1 (XCAR (fun_and_args), XCDR (fun_and_args)); |
| 5268 | } | 5233 | } |
| 5269 | 5234 | ||
| 5270 | static Lisp_Object | 5235 | static Lisp_Object |
| 5271 | read_process_output_error_handler (error) | 5236 | read_process_output_error_handler (Lisp_Object error) |
| 5272 | Lisp_Object error; | ||
| 5273 | { | 5237 | { |
| 5274 | cmd_error_internal (error, "error in process filter: "); | 5238 | cmd_error_internal (error, "error in process filter: "); |
| 5275 | Vinhibit_quit = Qt; | 5239 | Vinhibit_quit = Qt; |
| @@ -5290,9 +5254,7 @@ read_process_output_error_handler (error) | |||
| 5290 | for decoding. */ | 5254 | for decoding. */ |
| 5291 | 5255 | ||
| 5292 | static int | 5256 | static int |
| 5293 | read_process_output (proc, channel) | 5257 | read_process_output (Lisp_Object proc, register int channel) |
| 5294 | Lisp_Object proc; | ||
| 5295 | register int channel; | ||
| 5296 | { | 5258 | { |
| 5297 | register int nbytes; | 5259 | register int nbytes; |
| 5298 | char *chars; | 5260 | char *chars; |
| @@ -5618,7 +5580,7 @@ jmp_buf send_process_frame; | |||
| 5618 | Lisp_Object process_sent_to; | 5580 | Lisp_Object process_sent_to; |
| 5619 | 5581 | ||
| 5620 | SIGTYPE | 5582 | SIGTYPE |
| 5621 | send_process_trap () | 5583 | send_process_trap (int ignore) |
| 5622 | { | 5584 | { |
| 5623 | SIGNAL_THREAD_CHECK (SIGPIPE); | 5585 | SIGNAL_THREAD_CHECK (SIGPIPE); |
| 5624 | sigunblock (sigmask (SIGPIPE)); | 5586 | sigunblock (sigmask (SIGPIPE)); |
| @@ -5636,11 +5598,8 @@ send_process_trap () | |||
| 5636 | This function can evaluate Lisp code and can garbage collect. */ | 5598 | This function can evaluate Lisp code and can garbage collect. */ |
| 5637 | 5599 | ||
| 5638 | static void | 5600 | static void |
| 5639 | send_process (proc, buf, len, object) | 5601 | send_process (volatile Lisp_Object proc, unsigned char *volatile buf, |
| 5640 | volatile Lisp_Object proc; | 5602 | volatile int len, volatile Lisp_Object object) |
| 5641 | unsigned char *volatile buf; | ||
| 5642 | volatile int len; | ||
| 5643 | volatile Lisp_Object object; | ||
| 5644 | { | 5603 | { |
| 5645 | /* Use volatile to protect variables from being clobbered by longjmp. */ | 5604 | /* Use volatile to protect variables from being clobbered by longjmp. */ |
| 5646 | struct Lisp_Process *p = XPROCESS (proc); | 5605 | struct Lisp_Process *p = XPROCESS (proc); |
| @@ -5927,8 +5886,7 @@ Output from processes can arrive in between bunches. */) | |||
| 5927 | /* Return the foreground process group for the tty/pty that | 5886 | /* Return the foreground process group for the tty/pty that |
| 5928 | the process P uses. */ | 5887 | the process P uses. */ |
| 5929 | static int | 5888 | static int |
| 5930 | emacs_get_tty_pgrp (p) | 5889 | emacs_get_tty_pgrp (struct Lisp_Process *p) |
| 5931 | struct Lisp_Process *p; | ||
| 5932 | { | 5890 | { |
| 5933 | int gid = -1; | 5891 | int gid = -1; |
| 5934 | 5892 | ||
| @@ -5997,11 +5955,8 @@ return t unconditionally. */) | |||
| 5997 | their uid, for which killpg would return an EPERM error. */ | 5955 | their uid, for which killpg would return an EPERM error. */ |
| 5998 | 5956 | ||
| 5999 | static void | 5957 | static void |
| 6000 | process_send_signal (process, signo, current_group, nomsg) | 5958 | process_send_signal (Lisp_Object process, int signo, Lisp_Object current_group, |
| 6001 | Lisp_Object process; | 5959 | int nomsg) |
| 6002 | int signo; | ||
| 6003 | Lisp_Object current_group; | ||
| 6004 | int nomsg; | ||
| 6005 | { | 5960 | { |
| 6006 | Lisp_Object proc; | 5961 | Lisp_Object proc; |
| 6007 | register struct Lisp_Process *p; | 5962 | register struct Lisp_Process *p; |
| @@ -6570,8 +6525,7 @@ process has been transmitted to the serial port. */) | |||
| 6570 | If `buffer' is nil, kill all processes */ | 6525 | If `buffer' is nil, kill all processes */ |
| 6571 | 6526 | ||
| 6572 | void | 6527 | void |
| 6573 | kill_buffer_processes (buffer) | 6528 | kill_buffer_processes (Lisp_Object buffer) |
| 6574 | Lisp_Object buffer; | ||
| 6575 | { | 6529 | { |
| 6576 | Lisp_Object tail, proc; | 6530 | Lisp_Object tail, proc; |
| 6577 | 6531 | ||
| @@ -6616,8 +6570,7 @@ kill_buffer_processes (buffer) | |||
| 6616 | 6570 | ||
| 6617 | #ifdef SIGCHLD | 6571 | #ifdef SIGCHLD |
| 6618 | SIGTYPE | 6572 | SIGTYPE |
| 6619 | sigchld_handler (signo) | 6573 | sigchld_handler (int signo) |
| 6620 | int signo; | ||
| 6621 | { | 6574 | { |
| 6622 | int old_errno = errno; | 6575 | int old_errno = errno; |
| 6623 | Lisp_Object proc; | 6576 | Lisp_Object proc; |
| @@ -6758,16 +6711,14 @@ sigchld_handler (signo) | |||
| 6758 | 6711 | ||
| 6759 | 6712 | ||
| 6760 | static Lisp_Object | 6713 | static Lisp_Object |
| 6761 | exec_sentinel_unwind (data) | 6714 | exec_sentinel_unwind (Lisp_Object data) |
| 6762 | Lisp_Object data; | ||
| 6763 | { | 6715 | { |
| 6764 | XPROCESS (XCAR (data))->sentinel = XCDR (data); | 6716 | XPROCESS (XCAR (data))->sentinel = XCDR (data); |
| 6765 | return Qnil; | 6717 | return Qnil; |
| 6766 | } | 6718 | } |
| 6767 | 6719 | ||
| 6768 | static Lisp_Object | 6720 | static Lisp_Object |
| 6769 | exec_sentinel_error_handler (error) | 6721 | exec_sentinel_error_handler (Lisp_Object error) |
| 6770 | Lisp_Object error; | ||
| 6771 | { | 6722 | { |
| 6772 | cmd_error_internal (error, "error in process sentinel: "); | 6723 | cmd_error_internal (error, "error in process sentinel: "); |
| 6773 | Vinhibit_quit = Qt; | 6724 | Vinhibit_quit = Qt; |
| @@ -6777,8 +6728,7 @@ exec_sentinel_error_handler (error) | |||
| 6777 | } | 6728 | } |
| 6778 | 6729 | ||
| 6779 | static void | 6730 | static void |
| 6780 | exec_sentinel (proc, reason) | 6731 | exec_sentinel (Lisp_Object proc, Lisp_Object reason) |
| 6781 | Lisp_Object proc, reason; | ||
| 6782 | { | 6732 | { |
| 6783 | Lisp_Object sentinel, obuffer, odeactivate, okeymap; | 6733 | Lisp_Object sentinel, obuffer, odeactivate, okeymap; |
| 6784 | register struct Lisp_Process *p = XPROCESS (proc); | 6734 | register struct Lisp_Process *p = XPROCESS (proc); |
| @@ -6863,8 +6813,7 @@ exec_sentinel (proc, reason) | |||
| 6863 | but can be done at other times. */ | 6813 | but can be done at other times. */ |
| 6864 | 6814 | ||
| 6865 | static void | 6815 | static void |
| 6866 | status_notify (deleting_process) | 6816 | status_notify (struct Lisp_Process *deleting_process) |
| 6867 | struct Lisp_Process *deleting_process; | ||
| 6868 | { | 6817 | { |
| 6869 | register Lisp_Object proc, buffer; | 6818 | register Lisp_Object proc, buffer; |
| 6870 | Lisp_Object tail, msg; | 6819 | Lisp_Object tail, msg; |
| @@ -7064,8 +7013,7 @@ DEFUN ("process-filter-multibyte-p", Fprocess_filter_multibyte_p, | |||
| 7064 | /* Add DESC to the set of keyboard input descriptors. */ | 7013 | /* Add DESC to the set of keyboard input descriptors. */ |
| 7065 | 7014 | ||
| 7066 | void | 7015 | void |
| 7067 | add_keyboard_wait_descriptor (desc) | 7016 | add_keyboard_wait_descriptor (int desc) |
| 7068 | int desc; | ||
| 7069 | { | 7017 | { |
| 7070 | FD_SET (desc, &input_wait_mask); | 7018 | FD_SET (desc, &input_wait_mask); |
| 7071 | FD_SET (desc, &non_process_wait_mask); | 7019 | FD_SET (desc, &non_process_wait_mask); |
| @@ -7076,8 +7024,7 @@ add_keyboard_wait_descriptor (desc) | |||
| 7076 | static int add_gpm_wait_descriptor_called_flag; | 7024 | static int add_gpm_wait_descriptor_called_flag; |
| 7077 | 7025 | ||
| 7078 | void | 7026 | void |
| 7079 | add_gpm_wait_descriptor (desc) | 7027 | add_gpm_wait_descriptor (int desc) |
| 7080 | int desc; | ||
| 7081 | { | 7028 | { |
| 7082 | if (! add_gpm_wait_descriptor_called_flag) | 7029 | if (! add_gpm_wait_descriptor_called_flag) |
| 7083 | FD_CLR (0, &input_wait_mask); | 7030 | FD_CLR (0, &input_wait_mask); |
| @@ -7091,8 +7038,7 @@ add_gpm_wait_descriptor (desc) | |||
| 7091 | /* From now on, do not expect DESC to give keyboard input. */ | 7038 | /* From now on, do not expect DESC to give keyboard input. */ |
| 7092 | 7039 | ||
| 7093 | void | 7040 | void |
| 7094 | delete_keyboard_wait_descriptor (desc) | 7041 | delete_keyboard_wait_descriptor (int desc) |
| 7095 | int desc; | ||
| 7096 | { | 7042 | { |
| 7097 | int fd; | 7043 | int fd; |
| 7098 | int lim = max_keyboard_desc; | 7044 | int lim = max_keyboard_desc; |
| @@ -7109,8 +7055,7 @@ delete_keyboard_wait_descriptor (desc) | |||
| 7109 | } | 7055 | } |
| 7110 | 7056 | ||
| 7111 | void | 7057 | void |
| 7112 | delete_gpm_wait_descriptor (desc) | 7058 | delete_gpm_wait_descriptor (int desc) |
| 7113 | int desc; | ||
| 7114 | { | 7059 | { |
| 7115 | int fd; | 7060 | int fd; |
| 7116 | int lim = max_gpm_desc; | 7061 | int lim = max_gpm_desc; |
| @@ -7130,8 +7075,7 @@ delete_gpm_wait_descriptor (desc) | |||
| 7130 | that corresponds to one of the keyboard input descriptors. */ | 7075 | that corresponds to one of the keyboard input descriptors. */ |
| 7131 | 7076 | ||
| 7132 | static int | 7077 | static int |
| 7133 | keyboard_bit_set (mask) | 7078 | keyboard_bit_set (fd_set *mask) |
| 7134 | SELECT_TYPE *mask; | ||
| 7135 | { | 7079 | { |
| 7136 | int fd; | 7080 | int fd; |
| 7137 | 7081 | ||
| @@ -7215,7 +7159,7 @@ integer or floating point values. | |||
| 7215 | } | 7159 | } |
| 7216 | 7160 | ||
| 7217 | void | 7161 | void |
| 7218 | init_process () | 7162 | init_process (void) |
| 7219 | { | 7163 | { |
| 7220 | register int i; | 7164 | register int i; |
| 7221 | 7165 | ||
| @@ -7318,7 +7262,7 @@ init_process () | |||
| 7318 | } | 7262 | } |
| 7319 | 7263 | ||
| 7320 | void | 7264 | void |
| 7321 | syms_of_process () | 7265 | syms_of_process (void) |
| 7322 | { | 7266 | { |
| 7323 | Qprocessp = intern_c_string ("processp"); | 7267 | Qprocessp = intern_c_string ("processp"); |
| 7324 | staticpro (&Qprocessp); | 7268 | staticpro (&Qprocessp); |