version 1.43, 2012/08/21 10:08:11 |
version 1.44, 2012/09/03 06:26:48 |
|
|
* timer has expired, give up waiting and send the escape. |
* timer has expired, give up waiting and send the escape. |
*/ |
*/ |
if ((tty->flags & TTY_ESCAPE) && |
if ((tty->flags & TTY_ESCAPE) && |
|
evtimer_initialized(&tty->key_timer) && |
!evtimer_pending(&tty->key_timer, NULL)) { |
!evtimer_pending(&tty->key_timer, NULL)) { |
evbuffer_drain(tty->event->input, 1); |
evbuffer_drain(tty->event->input, 1); |
key = '\033'; |
key = '\033'; |
|
|
|
|
start_timer: |
start_timer: |
/* If already waiting for timer, do nothing. */ |
/* If already waiting for timer, do nothing. */ |
if (evtimer_pending(&tty->key_timer, NULL)) |
if (evtimer_initialized(&tty->key_timer) && |
|
evtimer_pending(&tty->key_timer, NULL)) |
return (0); |
return (0); |
|
|
/* Start the timer and wait for expiry or more data. */ |
/* Start the timer and wait for expiry or more data. */ |