ref: 02e622074229cca81c64b33cea2d1e5e168ad4fe
parent: 860c9883bbdd07b84e38e26cf9a50dffd07a6ff8
author: bentley <[email protected]>
date: Fri Jan 15 15:04:37 EST 2010
standardize on -p for setting pad value
--- a/src/asm/main.c
+++ b/src/asm/main.c
@@ -267,7 +267,7 @@
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) {
case 'b':
if (strlen(optarg) == 2) {
@@ -292,12 +292,12 @@
case 'o':
out_SetFileName(optarg);
break;
- case 'z':
+ case 'p':
newopt.fillchar = strtoul(optarg, &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)
- 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;
default:
PrintUsage();
--- a/src/link/main.c
+++ b/src/link/main.c
@@ -57,7 +57,7 @@
if (argc == 1)
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) {
case 'l':
lib_Readfile(optarg);
@@ -71,6 +71,13 @@
case 'o':
out_Setname(optarg);
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':
options |= OPT_SMART_C_LINK;
strcpy(smartlinkstartsymbol, optarg);
@@ -77,13 +84,6 @@
break;
case 't':
options |= OPT_SMALL;
- 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:
usage();