mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
standardize on -p for setting pad value
This commit is contained in:
@@ -267,7 +267,7 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
newopt = CurrentOptions;
|
newopt = CurrentOptions;
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "b:g:i:o:z:")) != -1) {
|
while ((ch = getopt(argc, argv, "b:g:i:o:p:")) != -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 'b':
|
case 'b':
|
||||||
if (strlen(optarg) == 2) {
|
if (strlen(optarg) == 2) {
|
||||||
@@ -292,12 +292,12 @@ main(int argc, char *argv[])
|
|||||||
case 'o':
|
case 'o':
|
||||||
out_SetFileName(optarg);
|
out_SetFileName(optarg);
|
||||||
break;
|
break;
|
||||||
case 'z':
|
case 'p':
|
||||||
newopt.fillchar = strtoul(optarg, &ep, 0);
|
newopt.fillchar = strtoul(optarg, &ep, 0);
|
||||||
if (optarg[0] == '\0' || *ep != '\0')
|
if (optarg[0] == '\0' || *ep != '\0')
|
||||||
errx(EX_USAGE, "Invalid argument for option 'z'");
|
errx(EX_USAGE, "Invalid argument for option 'p'");
|
||||||
if (newopt.fillchar < 0 || newopt.fillchar > 0xFF)
|
if (newopt.fillchar < 0 || newopt.fillchar > 0xFF)
|
||||||
errx(EX_USAGE, "Argument for option 'z' must be between 0 and 0xFF");
|
errx(EX_USAGE, "Argument for option 'p' must be between 0 and 0xFF");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
PrintUsage();
|
PrintUsage();
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ main(int argc, char *argv[])
|
|||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "l:m:n:o:s:tz:")) != -1) {
|
while ((ch = getopt(argc, argv, "l:m:n:o:p:s:t")) != -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 'l':
|
case 'l':
|
||||||
lib_Readfile(optarg);
|
lib_Readfile(optarg);
|
||||||
@@ -71,6 +71,13 @@ main(int argc, char *argv[])
|
|||||||
case 'o':
|
case 'o':
|
||||||
out_Setname(optarg);
|
out_Setname(optarg);
|
||||||
break;
|
break;
|
||||||
|
case 'p':
|
||||||
|
fillchar = strtoul(optarg, &ep, 0);
|
||||||
|
if (optarg[0] == '\0' || *ep != '\0')
|
||||||
|
errx(EX_USAGE, "Invalid argument for option 'p'");
|
||||||
|
if (fillchar < 0 || fillchar > 0xFF)
|
||||||
|
errx(EX_USAGE, "Argument for option 'p' must be between 0 and 0xFF");
|
||||||
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
options |= OPT_SMART_C_LINK;
|
options |= OPT_SMART_C_LINK;
|
||||||
strcpy(smartlinkstartsymbol, optarg);
|
strcpy(smartlinkstartsymbol, optarg);
|
||||||
@@ -78,13 +85,6 @@ main(int argc, char *argv[])
|
|||||||
case 't':
|
case 't':
|
||||||
options |= OPT_SMALL;
|
options |= OPT_SMALL;
|
||||||
break;
|
break;
|
||||||
case 'z':
|
|
||||||
fillchar = strtoul(optarg, &ep, 0);
|
|
||||||
if (optarg[0] == '\0' || *ep != '\0')
|
|
||||||
errx(EX_USAGE, "Invalid argument for option 'z'");
|
|
||||||
if (fillchar < 0 || fillchar > 0xFF)
|
|
||||||
errx(EX_USAGE, "Argument for option 'z' must be between 0 and 0xFF");
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
usage();
|
usage();
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
|
|||||||
Reference in New Issue
Block a user