ref: b2a4f54f59546938a3aeb441e53f53b13b5572fd
parent: 5fe2bcbeedea32b137a26d50a2fd91cee3fc03cb
author: bentley <[email protected]>
date: Tue Jan 12 14:52:42 EST 2010
rename PrintUsage() to usage(), and return EX_USAGE
--- a/src/fix/main.c
+++ b/src/fix/main.c
@@ -49,16 +49,15 @@
*
*/
-void
-PrintUsage(void)
+static void usage(void)
{
printf("RGBFix v" RGBFIX_VERSION
" (part of ASMotor " ASMOTOR_VERSION ")\n\n");
printf("usage: rgbfix [-dcjoqsv] [-b mbc_type] [-k licensee_str] [-m ram_size]\n");
- printf("\t\t[-p pad_value] [-t title_str] image[.gb]\n");
+ printf("\t [-p pad_value] [-t title_str] image[.gb]\n");
- exit(1);
+ exit(EX_USAGE);
}
long int
@@ -187,7 +186,7 @@
ulOptions = 0;
if (argc == 1)
- PrintUsage();
+ usage();
while ((ch = getopt(argc, argv, "b:cdjk:m:op:qst:v")) != -1) {
switch (ch) {
@@ -253,7 +252,7 @@
ulOptions |= OPTF_SGBMODE;
break;
default:
- PrintUsage();
+ usage();
/* NOTREACHED */
}
}
@@ -261,7 +260,7 @@
argv += optind;
if (argc == 0)
- PrintUsage();
+ usage();
strcpy(filename, argv[argc - 1]);