rgbasm: remove option for random fill character

This commit is contained in:
bentley
2010-01-15 17:04:34 -07:00
parent b63924ebf4
commit 48fd34c923
2 changed files with 8 additions and 13 deletions

View File

@@ -151,17 +151,13 @@ opt_Parse(char *s)
break;
case 'z':
if (strlen(&s[1]) <= 2) {
if (strcmp(&s[1], "?") == 0) {
newopt.fillchar = -1;
} else {
int result;
int result;
result = sscanf(&s[1], "%lx", &newopt.fillchar);
if (!((result == EOF) || (result == 1))) {
printf
("*ERROR*\t :\n\tInvalid argument for option 'z'\n");
exit(5);
}
result = sscanf(&s[1], "%lx", &newopt.fillchar);
if (!((result == EOF) || (result == 1))) {
printf
("*ERROR*\t :\n\tInvalid argument for option 'z'\n");
exit(5);
}
} else {
printf
@@ -280,7 +276,7 @@ main(int argc, char *argv[])
DefaultOptions.gbgfx[3] = '3';
DefaultOptions.binary[0] = '0';
DefaultOptions.binary[1] = '1';
DefaultOptions.fillchar = 0; // -1 => fill uninitialized data with random values
DefaultOptions.fillchar = 0;
opt_SetCurrentOptions(&DefaultOptions);
while (argv[argn][0] == '-' && argc) {

View File

@@ -724,8 +724,7 @@ void
out_Skip(int skip)
{
checksection();
if ((CurrentOptions.fillchar == -1)
|| !((pCurrentSection->nType == SECT_HOME)
if (!((pCurrentSection->nType == SECT_HOME)
|| (pCurrentSection->nType == SECT_CODE))) {
pCurrentSection->nPC += skip;
nPC += skip;