src/console/conio.c
static unsigned int
input_char()
{
    unsigned c;

    if ((c=t_gnc()) <= 599) {         /* IBM generates codes up to 260 */
          c = do_smap(c);
    } else if (c > 1000) {            /* stuffed function */
       c -= 1000;                     /* convert back to function code */
    }
    if (c <= 0) {
        t_honk_horn();
    }
    /* if we got a screen size escape sequence, read height, width */
    if (c == F_SCRSIZ) {
       t_gnc();   /*  - 0x20 = y */
       t_gnc();   /*  - 0x20 = x */
       c = input_char();
    }
    return c;
}
/* Get the next character from the terminal - performs table lookup on
   the character to do the desired translation */
Get the next character from the terminal - performs table lookup on
the character to do the desired translation
Get the next character from the terminal - performs table lookup on the character to do the desired translation
static unsigned int
input_char()
{
    unsigned c;
    if ((c=t_gnc()) <= 599) {         
          c = do_smap(c);
    } else if (c > 1000) {            
       c -= 1000;                     
    }
    if (c <= 0) {
        t_honk_horn();
    }
    if (c == F_SCRSIZ) {
       t_gnc();   
       t_gnc();   
       c = input_char();
    }
    return c;
}
static unsigned int input_char ( ) { unsigned c ; if ( ( c = t_gnc ( ) ) <= 599 ) { c = do_smap ( c ) ; } else if ( c > 1000 ) { c -= 1000 ; } if ( c <= 0 ) { t_honk_horn ( ) ; } if ( c == F_SCRSIZ ) { t_gnc ( ) ; t_gnc ( ) ; c = input_char ( ) ; } return c ; }
Get the next character from the terminal - performs table lookup on
the character to do the desired translation
Get the next character from the terminal - performs table lookup on the character to do the desired translation
/* IBM generates codes up to 260 */ /* stuffed function */ /* convert back to function code */ /* if we got a screen size escape sequence, read height, width */ /*  - 0x20 = y */ /*  - 0x20 = x */