comparison src/event-tty.c @ 440:8de8e3f6228a r21-2-28

Import from CVS: tag r21-2-28
author cvs
date Mon, 13 Aug 2007 11:33:38 +0200
parents 3ecd8885ac67
children abe6d1db359e
comparison
equal deleted inserted replaced
439:357dd071b03c 440:8de8e3f6228a
62 { 62 {
63 remove_low_level_timeout (&tty_timer_queue, id); 63 remove_low_level_timeout (&tty_timer_queue, id);
64 } 64 }
65 65
66 static void 66 static void
67 tty_timeout_to_emacs_event (struct Lisp_Event *emacs_event) 67 tty_timeout_to_emacs_event (Lisp_Event *emacs_event)
68 { 68 {
69 emacs_event->event_type = timeout_event; 69 emacs_event->event_type = timeout_event;
70 /* timeout events have nil as channel */ 70 /* timeout events have nil as channel */
71 emacs_event->timestamp = 0; /* #### */ 71 emacs_event->timestamp = 0; /* #### */
72 emacs_event->event.timeout.interval_id = 72 emacs_event->event.timeout.interval_id =
110 110
111 return 0; 111 return 0;
112 } 112 }
113 113
114 static void 114 static void
115 emacs_tty_next_event (struct Lisp_Event *emacs_event) 115 emacs_tty_next_event (Lisp_Event *emacs_event)
116 { 116 {
117 while (1) 117 while (1)
118 { 118 {
119 int ndesc; 119 int ndesc;
120 int i; 120 int i;
154 for (i = 0; i < MAXDESC; i++) 154 for (i = 0; i < MAXDESC; i++)
155 { 155 {
156 if (FD_ISSET (i, &temp_mask) && FD_ISSET (i, &process_only_mask)) 156 if (FD_ISSET (i, &temp_mask) && FD_ISSET (i, &process_only_mask))
157 { 157 {
158 Lisp_Object process; 158 Lisp_Object process;
159 struct Lisp_Process *p = 159 Lisp_Process *p = get_process_from_usid (FD_TO_USID(i));
160 get_process_from_usid (FD_TO_USID(i));
161 160
162 assert (p); 161 assert (p);
163 XSETPROCESS (process, p); 162 XSETPROCESS (process, p);
164 emacs_event->event_type = process_event; 163 emacs_event->event_type = process_event;
165 /* process events have nil as channel */ 164 /* process events have nil as channel */
186 } 185 }
187 } 186 }
188 } 187 }
189 188
190 static void 189 static void
191 emacs_tty_handle_magic_event (struct Lisp_Event *emacs_event) 190 emacs_tty_handle_magic_event (Lisp_Event *emacs_event)
192 { 191 {
193 /* Nothing to do currently */ 192 /* Nothing to do currently */
194 } 193 }
195 194
196 195
197 static void 196 static void
198 emacs_tty_select_process (struct Lisp_Process *process) 197 emacs_tty_select_process (Lisp_Process *process)
199 { 198 {
200 event_stream_unixoid_select_process (process); 199 event_stream_unixoid_select_process (process);
201 } 200 }
202 201
203 static void 202 static void
204 emacs_tty_unselect_process (struct Lisp_Process *process) 203 emacs_tty_unselect_process (Lisp_Process *process)
205 { 204 {
206 event_stream_unixoid_unselect_process (process); 205 event_stream_unixoid_unselect_process (process);
207 } 206 }
208 207
209 static void 208 static void