From 6959b76749af19e17dc8999235ded13758ab6c2b Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Sun, 29 Dec 2019 17:38:08 +0100 Subject: [PATCH] Rework help/usage messages Trimmed down the option lists as per @bentley's request; Reinstated the man pages' synopsis --- src/asm/main.c | 29 +++++++++++++---------------- src/fix/main.c | 30 +++++++++++++----------------- src/gfx/main.c | 19 ++++++------------- src/link/main.c | 13 ++++++------- 4 files changed, 38 insertions(+), 53 deletions(-) diff --git a/src/asm/main.c b/src/asm/main.c index cce01f26..6a4d1936 100644 --- a/src/asm/main.c +++ b/src/asm/main.c @@ -269,22 +269,19 @@ static struct option const longopts[] = { static void print_usage(void) { fputs( -"usage: rgbasm [] ...\n" -" -b, --binary-digits change the chars used for binary constants\n" -" -D, --define [=] add a string define (`EQUS')\n" -" -E, --export-all export all labels\n" -" -g, --gfx-chars change the chars used for gfx constants\n" -" -h, --halt-without-nop do not automatically add `nop' after `halt'\n" -" -i, --include add the directory to the include search list\n" -" -L, --preserve-ld prevent auto-optimizing `ld' to `ldh'\n" -" -M, --dependfile set the output dependency file\n" -" -o, --output set the output object file\n" -" -p, --pad-value set the value to use for `ds'\n" -" -r, --recursion-depth set max recursion depth before aborting\n" -" -V, --version print RGBASM version and exit\n" -" -v, --verbose report more information\n" -" -W, --warning enable or disable warnings\n" -" -w disable all warnings\n", stderr); +"Usage: rgbasm [-EhLVvw] [-b chars] [-D name[=value]] [-g chars] [-i path]\n" +" [-M depend_file] [-o out_file] [-p pad_value] [-r depth]\n" +" [-W warning] ...\n" +"Useful options:\n" +" -E, --export-all export all labels\n" +" -M, --dependfile set the output dependency file\n" +" -o, --output set the output object file\n" +" -p, --pad-value set the value to use for `ds'\n" +" -V, --version print RGBASM version and exit\n" +" -W, --warning enable or disable warnings\n" +"\n" +"For help, use `man rgbasm' or go to https://rednex.github.io/rgbds/\n", + stderr); exit(1); } diff --git a/src/fix/main.c b/src/fix/main.c index ddb9c437..f6954677 100644 --- a/src/fix/main.c +++ b/src/fix/main.c @@ -52,23 +52,19 @@ static struct option const longopts[] = { static void print_usage(void) { fputs( -"usage: rgbfix [] \n" -" -C, --color-only flag the ROM as Color-only\n" -" -c, --color-compatible flag the ROM as color-compatible\n" -" -f, --fix-spec specify how to fix or trash the header\n" -" -i, --game-id set the 4 characters at 0x13F-0x142\n" -" -j, --non-japanese flag the ROM as exclusively overseas\n" -" -k, --new-licensee set the new licensee str to at most two chars\n" -" -l, --old-licensee set the old licensee code to this byte\n" -" -m, --mbc-type set the MBC type byte to this value; refer\n" -" to the man page for a list of values\n" -" -n, --rom-version set the ROM's revision byte\n" -" -p, --pad-value pad to the next valid size using this value\n" -" -r, --ram-size set the cart RAM size byte to this value\n" -" -s, --sgb-compatible set the SGB compatibility flag\n" -" -t, --title set the ROM's title (16 chars max, 15 is best)\n" -" -V, --version print RGBFIX version and exit\n" -" -v, --verbose report more information\n", stderr); +"Usage: rgbfix [-jsVv] [-C | -c] [-f ] [-i ] [-k ]\n" +" [-l ] [-m ] [-n ]\n" +" [-p ] [-r ] [-t ] \n" +"Useful options:\n" +" -m, --mbc-type set the MBC type byte to this value; refer\n" +" to the man page for a list of values\n" +" -p, --pad-value pad to the next valid size using this value\n" +" -r, --ram-size set the cart RAM size byte to this value\n" +" -V, --version print RGBFIX version and exit\n" +" -v, --verbose fix the header logo and both checksums (-f lhg)\n" +"\n" +"For help, use `man rgbfix' or go to https://rednex.github.io/rgbds/\n", + stderr); exit(1); } diff --git a/src/gfx/main.c b/src/gfx/main.c index d9a3eb3b..e22c65d0 100644 --- a/src/gfx/main.c +++ b/src/gfx/main.c @@ -53,25 +53,18 @@ static struct option const longopts[] = { static void print_usage(void) { fputs( -"usage: rgbgfx [] \n" -" -a, --attr-map set the output attribute map file\n" -" -A, --output-attr-map output the attribute map to .attrmap\n" -" -C, --color-curve use the GBC's color curve (color profile)\n" -" -D, --debug output debug info\n" -" -d, --depth set the output image's depth to bpp\n" +"Usage: rgbgfx [-CDhmuVv] [-f | -F] [-a | -A] [-d ]\n" +" [-o ] [-p | -P] [-t | -T]\n" +" [-x ] \n" +"Useful options:\n" " -f, --fix make the input image an indexed PNG\n" -" -F, --fix-and-save same, but also save parameters inside the PNG\n" -" -h, --horizontal lay out tiles horizontally instead of vertically\n" " -m, --mirror-tiles optimize out mirrored tiles\n" " -o, --output set the output binary file\n" -" -p, --palette set the output palette file\n" -" -P, --output-palette output the palette file to .pal\n" " -t, --tilemap set the output tilemap file\n" -" -T, --output-tilemap output the tilemap file to .tilemap\n" " -u, --unique-tiles optimize out identical tiles\n" " -V, --version print RGBGFX version and exit\n" -" -v, --verbose print errors when parameters conflict with the PNG\n" -" -x, --trim-end trim the end of the binary output by N tiles\n", +"\n" +"For help, use `man rgbgfx' or go to https://rednex.github.io/rgbds/\n", stderr); exit(1); } diff --git a/src/link/main.c b/src/link/main.c index 5262d10a..98c3db51 100644 --- a/src/link/main.c +++ b/src/link/main.c @@ -83,19 +83,18 @@ static struct option const longopts[] = { static void printUsage(void) { fputs( -"usage: rgblink [] ...\n" -" -d, --dmg enable DMG mode, disabling VRAM & VRAM banks\n" +"Usage: rgblink [-dtVvw] [-l script] [-m map_file] [-n sym_file]\n" +" [-O overlay_file] [-o out_file] [-p pad_value] [-s symbol]\n" +" ...\n" +"Useful options:\n" " -l, --linkerscript set the input linker script\n" " -m, --map set the output map file\n" " -n, --sym set the output symbol list file\n" -" -O, --overlay set the input overlay file\n" " -o, --output set the output file\n" " -p, --pad set the value to pad between sections with\n" -" -s, --smart does nothing, nobody knows what it's supposed to\n" -" -t, --tiny enable 32k mode, replacing ROMX with ROM0\n" " -V, --version print RGBLINK version and exits\n" -" -v, --verbose report more information\n" -" -w, --wramx replace WRAMX with WRAM0 and disable WRAM banks\n", +"\n" +"For help, use `man rgblink' or go to https://rednex.github.io/rgbds/\n", stderr); }