Mercurial > hg > xemacs-beta
comparison src/process.c @ 854:1d8fb2eee1bb
[xemacs-hg @ 2002-05-28 16:06:58 by didierv]
Fix header inclusion order
author | didierv |
---|---|
date | Tue, 28 May 2002 16:07:03 +0000 |
parents | 2b6fa2618f76 |
children | 84762348c6f9 |
comparison
equal
deleted
inserted
replaced
853:2b6fa2618f76 | 854:1d8fb2eee1bb |
---|---|
55 #include "procimpl.h" | 55 #include "procimpl.h" |
56 #include "sysdep.h" | 56 #include "sysdep.h" |
57 #include "window.h" | 57 #include "window.h" |
58 | 58 |
59 #include "sysfile.h" | 59 #include "sysfile.h" |
60 #include "syssignal.h" /* Always include before sysproc.h and systty.h | |
61 -- didier */ | |
60 #include "sysproc.h" | 62 #include "sysproc.h" |
61 #include "syssignal.h" | |
62 #include "systime.h" | 63 #include "systime.h" |
63 #include "systty.h" | 64 #include "systty.h" |
64 #include "syswait.h" | 65 #include "syswait.h" |
65 | 66 |
66 Lisp_Object Qprocessp, Qprocess_live_p; | 67 Lisp_Object Qprocessp, Qprocess_live_p; |
992 set_buffer_internal (buf); | 993 set_buffer_internal (buf); |
993 } | 994 } |
994 | 995 |
995 record_unwind_protect (save_excursion_restore, save_excursion_save ()); | 996 record_unwind_protect (save_excursion_restore, save_excursion_save ()); |
996 specbind (Qinhibit_read_only, Qt); | 997 specbind (Qinhibit_read_only, Qt); |
997 | 998 |
998 /* Insert new output into buffer | 999 /* Insert new output into buffer |
999 at the current end-of-output marker, | 1000 at the current end-of-output marker, |
1000 thus preserving logical ordering of input and output. */ | 1001 thus preserving logical ordering of input and output. */ |
1001 if (XMARKER (mark)->buffer) | 1002 if (XMARKER (mark)->buffer) |
1002 output_pt = marker_position (mark); | 1003 output_pt = marker_position (mark); |
1282 } | 1283 } |
1283 | 1284 |
1284 DEFUN ("set-process-filter", Fset_process_filter, 2, 2, 0, /* | 1285 DEFUN ("set-process-filter", Fset_process_filter, 2, 2, 0, /* |
1285 Give PROCESS the filter function FILTER; nil means no filter. | 1286 Give PROCESS the filter function FILTER; nil means no filter. |
1286 t means stop accepting output from the process. (If process was created | 1287 t means stop accepting output from the process. (If process was created |
1287 with | 1288 with |
1288 When a process has a filter, each time it does output | 1289 When a process has a filter, each time it does output |
1289 the entire string of output is passed to the filter. | 1290 the entire string of output is passed to the filter. |
1290 The filter gets two arguments: the process and the string of output. | 1291 The filter gets two arguments: the process and the string of output. |
1291 If the process has a filter, its buffer is not used for output. | 1292 If the process has a filter, its buffer is not used for output. |
1292 */ | 1293 */ |
2321 | 2322 |
2322 FSF has this as a Lisp function, as follows. Generally moving things | 2323 FSF has this as a Lisp function, as follows. Generally moving things |
2323 out of C and into Lisp is a good idea, but in this case the Lisp | 2324 out of C and into Lisp is a good idea, but in this case the Lisp |
2324 function is used so early in the startup sequence that it would be ugly | 2325 function is used so early in the startup sequence that it would be ugly |
2325 to rearrange the early dumped code to accommodate this. | 2326 to rearrange the early dumped code to accommodate this. |
2326 | 2327 |
2327 (defun getenv (variable) | 2328 (defun getenv (variable) |
2328 "Get the value of environment variable VARIABLE. | 2329 "Get the value of environment variable VARIABLE. |
2329 VARIABLE should be a string. Value is nil if VARIABLE is undefined in | 2330 VARIABLE should be a string. Value is nil if VARIABLE is undefined in |
2330 the environment. Otherwise, value is a string. | 2331 the environment. Otherwise, value is a string. |
2331 | 2332 |
2419 | 2420 |
2420 if (usid_to_process) | 2421 if (usid_to_process) |
2421 clrhash (usid_to_process); | 2422 clrhash (usid_to_process); |
2422 else | 2423 else |
2423 usid_to_process = make_hash_table (32); | 2424 usid_to_process = make_hash_table (32); |
2424 | 2425 |
2425 { | 2426 { |
2426 /* jwz: always initialize Vprocess_environment, so that egetenv() | 2427 /* jwz: always initialize Vprocess_environment, so that egetenv() |
2427 works in temacs. */ | 2428 works in temacs. */ |
2428 char **envp; | 2429 char **envp; |
2429 Vprocess_environment = Qnil; | 2430 Vprocess_environment = Qnil; |
2449 | 2450 |
2450 #if 0 /* defined (WIN32_NATIVE) */ | 2451 #if 0 /* defined (WIN32_NATIVE) */ |
2451 /* BAD BAD BAD. We do not wanting to be passing an XEmacs-created | 2452 /* BAD BAD BAD. We do not wanting to be passing an XEmacs-created |
2452 SHELL var down to some inferior Cygwin process, which might get | 2453 SHELL var down to some inferior Cygwin process, which might get |
2453 screwed up. | 2454 screwed up. |
2454 | 2455 |
2455 There are a few broken apps (eterm/term.el, eterm/tshell.el, | 2456 There are a few broken apps (eterm/term.el, eterm/tshell.el, |
2456 os-utils/terminal.el, texinfo/tex-mode.el) where this will | 2457 os-utils/terminal.el, texinfo/tex-mode.el) where this will |
2457 cause problems. Those broken apps don't look at | 2458 cause problems. Those broken apps don't look at |
2458 shell-file-name, instead just at explicit-shell-file-name, | 2459 shell-file-name, instead just at explicit-shell-file-name, |
2459 ESHELL and SHELL. They are apparently attempting to borrow | 2460 ESHELL and SHELL. They are apparently attempting to borrow |
2460 what `M-x shell' uses, but that latter also looks at | 2461 what `M-x shell' uses, but that latter also looks at |
2461 shell-file-name. What we want is for all of these apps to look | 2462 shell-file-name. What we want is for all of these apps to look |
2462 at shell-file-name, so that the user can change the value of | 2463 at shell-file-name, so that the user can change the value of |
2463 shell-file-name and everything will work out hunky-dorey. | 2464 shell-file-name and everything will work out hunky-dorey. |
2464 */ | 2465 */ |
2465 | 2466 |
2466 if (!egetenv ("SHELL")) | 2467 if (!egetenv ("SHELL")) |
2467 { | 2468 { |
2468 Intbyte *faux_var = alloca_array (Intbyte, 7 + qxestrlen (shell)); | 2469 Intbyte *faux_var = alloca_array (Intbyte, 7 + qxestrlen (shell)); |
2469 qxesprintf (faux_var, "SHELL=%s", shell); | 2470 qxesprintf (faux_var, "SHELL=%s", shell); |
2470 Vprocess_environment = Fcons (build_intstring (faux_var), | 2471 Vprocess_environment = Fcons (build_intstring (faux_var), |