Reorder getopt switch options alphabetically

Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
Antonio Niño Díaz
2017-07-14 01:24:35 +01:00
parent d0e0525302
commit 8ed6c32ae7
2 changed files with 19 additions and 19 deletions

View File

@@ -337,6 +337,9 @@ main(int argc, char *argv[])
case 'D': case 'D':
opt_AddDefine(optarg); opt_AddDefine(optarg);
break; break;
case 'E':
newopt.exportall = true;
break;
case 'g': case 'g':
if (strlen(optarg) == 4) { if (strlen(optarg) == 4) {
newopt.gbgfx[0] = optarg[1]; newopt.gbgfx[0] = optarg[1];
@@ -378,9 +381,6 @@ main(int argc, char *argv[])
case 'v': case 'v':
newopt.verbose = true; newopt.verbose = true;
break; break;
case 'E':
newopt.exportall = true;
break;
case 'w': case 'w':
newopt.warnings = false; newopt.warnings = false;
break; break;

View File

@@ -56,22 +56,25 @@ main(int argc, char *argv[])
case 'D': case 'D':
opts.debug = true; opts.debug = true;
break; break;
case 'v': case 'd':
opts.verbose = true; depth = strtoul(optarg, NULL, 0);
break; break;
case 'F': case 'F':
opts.hardfix = true; opts.hardfix = true;
case 'f': case 'f':
opts.fix = true; opts.fix = true;
break; break;
case 'd':
depth = strtoul(optarg, NULL, 0);
break;
case 'h': case 'h':
opts.horizontal = true; opts.horizontal = true;
break; break;
case 'x': case 'o':
opts.trim = strtoul(optarg, NULL, 0); opts.outfile = optarg;
break;
case 'P':
opts.palout = true;
break;
case 'p':
opts.palfile = optarg;
break; break;
case 'T': case 'T':
opts.mapout = true; opts.mapout = true;
@@ -82,18 +85,15 @@ main(int argc, char *argv[])
case 'u': case 'u':
opts.unique = true; opts.unique = true;
break; break;
case 'P':
opts.palout = true;
break;
case 'p':
opts.palfile = optarg;
break;
case 'o':
opts.outfile = optarg;
break;
case 'V': case 'V':
printf("rgbgfx %s\n", get_package_version_string()); printf("rgbgfx %s\n", get_package_version_string());
exit(0); exit(0);
case 'v':
opts.verbose = true;
break;
case 'x':
opts.trim = strtoul(optarg, NULL, 0);
break;
default: default:
usage(); usage();
/* NOTREACHED */ /* NOTREACHED */