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 void change_file(struct more_control* ctl, int nskip)
{
    if (nskip == 0)
        return;
    if (nskip > 0)
    {
        if (ctl->argv_position + nskip > ctl->num_files - 1)
            nskip = ctl->num_files - ctl->argv_position - 1;
    }
    else if (ctl->within_file)
        ctl->argv_position++;
    ctl->argv_position += nskip;
    if (ctl->argv_position < 0)
        ctl->argv_position = 0;
    puts(_("\n...Skipping "));
    if (ctl->clear_line_ends)
        putp(ctl->erase_line);
    if (nskip > 0)
        fputs(_("...Skipping to file "), stdout);
    else
        fputs(_("...Skipping back to file "), stdout);
    puts(ctl->file_names[ctl->argv_position]);
    if (ctl->clear_line_ends)
        putp(ctl->erase_line);
    putchar('\n');
    ctl->argv_position--;
}
/* Change displayed file from command line list to next nskip, where nskip
 * is relative position in argv and can be negative, that is a previous
 * file.  */
Change displayed file from command line list to next nskip, where nskip
is relative position in argv and can be negative, that is a previous
file.
Change displayed file from command line list to next nskip where nskip is relative position in argv and can be negative that is a previous file .
static void change_file(struct more_control* ctl, int nskip)
{
    if (nskip == 0)
        return;
    if (nskip > 0)
    {
        if (ctl->argv_position + nskip > ctl->num_files - 1)
            nskip = ctl->num_files - ctl->argv_position - 1;
    }
    else if (ctl->within_file)
        ctl->argv_position++;
    ctl->argv_position += nskip;
    if (ctl->argv_position < 0)
        ctl->argv_position = 0;
    puts(_("\n...Skipping "));
    if (ctl->clear_line_ends)
        putp(ctl->erase_line);
    if (nskip > 0)
        fputs(_("...Skipping to file "), stdout);
    else
        fputs(_("...Skipping back to file "), stdout);
    puts(ctl->file_names[ctl->argv_position]);
    if (ctl->clear_line_ends)
        putp(ctl->erase_line);
    putchar('\n');
    ctl->argv_position--;
}
static void change_file ( struct more_control * ctl , int nskip ) { if ( nskip == 0 ) return ; if ( nskip > 0 ) { if ( ctl -> argv_position + nskip > ctl -> num_files - 1 ) nskip = ctl -> num_files - ctl -> argv_position - 1 ; } else if ( ctl -> within_file ) ctl -> argv_position ++ ; ctl -> argv_position += nskip ; if ( ctl -> argv_position < 0 ) ctl -> argv_position = 0 ; puts ( _ ( " \n " ) ) ; if ( ctl -> clear_line_ends ) putp ( ctl -> erase_line ) ; if ( nskip > 0 ) fputs ( _ ( " " ) , stdout ) ; else fputs ( _ ( " " ) , stdout ) ; puts ( ctl -> file_names [ ctl -> argv_position ] ) ; if ( ctl -> clear_line_ends ) putp ( ctl -> erase_line ) ; putchar ( ' \n ' ) ; ctl -> argv_position -- ; }
Change displayed file from command line list to next nskip, where nskip
 is relative position in argv and can be negative, that is a previous
 file.
Change displayed file from command line list to next nskip where nskip is relative position in argv and can be negative that is a previous file .