comparison src/event-unixoid.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
69 int signal_event_pipe_initialized; 69 int signal_event_pipe_initialized;
70 70
71 int fake_event_occurred; 71 int fake_event_occurred;
72 72
73 int 73 int
74 read_event_from_tty_or_stream_desc (struct Lisp_Event *event, 74 read_event_from_tty_or_stream_desc (Lisp_Event *event,
75 struct console *con, int fd) 75 struct console *con, int fd)
76 { 76 {
77 unsigned char ch; 77 unsigned char ch;
78 int nread; 78 int nread;
79 Lisp_Object console; 79 Lisp_Object console;
172 FD_CLR (infd, &tty_only_mask); 172 FD_CLR (infd, &tty_only_mask);
173 return infd; 173 return infd;
174 } 174 }
175 175
176 static int 176 static int
177 get_process_infd (struct Lisp_Process *p) 177 get_process_infd (Lisp_Process *p)
178 { 178 {
179 Lisp_Object instr, outstr; 179 Lisp_Object instr, outstr;
180 get_process_streams (p, &instr, &outstr); 180 get_process_streams (p, &instr, &outstr);
181 assert (!NILP (instr)); 181 assert (!NILP (instr));
182 return filedesc_stream_fd (XLSTREAM (instr)); 182 return filedesc_stream_fd (XLSTREAM (instr));
183 } 183 }
184 184
185 int 185 int
186 event_stream_unixoid_select_process (struct Lisp_Process *proc) 186 event_stream_unixoid_select_process (Lisp_Process *proc)
187 { 187 {
188 int infd = get_process_infd (proc); 188 int infd = get_process_infd (proc);
189 189
190 FD_SET (infd, &input_wait_mask); 190 FD_SET (infd, &input_wait_mask);
191 FD_SET (infd, &non_fake_input_wait_mask); 191 FD_SET (infd, &non_fake_input_wait_mask);
192 FD_SET (infd, &process_only_mask); 192 FD_SET (infd, &process_only_mask);
193 return infd; 193 return infd;
194 } 194 }
195 195
196 int 196 int
197 event_stream_unixoid_unselect_process (struct Lisp_Process *proc) 197 event_stream_unixoid_unselect_process (Lisp_Process *proc)
198 { 198 {
199 int infd = get_process_infd (proc); 199 int infd = get_process_infd (proc);
200 200
201 FD_CLR (infd, &input_wait_mask); 201 FD_CLR (infd, &input_wait_mask);
202 FD_CLR (infd, &non_fake_input_wait_mask); 202 FD_CLR (infd, &non_fake_input_wait_mask);