2002-09-13 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/serial.c (fill_input_buf): Take a new argument NOWAIT. If NOWAIT is true, don't loop. All callers are changed.
This commit is contained in:
parent
c97b7d2098
commit
36ae96d649
2 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2002-09-13 Yoshinori K. Okuji <okuji@enbug.org>
|
||||||
|
|
||||||
|
* stage2/serial.c (fill_input_buf): Take a new argument NOWAIT.
|
||||||
|
If NOWAIT is true, don't loop.
|
||||||
|
All callers are changed.
|
||||||
|
|
||||||
2002-09-08 Yoshinori K. Okuji <okuji@enbug.org>
|
2002-09-08 Yoshinori K. Okuji <okuji@enbug.org>
|
||||||
|
|
||||||
* configure.in (--disable-serial): Fix a typo in the
|
* configure.in (--disable-serial): Fix a typo in the
|
||||||
|
|
|
@ -260,7 +260,7 @@ serial_translate_key_sequence (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
int fill_input_buf (void)
|
int fill_input_buf (int nowait)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -276,6 +276,9 @@ int fill_input_buf (void)
|
||||||
/* Reset the counter to zero, to wait for the same interval. */
|
/* Reset the counter to zero, to wait for the same interval. */
|
||||||
i = 0;
|
i = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nowait)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Translate some key sequences. */
|
/* Translate some key sequences. */
|
||||||
|
@ -290,7 +293,7 @@ serial_getkey (void)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
while (! fill_input_buf ())
|
while (! fill_input_buf (0))
|
||||||
;
|
;
|
||||||
|
|
||||||
c = input_buf[0];
|
c = input_buf[0];
|
||||||
|
@ -304,7 +307,7 @@ serial_getkey (void)
|
||||||
int
|
int
|
||||||
serial_checkkey (void)
|
serial_checkkey (void)
|
||||||
{
|
{
|
||||||
if (fill_input_buf ())
|
if (fill_input_buf (1))
|
||||||
return input_buf[0];
|
return input_buf[0];
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue