260 |
} |
} |
261 |
|
|
262 |
static |
static |
263 |
int fill_input_buf (void) |
int fill_input_buf (int nowait) |
264 |
{ |
{ |
265 |
int i; |
int i; |
266 |
|
|
276 |
/* Reset the counter to zero, to wait for the same interval. */ |
/* Reset the counter to zero, to wait for the same interval. */ |
277 |
i = 0; |
i = 0; |
278 |
} |
} |
279 |
|
|
280 |
|
if (nowait) |
281 |
|
break; |
282 |
} |
} |
283 |
|
|
284 |
/* Translate some key sequences. */ |
/* Translate some key sequences. */ |
293 |
{ |
{ |
294 |
int c; |
int c; |
295 |
|
|
296 |
while (! fill_input_buf ()) |
while (! fill_input_buf (0)) |
297 |
; |
; |
298 |
|
|
299 |
c = input_buf[0]; |
c = input_buf[0]; |
307 |
int |
int |
308 |
serial_checkkey (void) |
serial_checkkey (void) |
309 |
{ |
{ |
310 |
if (fill_input_buf ()) |
if (fill_input_buf (1)) |
311 |
return input_buf[0]; |
return input_buf[0]; |
312 |
|
|
313 |
return -1; |
return -1; |