Mercurial > emacs
comparison src/process.c @ 21514:fa9ff387d260
Fix -Wimplicit warnings.
| author | Andreas Schwab <schwab@suse.de> |
|---|---|
| date | Tue, 14 Apr 1998 12:25:56 +0000 |
| parents | aac7354edaed |
| children | be8599b6636a |
comparison
equal
deleted
inserted
replaced
| 21513:984881b316fc | 21514:fa9ff387d260 |
|---|---|
| 104 #include "termhooks.h" | 104 #include "termhooks.h" |
| 105 #include "termopts.h" | 105 #include "termopts.h" |
| 106 #include "commands.h" | 106 #include "commands.h" |
| 107 #include "frame.h" | 107 #include "frame.h" |
| 108 #include "blockinput.h" | 108 #include "blockinput.h" |
| 109 #include "keyboard.h" | |
| 110 #include "dispextern.h" | |
| 109 | 111 |
| 110 #define max(a, b) ((a) > (b) ? (a) : (b)) | 112 #define max(a, b) ((a) > (b) ? (a) : (b)) |
| 111 | 113 |
| 112 Lisp_Object Qprocessp; | 114 Lisp_Object Qprocessp; |
| 113 Lisp_Object Qrun, Qstop, Qsignal, Qopen, Qclosed; | 115 Lisp_Object Qrun, Qstop, Qsignal, Qopen, Qclosed; |
| 277 /* Compute the Lisp form of the process status, p->status, from | 279 /* Compute the Lisp form of the process status, p->status, from |
| 278 the numeric status that was returned by `wait'. */ | 280 the numeric status that was returned by `wait'. */ |
| 279 | 281 |
| 280 Lisp_Object status_convert (); | 282 Lisp_Object status_convert (); |
| 281 | 283 |
| 284 void | |
| 282 update_status (p) | 285 update_status (p) |
| 283 struct Lisp_Process *p; | 286 struct Lisp_Process *p; |
| 284 { | 287 { |
| 285 union { int i; WAITTYPE wt; } u; | 288 union { int i; WAITTYPE wt; } u; |
| 286 u.i = XFASTINT (p->raw_status_low) + (XFASTINT (p->raw_status_high) << 16); | 289 u.i = XFASTINT (p->raw_status_low) + (XFASTINT (p->raw_status_high) << 16); |
| 389 | 392 |
| 390 int | 393 int |
| 391 allocate_pty () | 394 allocate_pty () |
| 392 { | 395 { |
| 393 struct stat stb; | 396 struct stat stb; |
| 394 register c, i; | 397 register int c, i; |
| 395 int fd; | 398 int fd; |
| 396 | 399 |
| 397 /* Some systems name their pseudoterminals so that there are gaps in | 400 /* Some systems name their pseudoterminals so that there are gaps in |
| 398 the usual sequence - for example, on HP9000/S700 systems, there | 401 the usual sequence - for example, on HP9000/S700 systems, there |
| 399 are no pseudoterminals with names ending in 'f'. So we wait for | 402 are no pseudoterminals with names ending in 'f'. So we wait for |
| 510 XSETPROCESS (val, p); | 513 XSETPROCESS (val, p); |
| 511 Vprocess_alist = Fcons (Fcons (name, val), Vprocess_alist); | 514 Vprocess_alist = Fcons (Fcons (name, val), Vprocess_alist); |
| 512 return val; | 515 return val; |
| 513 } | 516 } |
| 514 | 517 |
| 518 void | |
| 515 remove_process (proc) | 519 remove_process (proc) |
| 516 register Lisp_Object proc; | 520 register Lisp_Object proc; |
| 517 { | 521 { |
| 518 register Lisp_Object pair; | 522 register Lisp_Object pair; |
| 519 | 523 |
| 2171 For that purpose, this must be 0 | 2175 For that purpose, this must be 0 |
| 2172 when not inside wait_reading_process_input. */ | 2176 when not inside wait_reading_process_input. */ |
| 2173 static int waiting_for_user_input_p; | 2177 static int waiting_for_user_input_p; |
| 2174 | 2178 |
| 2175 /* This is here so breakpoints can be put on it. */ | 2179 /* This is here so breakpoints can be put on it. */ |
| 2176 static | 2180 static void |
| 2177 wait_reading_process_input_1 () | 2181 wait_reading_process_input_1 () |
| 2178 { | 2182 { |
| 2179 } | 2183 } |
| 2180 | 2184 |
| 2181 /* Read and dispose of subprocess output while waiting for timeout to | 2185 /* Read and dispose of subprocess output while waiting for timeout to |
| 2208 If READ_KBD is a pointer to a struct Lisp_Process, then the | 2212 If READ_KBD is a pointer to a struct Lisp_Process, then the |
| 2209 function returns true iff we received input from that process | 2213 function returns true iff we received input from that process |
| 2210 before the timeout elapsed. | 2214 before the timeout elapsed. |
| 2211 Otherwise, return true iff we received input from any process. */ | 2215 Otherwise, return true iff we received input from any process. */ |
| 2212 | 2216 |
| 2217 int | |
| 2213 wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | 2218 wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) |
| 2214 int time_limit, microsecs; | 2219 int time_limit, microsecs; |
| 2215 Lisp_Object read_kbd; | 2220 Lisp_Object read_kbd; |
| 2216 int do_display; | 2221 int do_display; |
| 2217 { | 2222 { |
| 2706 you must call it repeatedly until it returns zero. | 2711 you must call it repeatedly until it returns zero. |
| 2707 | 2712 |
| 2708 The characters read are decoded according to PROC's coding-system | 2713 The characters read are decoded according to PROC's coding-system |
| 2709 for decoding. */ | 2714 for decoding. */ |
| 2710 | 2715 |
| 2716 int | |
| 2711 read_process_output (proc, channel) | 2717 read_process_output (proc, channel) |
| 2712 Lisp_Object proc; | 2718 Lisp_Object proc; |
| 2713 register int channel; | 2719 register int channel; |
| 2714 { | 2720 { |
| 2715 register int nchars, nbytes; | 2721 register int nchars, nbytes; |
| 3060 is sent. But if the data ends at the middle of multi-byte | 3066 is sent. But if the data ends at the middle of multi-byte |
| 3061 representation, that incomplete sequence of bytes are sent without | 3067 representation, that incomplete sequence of bytes are sent without |
| 3062 being encoded. Should we store them in a buffer to prepend them to | 3068 being encoded. Should we store them in a buffer to prepend them to |
| 3063 the data send later? */ | 3069 the data send later? */ |
| 3064 | 3070 |
| 3071 void | |
| 3065 send_process (proc, buf, len, object) | 3072 send_process (proc, buf, len, object) |
| 3066 volatile Lisp_Object proc; | 3073 volatile Lisp_Object proc; |
| 3067 unsigned char *buf; | 3074 unsigned char *buf; |
| 3068 int len; | 3075 int len; |
| 3069 Lisp_Object object; | 3076 Lisp_Object object; |
| 4287 return 1; | 4294 return 1; |
| 4288 | 4295 |
| 4289 return 0; | 4296 return 0; |
| 4290 } | 4297 } |
| 4291 | 4298 |
| 4299 void | |
| 4292 init_process () | 4300 init_process () |
| 4293 { | 4301 { |
| 4294 register int i; | 4302 register int i; |
| 4295 | 4303 |
| 4296 #ifdef SIGCHLD | 4304 #ifdef SIGCHLD |
| 4315 } | 4323 } |
| 4316 bzero (proc_decode_coding_system, sizeof proc_decode_coding_system); | 4324 bzero (proc_decode_coding_system, sizeof proc_decode_coding_system); |
| 4317 bzero (proc_encode_coding_system, sizeof proc_encode_coding_system); | 4325 bzero (proc_encode_coding_system, sizeof proc_encode_coding_system); |
| 4318 } | 4326 } |
| 4319 | 4327 |
| 4328 void | |
| 4320 syms_of_process () | 4329 syms_of_process () |
| 4321 { | 4330 { |
| 4322 Qprocessp = intern ("processp"); | 4331 Qprocessp = intern ("processp"); |
| 4323 staticpro (&Qprocessp); | 4332 staticpro (&Qprocessp); |
| 4324 Qrun = intern ("run"); | 4333 Qrun = intern ("run"); |
