}
static void
-tty_timeout_to_emacs_event (struct Lisp_Event *emacs_event)
+tty_timeout_to_emacs_event (Lisp_Event *emacs_event)
{
emacs_event->event_type = timeout_event;
/* timeout events have nil as channel */
emacs_event->timestamp = 0; /* #### */
emacs_event->event.timeout.interval_id =
pop_low_level_timeout (&tty_timer_queue, 0);
+ emacs_event->event.timeout.function = Qnil;
+ emacs_event->event.timeout.object = Qnil;
}
\f
non_fake_input_wait_mask);
}
-static struct console *
-find_console_from_fd (int fd)
+struct console *
+tty_find_console_from_fd (int fd)
{
Lisp_Object concons;
}
static void
-emacs_tty_next_event (struct Lisp_Event *emacs_event)
+emacs_tty_next_event (Lisp_Event *emacs_event)
{
while (1)
{
user events ahead of process events. */
if (FD_ISSET (i, &temp_mask) && FD_ISSET (i, &tty_only_mask))
{
- struct console *c = find_console_from_fd (i);
+ struct console *c = tty_find_console_from_fd (i);
assert (c);
if (read_event_from_tty_or_stream_desc (emacs_event, c, i))
if (FD_ISSET (i, &temp_mask) && FD_ISSET (i, &process_only_mask))
{
Lisp_Object process;
- struct Lisp_Process *p =
- get_process_from_usid (FD_TO_USID(i));
+ Lisp_Process *p = get_process_from_usid (FD_TO_USID(i));
assert (p);
XSETPROCESS (process, p);
}
static void
-emacs_tty_handle_magic_event (struct Lisp_Event *emacs_event)
+emacs_tty_handle_magic_event (Lisp_Event *emacs_event)
{
/* Nothing to do currently */
}
\f
static void
-emacs_tty_select_process (struct Lisp_Process *process)
+emacs_tty_select_process (Lisp_Process *process)
{
event_stream_unixoid_select_process (process);
}
static void
-emacs_tty_unselect_process (struct Lisp_Process *process)
+emacs_tty_unselect_process (Lisp_Process *process)
{
event_stream_unixoid_unselect_process (process);
}
/************************************************************************/
void
-vars_of_event_tty (void)
+reinit_vars_of_event_tty (void)
{
tty_event_stream = xnew (struct event_stream);
tty_event_stream->event_pending_p = emacs_tty_event_pending_p;
+ tty_event_stream->force_event_pending = 0;
tty_event_stream->next_event_cb = emacs_tty_next_event;
tty_event_stream->handle_magic_event_cb = emacs_tty_handle_magic_event;
tty_event_stream->add_timeout_cb = emacs_tty_add_timeout;
}
void
+vars_of_event_tty (void)
+{
+ reinit_vars_of_event_tty ();
+}
+
+void
init_event_tty_late (void)
{
event_stream = tty_event_stream;