openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/shadow/4.6-r0/shadow-4.6/src/expiry.c
static void process_flags(int argc, char** argv)
{
    bool fflg = false;
    int c;
    static struct option long_options[] = {{"check", no_argument, NULL, 'c'},
                                           {"force", no_argument, NULL, 'f'},
                                           {"help", no_argument, NULL, 'h'},
                                           {NULL, 0, NULL, '\0'}};

    while ((c = getopt_long(argc, argv, "cfh", long_options, NULL)) != -1)
    {
        switch (c)
        {
            case 'c':
                cflg = true;
                break;
            case 'f':
                fflg = true;
                break;
            case 'h':
                usage(E_SUCCESS);
                /*@notreached@*/ break;
            default:
                usage(E_USAGE);
        }
    }

    if (!(cflg || fflg))
    {
        usage(E_USAGE);
    }

    if (cflg && fflg)
    {
        fprintf(stderr, _("%s: options %s and %s conflict\n"), Prog, "-c",
                "-f");
        usage(E_USAGE);
    }

    if (argc != optind)
    {
        fprintf(stderr, _("%s: unexpected argument: %s\n"), Prog, argv[optind]);
        usage(E_USAGE);
    }
}
/*
 * process_flags - parse the command line options
 *
 *	It will not return if an error is encountered.
 */
parse the command line options
It will not return if an error is encountered.
parse the command line options It will not return if an error is encountered .
static void process_flags(int argc, char** argv)
{
    bool fflg = false;
    int c;
    static struct option long_options[] = {{"check", no_argument, NULL, 'c'},
                                           {"force", no_argument, NULL, 'f'},
                                           {"help", no_argument, NULL, 'h'},
                                           {NULL, 0, NULL, '\0'}};
    while ((c = getopt_long(argc, argv, "cfh", long_options, NULL)) != -1)
    {
        switch (c)
        {
            case 'c':
                cflg = true;
                break;
            case 'f':
                fflg = true;
                break;
            case 'h':
                usage(E_SUCCESS);
                 break;
            default:
                usage(E_USAGE);
        }
    }
    if (!(cflg || fflg))
    {
        usage(E_USAGE);
    }
    if (cflg && fflg)
    {
        fprintf(stderr, _("%s: options %s and %s conflict\n"), Prog, "-c",
                "-f");
        usage(E_USAGE);
    }
    if (argc != optind)
    {
        fprintf(stderr, _("%s: unexpected argument: %s\n"), Prog, argv[optind]);
        usage(E_USAGE);
    }
}
static void process_flags ( int argc , char * * argv ) { bool fflg = false ; int c ; static struct option long_options [ ] = { { " " , no_argument , NULL , ' ' } , { " " , no_argument , NULL , ' ' } , { " " , no_argument , NULL , ' ' } , { NULL , 0 , NULL , ' \0 ' } } ; while ( ( c = getopt_long ( argc , argv , " " , long_options , NULL ) ) != -1 ) { switch ( c ) { case ' ' : cflg = true ; break ; case ' ' : fflg = true ; break ; case ' ' : usage ( E_SUCCESS ) ; break ; default : usage ( E_USAGE ) ; } } if ( ! ( cflg || fflg ) ) { usage ( E_USAGE ) ; } if ( cflg && fflg ) { fprintf ( stderr , _ ( " \n " ) , Prog , " " , " " ) ; usage ( E_USAGE ) ; } if ( argc != optind ) { fprintf ( stderr , _ ( " \n " ) , Prog , argv [ optind ] ) ; usage ( E_USAGE ) ; } }
process_flags - parse the command line options
      It will not return if an error is encountered.
process_flags - parse the command line options It will not return if an error is encountered .
/*@notreached@*/