diff options
| author | Ian Kelling | 2015-07-05 15:35:23 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-07-05 19:21:49 -0700 |
| commit | 082eda1cbebfc4a71c4b721b38be67aa2de6441e (patch) | |
| tree | a05591d8bb0d5f61288a276c466b0571008304be /src | |
| parent | 5dc66dbc15ad64b59bcb0943fa16961efc84e822 (diff) | |
| download | emacs-082eda1cbebfc4a71c4b721b38be67aa2de6441e.tar.gz emacs-082eda1cbebfc4a71c4b721b38be67aa2de6441e.zip | |
; Rename local var to match function name
* src/process.c (wait_reading_process_output, status_notify):
Previously the function wait_reading_process_input was renamed to the
more logical wait_reading_process_output. Make its local variables
consistent with that change (Bug#20978).
Diffstat (limited to 'src')
| -rw-r--r-- | src/process.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/process.c b/src/process.c index 50fa2743fd6..2bac386139d 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -4586,7 +4586,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4586 | int xerrno; | 4586 | int xerrno; |
| 4587 | Lisp_Object proc; | 4587 | Lisp_Object proc; |
| 4588 | struct timespec timeout, end_time; | 4588 | struct timespec timeout, end_time; |
| 4589 | int got_some_input = -1; | 4589 | int got_some_output = -1; |
| 4590 | ptrdiff_t count = SPECPDL_INDEX (); | 4590 | ptrdiff_t count = SPECPDL_INDEX (); |
| 4591 | 4591 | ||
| 4592 | FD_ZERO (&Available); | 4592 | FD_ZERO (&Available); |
| @@ -4634,7 +4634,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4634 | break; | 4634 | break; |
| 4635 | 4635 | ||
| 4636 | /* After reading input, vacuum up any leftovers without waiting. */ | 4636 | /* After reading input, vacuum up any leftovers without waiting. */ |
| 4637 | if (0 <= got_some_input) | 4637 | if (0 <= got_some_output) |
| 4638 | nsecs = -1; | 4638 | nsecs = -1; |
| 4639 | 4639 | ||
| 4640 | /* Compute time from now till when time limit is up. */ | 4640 | /* Compute time from now till when time limit is up. */ |
| @@ -4755,7 +4755,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4755 | /* It's okay for us to do this and then continue with | 4755 | /* It's okay for us to do this and then continue with |
| 4756 | the loop, since timeout has already been zeroed out. */ | 4756 | the loop, since timeout has already been zeroed out. */ |
| 4757 | clear_waiting_for_input (); | 4757 | clear_waiting_for_input (); |
| 4758 | got_some_input = status_notify (NULL, wait_proc); | 4758 | got_some_output = status_notify (NULL, wait_proc); |
| 4759 | if (do_display) redisplay_preserve_echo_area (13); | 4759 | if (do_display) redisplay_preserve_echo_area (13); |
| 4760 | } | 4760 | } |
| 4761 | } | 4761 | } |
| @@ -4791,8 +4791,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4791 | } | 4791 | } |
| 4792 | else | 4792 | else |
| 4793 | { | 4793 | { |
| 4794 | if (got_some_input < nread) | 4794 | if (got_some_output < nread) |
| 4795 | got_some_input = nread; | 4795 | got_some_output = nread; |
| 4796 | if (nread == 0) | 4796 | if (nread == 0) |
| 4797 | break; | 4797 | break; |
| 4798 | read_some_bytes = true; | 4798 | read_some_bytes = true; |
| @@ -5089,8 +5089,9 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 5089 | buffered-ahead character if we have one. */ | 5089 | buffered-ahead character if we have one. */ |
| 5090 | 5090 | ||
| 5091 | nread = read_process_output (proc, channel); | 5091 | nread = read_process_output (proc, channel); |
| 5092 | if ((!wait_proc || wait_proc == XPROCESS (proc)) && got_some_input < nread) | 5092 | if ((!wait_proc || wait_proc == XPROCESS (proc)) |
| 5093 | got_some_input = nread; | 5093 | && got_some_output < nread) |
| 5094 | got_some_output = nread; | ||
| 5094 | if (nread > 0) | 5095 | if (nread > 0) |
| 5095 | { | 5096 | { |
| 5096 | /* Since read_process_output can run a filter, | 5097 | /* Since read_process_output can run a filter, |
| @@ -5250,7 +5251,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 5250 | QUIT; | 5251 | QUIT; |
| 5251 | } | 5252 | } |
| 5252 | 5253 | ||
| 5253 | return got_some_input; | 5254 | return got_some_output; |
| 5254 | } | 5255 | } |
| 5255 | 5256 | ||
| 5256 | /* Given a list (FUNCTION ARGS...), apply FUNCTION to the ARGS. */ | 5257 | /* Given a list (FUNCTION ARGS...), apply FUNCTION to the ARGS. */ |
| @@ -6659,7 +6660,7 @@ status_notify (struct Lisp_Process *deleting_process, | |||
| 6659 | Lisp_Object proc; | 6660 | Lisp_Object proc; |
| 6660 | Lisp_Object tail, msg; | 6661 | Lisp_Object tail, msg; |
| 6661 | struct gcpro gcpro1, gcpro2; | 6662 | struct gcpro gcpro1, gcpro2; |
| 6662 | int got_some_input = -1; | 6663 | int got_some_output = -1; |
| 6663 | 6664 | ||
| 6664 | tail = Qnil; | 6665 | tail = Qnil; |
| 6665 | msg = Qnil; | 6666 | msg = Qnil; |
| @@ -6693,8 +6694,8 @@ status_notify (struct Lisp_Process *deleting_process, | |||
| 6693 | { | 6694 | { |
| 6694 | int nread = read_process_output (proc, p->infd); | 6695 | int nread = read_process_output (proc, p->infd); |
| 6695 | if ((!wait_proc || wait_proc == XPROCESS (proc)) | 6696 | if ((!wait_proc || wait_proc == XPROCESS (proc)) |
| 6696 | && got_some_input < nread) | 6697 | && got_some_output < nread) |
| 6697 | got_some_input = nread; | 6698 | got_some_output = nread; |
| 6698 | if (nread <= 0) | 6699 | if (nread <= 0) |
| 6699 | break; | 6700 | break; |
| 6700 | } | 6701 | } |
| @@ -6729,7 +6730,7 @@ status_notify (struct Lisp_Process *deleting_process, | |||
| 6729 | 6730 | ||
| 6730 | update_mode_lines = 24; /* In case buffers use %s in mode-line-format. */ | 6731 | update_mode_lines = 24; /* In case buffers use %s in mode-line-format. */ |
| 6731 | UNGCPRO; | 6732 | UNGCPRO; |
| 6732 | return got_some_input; | 6733 | return got_some_output; |
| 6733 | } | 6734 | } |
| 6734 | 6735 | ||
| 6735 | DEFUN ("internal-default-process-sentinel", Finternal_default_process_sentinel, | 6736 | DEFUN ("internal-default-process-sentinel", Finternal_default_process_sentinel, |