ref: 8534f3a14895ab172397d0a74230e584609076f4
parent: bdc6401ebae00ab1f063a5ecb07512b678efe5ec
author: Anthony J. Bentley <[email protected]>
date: Wed Jan 7 18:13:18 EST 2015
Unify usage strings/functions across programs. The funny spacing is to make it easier to keep to 80 characters/line.
--- a/src/asm/main.c
+++ b/src/asm/main.c
@@ -233,11 +233,12 @@
*
*/
-void
-PrintUsage(void)
+static void
+usage(void)
{
- printf("Usage: rgbasm [-v] [-h] [-b chars] [-g chars] [-i path] [-o outfile] [-p pad_value]\n"
- " file\n");
+ printf(
+"Usage: rgbasm [-v] [-h] [-b chars] [-g chars] [-i path] [-o outfile]\n"
+" [-p pad_value] file.asm\n");
exit(1);
}
/*
@@ -260,7 +261,7 @@
if (argc == 1)
- PrintUsage();
+ usage();
/* yydebug=1; */
@@ -323,7 +324,7 @@
newopt.verbose = true;
break;
default:
- PrintUsage();
+ usage();
}
}
argc -= optind;
@@ -334,7 +335,7 @@
DefaultOptions = CurrentOptions;
if (argc == 0)
- PrintUsage();
+ usage();
tzMainfile = argv[argc - 1];
--- a/src/fix/main.c
+++ b/src/fix/main.c
@@ -26,10 +26,10 @@
static void
usage(void)
{
- printf("usage: rgbfix [-Ccjsv] [-i game_id] [-k licensee_str] "
- "[-l licensee_id]\n" " [-m mbc_type] [-n rom_version] "
- "[-p pad_value] [-r ram_size]\n"
- " [-t title_str] file.gb\n");
+ printf(
+"usage: rgbfix [-Ccjsv] [-i game_id] [-k licensee_str] [-l licensee_id]\n"
+" [-m mbc_type] [-n rom_version] [-p pad_value] [-r ram_size]\n"
+" [-t title_str] file\n");
exit(1);
}
--- a/src/link/main.c
+++ b/src/link/main.c
@@ -32,9 +32,9 @@
static void
usage(void)
{
- printf("usage: rgblink [-t] [-m mapfile] [-n symfile] [-o outfile]\n");
- printf("\t [-s symbol] [-z pad_value] objectfile [...]\n");
-
+ printf(
+"usage: rgblink [-t] [-m mapfile] [-n symfile] [-o outfile] [-s symbol]\n"
+" [-z pad_value] file [...]\n");
exit(1);
}