openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/util-linux/2.33.2-r0/util-linux-2.33.2/text-utils/more.c
static int read_number(struct more_control* ctl, char* cmd)
{
    int i;
    char ch;

    i = 0;
    ch = ctl->output_tty.c_cc[VKILL];
    for (;;)
    {
        ch = read_user_input(ctl);
        if (isdigit(ch))
            i = i * 10 + ch - '0';
        else if ((cc_t)ch == ctl->output_tty.c_cc[VKILL])
            i = 0;
        else
        {
            *cmd = ch;
            break;
        }
    }
    return i;
}
/* Read a decimal number from the terminal.  Set cmd to the non-digit
 * which terminates the number. */
Read a decimal number from the terminal.  Set cmd to the non-digit
which terminates the number.
Read a decimal number from the terminal . Set cmd to the non - digit which terminates the number .
static int read_number(struct more_control* ctl, char* cmd)
{
    int i;
    char ch;
    i = 0;
    ch = ctl->output_tty.c_cc[VKILL];
    for (;;)
    {
        ch = read_user_input(ctl);
        if (isdigit(ch))
            i = i * 10 + ch - '0';
        else if ((cc_t)ch == ctl->output_tty.c_cc[VKILL])
            i = 0;
        else
        {
            *cmd = ch;
            break;
        }
    }
    return i;
}
static int read_number ( struct more_control * ctl , char * cmd ) { int i ; char ch ; i = 0 ; ch = ctl -> output_tty . c_cc [ VKILL ] ; for ( ; ; ) { ch = read_user_input ( ctl ) ; if ( isdigit ( ch ) ) i = i * 10 + ch - ' ' ; else if ( ( cc_t ) ch == ctl -> output_tty . c_cc [ VKILL ] ) i = 0 ; else { * cmd = ch ; break ; } } return i ; }
Read a decimal number from the terminal.
Read a decimal number from the terminal .