aboutsummaryrefslogtreecommitdiffstats
path: root/src/callproc.c
diff options
context:
space:
mode:
authorTom Tromey2012-09-04 10:10:06 -0600
committerTom Tromey2012-09-04 10:10:06 -0600
commitbf69f522a9e135f9aa483cedd53e71e915f2bf75 (patch)
tree3f73c47fb863ef87f420de1d30858da821072bd9 /src/callproc.c
parent303324a9232dbc89369faceb6b3530740d0fc1bd (diff)
parent6ec9a5a7b5efb129807f567709ca858211ed7840 (diff)
downloademacs-bf69f522a9e135f9aa483cedd53e71e915f2bf75.tar.gz
emacs-bf69f522a9e135f9aa483cedd53e71e915f2bf75.zip
merge from trunk
Diffstat (limited to 'src/callproc.c')
-rw-r--r--src/callproc.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/callproc.c b/src/callproc.c
index 4bf1da04e1a..2e9a8950700 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -77,7 +77,7 @@ static Lisp_Object Vtemp_file_name_pattern;
77 77
78/* True if we are about to fork off a synchronous process or if we 78/* True if we are about to fork off a synchronous process or if we
79 are waiting for it. */ 79 are waiting for it. */
80int synch_process_alive; 80bool synch_process_alive;
81 81
82/* Nonzero => this is a string explaining death of synchronous subprocess. */ 82/* Nonzero => this is a string explaining death of synchronous subprocess. */
83const char *synch_process_death; 83const char *synch_process_death;
@@ -94,8 +94,8 @@ int synch_process_retcode;
94 On MSDOS, delete the temporary file on any kind of termination. 94 On MSDOS, delete the temporary file on any kind of termination.
95 On Unix, kill the process and any children on termination by signal. */ 95 On Unix, kill the process and any children on termination by signal. */
96 96
97/* Nonzero if this is termination due to exit. */ 97/* True if this is termination due to exit. */
98static int call_process_exited; 98static bool call_process_exited;
99 99
100static Lisp_Object 100static Lisp_Object
101call_process_kill (Lisp_Object fdpid) 101call_process_kill (Lisp_Object fdpid)
@@ -190,7 +190,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
190 (ptrdiff_t nargs, Lisp_Object *args) 190 (ptrdiff_t nargs, Lisp_Object *args)
191{ 191{
192 Lisp_Object infile, buffer, current_dir, path, cleanup_info_tail; 192 Lisp_Object infile, buffer, current_dir, path, cleanup_info_tail;
193 int display_p; 193 bool display_p;
194 int fd[2]; 194 int fd[2];
195 int filefd; 195 int filefd;
196#define CALLPROC_BUFFER_SIZE_MIN (16 * 1024) 196#define CALLPROC_BUFFER_SIZE_MIN (16 * 1024)
@@ -217,7 +217,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
217 struct coding_system argument_coding; /* coding-system of arguments */ 217 struct coding_system argument_coding; /* coding-system of arguments */
218 /* Set to the return value of Ffind_operation_coding_system. */ 218 /* Set to the return value of Ffind_operation_coding_system. */
219 Lisp_Object coding_systems; 219 Lisp_Object coding_systems;
220 int output_to_buffer = 1; 220 bool output_to_buffer = 1;
221 221
222 /* Qt denotes that Ffind_operation_coding_system is not yet called. */ 222 /* Qt denotes that Ffind_operation_coding_system is not yet called. */
223 coding_systems = Qt; 223 coding_systems = Qt;
@@ -241,7 +241,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
241 /* If arguments are supplied, we may have to encode them. */ 241 /* If arguments are supplied, we may have to encode them. */
242 if (nargs >= 5) 242 if (nargs >= 5)
243 { 243 {
244 int must_encode = 0; 244 bool must_encode = 0;
245 Lisp_Object coding_attrs; 245 Lisp_Object coding_attrs;
246 246
247 for (i = 4; i < nargs; i++) 247 for (i = 4; i < nargs; i++)
@@ -610,12 +610,12 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
610 Lisp_Object volatile buffer_volatile = buffer; 610 Lisp_Object volatile buffer_volatile = buffer;
611 Lisp_Object volatile coding_systems_volatile = coding_systems; 611 Lisp_Object volatile coding_systems_volatile = coding_systems;
612 Lisp_Object volatile current_dir_volatile = current_dir; 612 Lisp_Object volatile current_dir_volatile = current_dir;
613 int volatile display_p_volatile = display_p; 613 bool volatile display_p_volatile = display_p;
614 bool volatile output_to_buffer_volatile = output_to_buffer;
615 bool volatile sa_must_free_volatile = sa_must_free;
614 int volatile fd1_volatile = fd1; 616 int volatile fd1_volatile = fd1;
615 int volatile fd_error_volatile = fd_error; 617 int volatile fd_error_volatile = fd_error;
616 int volatile fd_output_volatile = fd_output; 618 int volatile fd_output_volatile = fd_output;
617 int volatile output_to_buffer_volatile = output_to_buffer;
618 int volatile sa_must_free_volatile = sa_must_free;
619 ptrdiff_t volatile sa_count_volatile = sa_count; 619 ptrdiff_t volatile sa_count_volatile = sa_count;
620 unsigned char const **volatile new_argv_volatile = new_argv; 620 unsigned char const **volatile new_argv_volatile = new_argv;
621 621
@@ -766,11 +766,11 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
766 766
767 if (output_to_buffer) 767 if (output_to_buffer)
768 { 768 {
769 register int nread; 769 int nread;
770 int first = 1; 770 bool first = 1;
771 EMACS_INT total_read = 0; 771 EMACS_INT total_read = 0;
772 int carryover = 0; 772 int carryover = 0;
773 int display_on_the_fly = display_p; 773 bool display_on_the_fly = display_p;
774 struct coding_system saved_coding; 774 struct coding_system saved_coding;
775 775
776 saved_coding = process_coding; 776 saved_coding = process_coding;
@@ -1086,7 +1086,7 @@ static char **
1086add_env (char **env, char **new_env, char *string) 1086add_env (char **env, char **new_env, char *string)
1087{ 1087{
1088 char **ep; 1088 char **ep;
1089 int ok = 1; 1089 bool ok = 1;
1090 if (string == NULL) 1090 if (string == NULL)
1091 return new_env; 1091 return new_env;
1092 1092
@@ -1126,8 +1126,7 @@ add_env (char **env, char **new_env, char *string)
1126 Therefore, the superior process must save and restore the value 1126 Therefore, the superior process must save and restore the value
1127 of environ around the vfork and the call to this function. 1127 of environ around the vfork and the call to this function.
1128 1128
1129 SET_PGRP is nonzero if we should put the subprocess into a separate 1129 If SET_PGRP, put the subprocess into a separate process group.
1130 process group.
1131 1130
1132 CURRENT_DIR is an elisp string giving the path of the current 1131 CURRENT_DIR is an elisp string giving the path of the current
1133 directory the subprocess should have. Since we can't really signal 1132 directory the subprocess should have. Since we can't really signal
@@ -1135,7 +1134,8 @@ add_env (char **env, char **new_env, char *string)
1135 executable directory by the parent. */ 1134 executable directory by the parent. */
1136 1135
1137int 1136int
1138child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, Lisp_Object current_dir) 1137child_setup (int in, int out, int err, char **new_argv, bool set_pgrp,
1138 Lisp_Object current_dir)
1139{ 1139{
1140 char **env; 1140 char **env;
1141 char *pwd_var; 1141 char *pwd_var;
@@ -1394,7 +1394,7 @@ relocate_fd (int fd, int minfd)
1394} 1394}
1395#endif /* not WINDOWSNT */ 1395#endif /* not WINDOWSNT */
1396 1396
1397static int 1397static bool
1398getenv_internal_1 (const char *var, ptrdiff_t varlen, char **value, 1398getenv_internal_1 (const char *var, ptrdiff_t varlen, char **value,
1399 ptrdiff_t *valuelen, Lisp_Object env) 1399 ptrdiff_t *valuelen, Lisp_Object env)
1400{ 1400{
@@ -1429,7 +1429,7 @@ getenv_internal_1 (const char *var, ptrdiff_t varlen, char **value,
1429 return 0; 1429 return 0;
1430} 1430}
1431 1431
1432static int 1432static bool
1433getenv_internal (const char *var, ptrdiff_t varlen, char **value, 1433getenv_internal (const char *var, ptrdiff_t varlen, char **value,
1434 ptrdiff_t *valuelen, Lisp_Object frame) 1434 ptrdiff_t *valuelen, Lisp_Object frame)
1435{ 1435{