[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108976: * process.c (wait_reading_pr
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108976: * process.c (wait_reading_process_output): 'waitchannels' was unset |
Date: |
Mon, 09 Jul 2012 14:12:08 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108976
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Mon 2012-07-09 14:12:08 -0700
message:
* process.c (wait_reading_process_output): 'waitchannels' was unset
when read_kbd || !NILP (wait_for_cell); fix this.
modified:
src/ChangeLog
src/process.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-07-09 16:38:45 +0000
+++ b/src/ChangeLog 2012-07-09 21:12:08 +0000
@@ -1,5 +1,8 @@
2012-07-09 Paul Eggert <address@hidden>
+ * process.c (wait_reading_process_output): 'waitchannels' was unset
+ when read_kbd || !NILP (wait_for_cell); fix this.
+
Add GCC-style 'const' attribute to functions that can use it.
* character.h (char_resolve_modifier_mask):
* keyboard.h (make_ctrl_char):
=== modified file 'src/process.c'
--- a/src/process.c 2012-07-09 12:02:27 +0000
+++ b/src/process.c 2012-07-09 21:12:08 +0000
@@ -4239,7 +4239,7 @@
If NSECS > 0, the timeout consists of NSECS only.
If NSECS < 0, gobble data immediately, as if TIME_LIMIT were negative.
- READ_KBD is a lisp value:
+ READ_KBD is:
0 to ignore keyboard input, or
1 to return when input is available, or
-1 meaning caller will actually read the input, so don't throw to
@@ -6820,7 +6820,7 @@
If NSECS > 0, the timeout consists of NSECS only.
If NSECS < 0, gobble data immediately, as if TIME_LIMIT were negative.
- READ_KBD is a Lisp_Object:
+ READ_KBD is:
0 to ignore keyboard input, or
1 to return when input is available, or
-1 means caller will actually read the input, so don't throw to
@@ -6842,8 +6842,6 @@
{
register int nfds;
EMACS_TIME end_time, timeout;
- SELECT_TYPE waitchannels;
- int xerrno;
if (time_limit < 0)
{
@@ -6870,6 +6868,8 @@
while (1)
{
int timeout_reduced_for_timers = 0;
+ SELECT_TYPE waitchannels;
+ int xerrno;
/* If calling from keyboard input, do not quit
since we want to return C-g as an input character.
@@ -6944,13 +6944,6 @@
if (read_kbd < 0)
set_waiting_for_input (&timeout);
- /* Wait till there is something to do. */
-
- if (! read_kbd && NILP (wait_for_cell))
- FD_ZERO (&waitchannels);
- else
- FD_SET (0, &waitchannels);
-
/* If a frame has been newly mapped and needs updating,
reprocess its display stuff. */
if (frame_garbaged && do_display)
@@ -6961,13 +6954,16 @@
set_waiting_for_input (&timeout);
}
+ /* Wait till there is something to do. */
+ FD_ZERO (&waitchannels);
if (read_kbd && detect_input_pending ())
+ nfds = 0;
+ else
{
- nfds = 0;
- FD_ZERO (&waitchannels);
+ if (read_kbd || !NILP (wait_for_cell))
+ FD_SET (0, &waitchannels);
+ nfds = pselect (1, &waitchannels, NULL, NULL, &timeout, NULL);
}
- else
- nfds = pselect (1, &waitchannels, NULL, NULL, &timeout, NULL);
xerrno = errno;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108976: * process.c (wait_reading_process_output): 'waitchannels' was unset,
Paul Eggert <=