Mercurial > emacs
comparison src/callproc.c @ 21514:fa9ff387d260
Fix -Wimplicit warnings.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Tue, 14 Apr 1998 12:25:56 +0000 |
parents | 1361a790bca8 |
children | 62a4efbdc4b4 |
comparison
equal
deleted
inserted
replaced
21513:984881b316fc | 21514:fa9ff387d260 |
---|---|
912 RETURN_UNGCPRO (unbind_to (count, Fcall_process (nargs - 2, args + 2))); | 912 RETURN_UNGCPRO (unbind_to (count, Fcall_process (nargs - 2, args + 2))); |
913 } | 913 } |
914 | 914 |
915 #ifndef VMS /* VMS version is in vmsproc.c. */ | 915 #ifndef VMS /* VMS version is in vmsproc.c. */ |
916 | 916 |
917 static int relocate_fd (); | |
918 | |
917 /* This is the last thing run in a newly forked inferior | 919 /* This is the last thing run in a newly forked inferior |
918 either synchronous or asynchronous. | 920 either synchronous or asynchronous. |
919 Copy descriptors IN, OUT and ERR as descriptors 0, 1 and 2. | 921 Copy descriptors IN, OUT and ERR as descriptors 0, 1 and 2. |
920 Initialize inferior's priority, pgrp, connected dir and environment. | 922 Initialize inferior's priority, pgrp, connected dir and environment. |
921 then exec another program based on new_argv. | 923 then exec another program based on new_argv. |
932 CURRENT_DIR is an elisp string giving the path of the current | 934 CURRENT_DIR is an elisp string giving the path of the current |
933 directory the subprocess should have. Since we can't really signal | 935 directory the subprocess should have. Since we can't really signal |
934 a decent error from within the child, this should be verified as an | 936 a decent error from within the child, this should be verified as an |
935 executable directory by the parent. */ | 937 executable directory by the parent. */ |
936 | 938 |
939 int | |
937 child_setup (in, out, err, new_argv, set_pgrp, current_dir) | 940 child_setup (in, out, err, new_argv, set_pgrp, current_dir) |
938 int in, out, err; | 941 int in, out, err; |
939 register char **new_argv; | 942 register char **new_argv; |
940 int set_pgrp; | 943 int set_pgrp; |
941 Lisp_Object current_dir; | 944 Lisp_Object current_dir; |
1128 #endif /* not MSDOS */ | 1131 #endif /* not MSDOS */ |
1129 } | 1132 } |
1130 | 1133 |
1131 /* Move the file descriptor FD so that its number is not less than MINFD. | 1134 /* Move the file descriptor FD so that its number is not less than MINFD. |
1132 If the file descriptor is moved at all, the original is freed. */ | 1135 If the file descriptor is moved at all, the original is freed. */ |
1133 int | 1136 static int |
1134 relocate_fd (fd, minfd) | 1137 relocate_fd (fd, minfd) |
1135 int fd, minfd; | 1138 int fd, minfd; |
1136 { | 1139 { |
1137 if (fd >= minfd) | 1140 if (fd >= minfd) |
1138 return fd; | 1141 return fd; |
1226 | 1229 |
1227 #endif /* not VMS */ | 1230 #endif /* not VMS */ |
1228 | 1231 |
1229 /* This is run before init_cmdargs. */ | 1232 /* This is run before init_cmdargs. */ |
1230 | 1233 |
1234 void | |
1231 init_callproc_1 () | 1235 init_callproc_1 () |
1232 { | 1236 { |
1233 char *data_dir = egetenv ("EMACSDATA"); | 1237 char *data_dir = egetenv ("EMACSDATA"); |
1234 char *doc_dir = egetenv ("EMACSDOC"); | 1238 char *doc_dir = egetenv ("EMACSDOC"); |
1235 | 1239 |
1247 Vexec_path = nconc2 (decode_env_path ("PATH", ""), Vexec_path); | 1251 Vexec_path = nconc2 (decode_env_path ("PATH", ""), Vexec_path); |
1248 } | 1252 } |
1249 | 1253 |
1250 /* This is run after init_cmdargs, when Vinstallation_directory is valid. */ | 1254 /* This is run after init_cmdargs, when Vinstallation_directory is valid. */ |
1251 | 1255 |
1256 void | |
1252 init_callproc () | 1257 init_callproc () |
1253 { | 1258 { |
1254 char *data_dir = egetenv ("EMACSDATA"); | 1259 char *data_dir = egetenv ("EMACSDATA"); |
1255 | 1260 |
1256 register char * sh; | 1261 register char * sh; |
1339 else | 1344 else |
1340 Vtemp_file_name_pattern = build_string ("/tmp/emacsXXXXXX"); | 1345 Vtemp_file_name_pattern = build_string ("/tmp/emacsXXXXXX"); |
1341 #endif | 1346 #endif |
1342 } | 1347 } |
1343 | 1348 |
1349 void | |
1344 set_process_environment () | 1350 set_process_environment () |
1345 { | 1351 { |
1346 register char **envp; | 1352 register char **envp; |
1347 | 1353 |
1348 Vprocess_environment = Qnil; | 1354 Vprocess_environment = Qnil; |
1352 for (envp = environ; *envp; envp++) | 1358 for (envp = environ; *envp; envp++) |
1353 Vprocess_environment = Fcons (build_string (*envp), | 1359 Vprocess_environment = Fcons (build_string (*envp), |
1354 Vprocess_environment); | 1360 Vprocess_environment); |
1355 } | 1361 } |
1356 | 1362 |
1363 void | |
1357 syms_of_callproc () | 1364 syms_of_callproc () |
1358 { | 1365 { |
1359 #ifdef DOS_NT | 1366 #ifdef DOS_NT |
1360 Qbuffer_file_type = intern ("buffer-file-type"); | 1367 Qbuffer_file_type = intern ("buffer-file-type"); |
1361 staticpro (&Qbuffer_file_type); | 1368 staticpro (&Qbuffer_file_type); |