comparison src/event-tty.c @ 392:1f50e6fe4f3f r21-2-11

Import from CVS: tag r21-2-11
author cvs
date Mon, 13 Aug 2007 11:10:50 +0200
parents 064ab7fed2e0
children 74fd4e045ea6
comparison
equal deleted inserted replaced
391:e50d8e68d7a5 392:1f50e6fe4f3f
92 92
93 return poll_fds_for_input (user_p ? tty_only_mask : 93 return poll_fds_for_input (user_p ? tty_only_mask :
94 non_fake_input_wait_mask); 94 non_fake_input_wait_mask);
95 } 95 }
96 96
97 static struct console * 97 struct console *
98 find_console_from_fd (int fd) 98 tty_find_console_from_fd (int fd)
99 { 99 {
100 Lisp_Object concons; 100 Lisp_Object concons;
101 101
102 CONSOLE_LOOP (concons) 102 CONSOLE_LOOP (concons)
103 { 103 {
140 /* To avoid race conditions (among other things, an infinite 140 /* To avoid race conditions (among other things, an infinite
141 loop when called from Fdiscard_input()), we must return 141 loop when called from Fdiscard_input()), we must return
142 user events ahead of process events. */ 142 user events ahead of process events. */
143 if (FD_ISSET (i, &temp_mask) && FD_ISSET (i, &tty_only_mask)) 143 if (FD_ISSET (i, &temp_mask) && FD_ISSET (i, &tty_only_mask))
144 { 144 {
145 struct console *c = find_console_from_fd (i); 145 struct console *c = tty_find_console_from_fd (i);
146 146
147 assert (c); 147 assert (c);
148 if (read_event_from_tty_or_stream_desc (emacs_event, c, i)) 148 if (read_event_from_tty_or_stream_desc (emacs_event, c, i))
149 return; 149 return;
150 } 150 }