Changes in uspace/app/top/screen.c [87822ce:28a5ebd] in mainline
- File:
-
- 1 edited
-
uspace/app/top/screen.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/top/screen.c
r87822ce r28a5ebd 534 534 /** Get char with timeout 535 535 * 536 * @param sec Timeout in seconds537 * @param rch Place to store character on success538 * @return EOK on success, ETIMEOUT on time out, EIO on other error539 536 */ 540 errno_t tgetchar(sec_t sec, int *rch) 541 { 542 errno_t rc; 543 537 int tgetchar(sec_t sec) 538 { 544 539 /* 545 540 * Reset timeleft whenever it is not positive. … … 553 548 * update timeleft so that the next call to tgetchar() 554 549 * will not wait as long. If there is no input, 555 * make timeleft zero and return ETIMEOUT.550 * make timeleft zero and return -1. 556 551 */ 557 552 … … 562 557 563 558 warning_timeleft -= timeleft; 564 rc = console_get_event_timeout(console, &event, &timeleft); 565 if (rc == ETIMEOUT) { 559 if (!console_get_event_timeout(console, &event, &timeleft)) { 566 560 timeleft = 0; 567 return ETIMEOUT; 568 } 569 570 if (rc != EOK) 571 return EIO; 572 561 return -1; 562 } 573 563 warning_timeleft += timeleft; 574 564 … … 577 567 } 578 568 579 *rch = (int) c; 580 return EOK; 569 return (int) c; 581 570 } 582 571
Note:
See TracChangeset
for help on using the changeset viewer.
