rgblink: remove random option for fill character

This commit is contained in:
bentley
2010-01-15 13:05:16 -07:00
parent dc390e8c1f
commit deccbb07e9
2 changed files with 8 additions and 16 deletions

View File

@@ -29,7 +29,7 @@ enum eBlockType {
};
SLONG options = 0;
SLONG fillchar = 0;
SLONG fillchar;
char smartlinkstartsymbol[256];
/*
@@ -142,15 +142,11 @@ main(int argc, char *argv[])
options |= OPT_SMALL;
break;
case 'z':
if (optarg[0] == '?')
fillchar = -1;
else {
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");
}
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();

View File

@@ -20,9 +20,7 @@ writehome(FILE * f)
if (!mem)
return;
if (fillchar != -1) {
memset(mem, fillchar, MaxAvail[BANK_HOME]);
}
memset(mem, fillchar, MaxAvail[BANK_HOME]);
MapfileInitBank(0);
pSect = pSections;
@@ -51,9 +49,7 @@ writebank(FILE * f, SLONG bank)
if (!mem)
return;
if (fillchar != -1) {
memset(mem, fillchar, MaxAvail[bank]);
}
memset(mem, fillchar, MaxAvail[bank]);
MapfileInitBank(bank);
pSect = pSections;