Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/top/screen.c

    r87822ce r28a5ebd  
    534534/** Get char with timeout
    535535 *
    536  * @param sec Timeout in seconds
    537  * @param rch Place to store character on success
    538  * @return EOK on success, ETIMEOUT on time out, EIO on other error
    539536 */
    540 errno_t tgetchar(sec_t sec, int *rch)
    541 {
    542         errno_t rc;
    543 
     537int tgetchar(sec_t sec)
     538{
    544539        /*
    545540         * Reset timeleft whenever it is not positive.
     
    553548         * update timeleft so that the next call to tgetchar()
    554549         * will not wait as long. If there is no input,
    555          * make timeleft zero and return ETIMEOUT.
     550         * make timeleft zero and return -1.
    556551         */
    557552
     
    562557
    563558                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)) {
    566560                        timeleft = 0;
    567                         return ETIMEOUT;
    568                 }
    569 
    570                 if (rc != EOK)
    571                         return EIO;
    572 
     561                        return -1;
     562                }
    573563                warning_timeleft += timeleft;
    574564
     
    577567        }
    578568
    579         *rch = (int) c;
    580         return EOK;
     569        return (int) c;
    581570}
    582571
Note: See TracChangeset for help on using the changeset viewer.