shithub: rgbds

Download patch

ref: 8ed6c32ae704f6cca341f0673121e35992a51057
parent: d0e0525302190b42d9415c3ca4f37cfc362f69cc
author: Antonio Niño Díaz <[email protected]>
date: Thu Jul 13 21:24:35 EDT 2017

Reorder getopt switch options alphabetically

Signed-off-by: Antonio Niño Díaz <[email protected]>

--- a/src/asm/main.c
+++ b/src/asm/main.c
@@ -337,6 +337,9 @@
 		case 'D':
 			opt_AddDefine(optarg);
 			break;
+		case 'E':
+			newopt.exportall = true;
+			break;
 		case 'g':
 			if (strlen(optarg) == 4) {
 				newopt.gbgfx[0] = optarg[1];
@@ -377,9 +380,6 @@
 			exit(0);
 		case 'v':
 			newopt.verbose = true;
-			break;
-		case 'E':
-			newopt.exportall = true;
 			break;
 		case 'w':
 			newopt.warnings = false;
--- a/src/gfx/main.c
+++ b/src/gfx/main.c
@@ -56,8 +56,8 @@
 		case 'D':
 			opts.debug = true;
 			break;
-		case 'v':
-			opts.verbose = true;
+		case 'd':
+			depth = strtoul(optarg, NULL, 0);
 			break;
 		case 'F':
 			opts.hardfix = true;
@@ -64,15 +64,18 @@
 		case 'f':
 			opts.fix = true;
 			break;
-		case 'd':
-			depth = strtoul(optarg, NULL, 0);
-			break;
 		case 'h':
 			opts.horizontal = true;
 			break;
-		case 'x':
-			opts.trim = strtoul(optarg, NULL, 0);
+		case 'o':
+			opts.outfile = optarg;
 			break;
+		case 'P':
+			opts.palout = true;
+			break;
+		case 'p':
+			opts.palfile = optarg;
+			break;
 		case 'T':
 			opts.mapout = true;
 			break;
@@ -82,18 +85,15 @@
 		case 'u':
 			opts.unique = true;
 			break;
-		case 'P':
-			opts.palout = true;
-			break;
-		case 'p':
-			opts.palfile = optarg;
-			break;
-		case 'o':
-			opts.outfile = optarg;
-			break;
 		case 'V':
 			printf("rgbgfx %s\n", get_package_version_string());
 			exit(0);
+		case 'v':
+			opts.verbose = true;
+			break;
+		case 'x':
+			opts.trim = strtoul(optarg, NULL, 0);
+			break;
 		default:
 			usage();
 			/* NOTREACHED */