ref: 48fd34c923d3f785ed41186732eb2d7cbf8d195c
parent: b63924ebf4a2c6d09a04ae4aa2c6701df84354ad
author: bentley <[email protected]>
date: Fri Jan 15 12:04:34 EST 2010
rgbasm: remove option for random fill character
--- a/src/asm/main.c
+++ b/src/asm/main.c
@@ -151,17 +151,13 @@
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 @@
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) {
--- a/src/asm/output.c
+++ b/src/asm/output.c
@@ -724,8 +724,7 @@
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;