Mercurial > hg > xemacs-beta
comparison src/event-tty.c @ 185:3d6bfa290dbd r20-3b19
Import from CVS: tag r20-3b19
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:55:28 +0200 |
parents | 376386a54a3c |
children | 727739f917cb |
comparison
equal
deleted
inserted
replaced
184:bcd2674570bf | 185:3d6bfa290dbd |
---|---|
142 loop when called from Fdiscard_input()), we must return | 142 loop when called from Fdiscard_input()), we must return |
143 user events ahead of process events. */ | 143 user events ahead of process events. */ |
144 if (FD_ISSET (i, &temp_mask) && FD_ISSET (i, &tty_only_mask)) | 144 if (FD_ISSET (i, &temp_mask) && FD_ISSET (i, &tty_only_mask)) |
145 { | 145 { |
146 struct console *c = find_console_from_fd (i); | 146 struct console *c = find_console_from_fd (i); |
147 | 147 |
148 assert (c); | 148 assert (c); |
149 if (read_event_from_tty_or_stream_desc (emacs_event, c, i)) | 149 if (read_event_from_tty_or_stream_desc (emacs_event, c, i)) |
150 return; | 150 return; |
151 } | 151 } |
152 } | 152 } |
157 if (FD_ISSET (i, &temp_mask) && FD_ISSET (i, &process_only_mask)) | 157 if (FD_ISSET (i, &temp_mask) && FD_ISSET (i, &process_only_mask)) |
158 { | 158 { |
159 Lisp_Object process; | 159 Lisp_Object process; |
160 struct Lisp_Process *p = | 160 struct Lisp_Process *p = |
161 get_process_from_input_descriptor (i); | 161 get_process_from_input_descriptor (i); |
162 | 162 |
163 assert (p); | 163 assert (p); |
164 XSETPROCESS (process, p); | 164 XSETPROCESS (process, p); |
165 emacs_event->event_type = process_event; | 165 emacs_event->event_type = process_event; |
166 /* process events have nil as channel */ | 166 /* process events have nil as channel */ |
167 emacs_event->timestamp = 0; /* #### */ | 167 emacs_event->timestamp = 0; /* #### */ |
232 /************************************************************************/ | 232 /************************************************************************/ |
233 | 233 |
234 void | 234 void |
235 vars_of_event_tty (void) | 235 vars_of_event_tty (void) |
236 { | 236 { |
237 tty_event_stream = | 237 tty_event_stream = xnew (struct event_stream); |
238 (struct event_stream *) xmalloc (sizeof (struct event_stream)); | |
239 | 238 |
240 tty_event_stream->event_pending_p = emacs_tty_event_pending_p; | 239 tty_event_stream->event_pending_p = emacs_tty_event_pending_p; |
241 tty_event_stream->next_event_cb = emacs_tty_next_event; | 240 tty_event_stream->next_event_cb = emacs_tty_next_event; |
242 tty_event_stream->handle_magic_event_cb = emacs_tty_handle_magic_event; | 241 tty_event_stream->handle_magic_event_cb = emacs_tty_handle_magic_event; |
243 tty_event_stream->add_timeout_cb = emacs_tty_add_timeout; | 242 tty_event_stream->add_timeout_cb = emacs_tty_add_timeout; |