void select_soundhw(const char *optarg)

{

    struct soundhw *c;



    if (*optarg == '?') {

    show_valid_cards:



        printf("Valid sound card names (comma separated):\n");

        for (c = soundhw; c->name; ++c) {

            printf ("%-11s %s\n", c->name, c->descr);

        }

        printf("\n-soundhw all will enable all of the above\n");

        exit(*optarg != '?');

    }

    else {

        size_t l;

        const char *p;

        char *e;

        int bad_card = 0;



        if (!strcmp(optarg, "all")) {

            for (c = soundhw; c->name; ++c) {

                c->enabled = 1;

            }

            return;

        }



        p = optarg;

        while (*p) {

            e = strchr(p, ',');

            l = !e ? strlen(p) : (size_t) (e - p);



            for (c = soundhw; c->name; ++c) {

                if (!strncmp(c->name, p, l) && !c->name[l]) {

                    c->enabled = 1;

                    break;

                }

            }



            if (!c->name) {

                if (l > 80) {

                    fprintf(stderr,

                            "Unknown sound card name (too big to show)\n");

                }

                else {

                    fprintf(stderr, "Unknown sound card name `%.*s'\n",

                            (int) l, p);

                }

                bad_card = 1;

            }

            p += l + (e != NULL);

        }



        if (bad_card) {

            goto show_valid_cards;

        }

    }

}

void select_soundhw(const char *optarg)

{

    struct soundhw *c;



    if (*optarg == '?') {

    show_valid_cards:



        printf("Valid sound card names (comma separated):\n");

        for (c = soundhw; c->name; ++c) {

            printf ("%-11s %s\n", c->name, c->descr);

        }

        printf("\n-soundhw all will enable all of the above\n");

        exit(*optarg != '?');

    }

    else {

        size_t l;

        const char *p;

        char *e;

        int bad_card = 0;



        if (!strcmp(optarg, "all")) {

            for (c = soundhw; c->name; ++c) {

                c->enabled = 1;

            }

            return;

        }



        p = optarg;

        while (*p) {

            e = strchr(p, ',');

            l = !e ? strlen(p) : (size_t) (e - p);



            for (c = soundhw; c->name; ++c) {

                if (!strncmp(c->name, p, l) && !c->name[l]) {

                    c->enabled = 1;

                    break;

                }

            }



            if (!c->name) {

                if (l > 80) {

                    fprintf(stderr,

                            "Unknown sound card name (too big to show)\n");

                }

                else {

                    fprintf(stderr, "Unknown sound card name `%.*s'\n",

                            (int) l, p);

                }

                bad_card = 1;

            }

            p += l + (e != NULL);

        }



        if (bad_card) {

            goto show_valid_cards;

        }

    }

}

    if (*optarg == '?') {         exit(*optarg != '?');
void FUNC_0(const char *VAR_0)

{

    struct soundhw *VAR_1;



    if (*VAR_0 == '?') {

    show_valid_cards:



        printf("Valid sound card names (comma separated):\n");

        for (VAR_1 = soundhw; VAR_1->name; ++VAR_1) {

            printf ("%-11s %s\n", VAR_1->name, VAR_1->descr);

        }

        printf("\n-soundhw all will enable all of the above\n");

        exit(*VAR_0 != '?');

    }

    else {

        size_t l;

        const char *VAR_2;

        char *VAR_3;

        int VAR_4 = 0;



        if (!strcmp(VAR_0, "all")) {

            for (VAR_1 = soundhw; VAR_1->name; ++VAR_1) {

                VAR_1->enabled = 1;

            }

            return;

        }



        VAR_2 = VAR_0;

        while (*VAR_2) {

            VAR_3 = strchr(VAR_2, ',');

            l = !VAR_3 ? strlen(VAR_2) : (size_t) (VAR_3 - VAR_2);



            for (VAR_1 = soundhw; VAR_1->name; ++VAR_1) {

                if (!strncmp(VAR_1->name, VAR_2, l) && !VAR_1->name[l]) {

                    VAR_1->enabled = 1;

                    break;

                }

            }



            if (!VAR_1->name) {

                if (l > 80) {

                    fprintf(stderr,

                            "Unknown sound card name (too big to show)\n");

                }

                else {

                    fprintf(stderr, "Unknown sound card name `%.*s'\n",

                            (int) l, VAR_2);

                }

                VAR_4 = 1;

            }

            VAR_2 += l + (VAR_3 != NULL);

        }



        if (VAR_4) {

            goto show_valid_cards;

        }

    }

}

void FUNC_0(const char *VAR_0)
{ struct soundhw *VAR_1; if (*VAR_0 == '?') { show_valid_cards:
printf("Valid sound card names (comma separated):\n"); for (VAR_1 = soundhw; VAR_1->name; ++VAR_1) { printf ("%-11s %s\n", VAR_1->name, VAR_1->descr); } printf("\n-soundhw all will enable all of the above\n"); exit(*VAR_0 != '?'); } else { size_t l; const char *VAR_2; char *VAR_3; int VAR_4 = 0; if (!strcmp(VAR_0, "all")) { for (VAR_1 = soundhw; VAR_1->name; ++VAR_1) { VAR_1->enabled = 1; } return; } VAR_2 = VAR_0; while (*VAR_2) { VAR_3 = strchr(VAR_2, ','); l = !VAR_3 ? strlen(VAR_2) : (size_t) (VAR_3 - VAR_2); for (VAR_1 = soundhw; VAR_1->name; ++VAR_1) { if (!strncmp(VAR_1->name, VAR_2, l) && !VAR_1->name[l]) { VAR_1->enabled = 1; break; } } if (!VAR_1->name) { if (l > 80) { fprintf(stderr,
"Unknown sound card name (too big to show)\n"); } else { fprintf(stderr, "Unknown sound card name `%.*s'\n",
(int) l, VAR_2); } VAR_4 = 1; } VAR_2 += l + (VAR_3 != NULL); } if (VAR_4) { goto show_valid_cards; } } }