- if ((res = cmp_arg(argv, &i, "--help", "-h", 0)) == ARG_MATCH) {
- goto out_usage;
- } else if ((res = cmp_arg(argv, &i, "--debug", "-d", 0)) == ARG_MATCH) {
- _debug++;
+ if ((res = cmp_arg(argv, &i, "--help", "-h", NULL)) == ARG_MATCH) {
+ usage();
+ return 1;
+ } else if ((res = cmp_arg(argv, &i, "--format", "-f", ¶m)) == ARG_MATCH) {
+ if (strcasecmp(param, "raw-le32") == 0)
+ cmdargs.outformat = FMT_RAW_LE32;
+ else if (strcasecmp(param, "raw-be32") == 0)
+ cmdargs.outformat = FMT_RAW_BE32;
+ else if (strcasecmp(param, "b43") == 0)
+ cmdargs.outformat = FMT_B43;
+ else {
+ fprintf(stderr, "Invalid -f|--format\n\n");
+ goto out_usage;
+ }
+ } else if ((res = cmp_arg(argv, &i, "--debug", "-d", NULL)) == ARG_MATCH) {
+ cmdargs.debug++;
+ } else if ((res = cmp_arg(argv, &i, "--psize", "-s", NULL)) == ARG_MATCH) {
+ cmdargs.print_sizes = 1;
+ } else if ((res = cmp_arg(argv, &i, "--ivalext", "-e", ¶m)) == ARG_MATCH) {
+ cmdargs.initvals_fn_extension = param;
+ } else if ((res = cmp_arg(argv, &i, "--__real_infile", NULL, ¶m)) == ARG_MATCH) {
+ cmdargs.real_infile_name = param;