diff options
Diffstat (limited to 'unprotbas.c')
-rw-r--r-- | unprotbas.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/unprotbas.c b/unprotbas.c index 8540e6a..a95e9a6 100644 --- a/unprotbas.c +++ b/unprotbas.c @@ -239,7 +239,8 @@ void breakcode(void) { } data[oldpos + 2] = 0; - fprintf(stderr, "set invalid line pointer at line %d\n", lineno); + if(verbose) + fprintf(stderr, "set invalid line length 0 at line %d, file offset %04x\n", lineno, oldpos + 2); } /* sometimes the variable name table isn't large enough to hold @@ -579,6 +580,9 @@ void scramble_vars(void) { for(i = vnstart; i < vvstart - 1; i++) data[i] = '\x9b'; + + if(verbose) + fprintf(stderr, "replaced %d byte variable name table with EOLs.\n", i); } void print_help(void) { @@ -704,6 +708,15 @@ int main(int argc, char **argv) { if(lomem) die("This doesn't look like an Atari BASIC program (no $0000 signature)"); if(protect_code || protect_vars) { + if(verbose) { + fprintf(stderr, "%s: protecting program, ", self); + if(protect_vars && !protect_code) + fprintf(stderr, "variables only.\n"); + else if(protect_code && !protect_vars) + fprintf(stderr, "code only.\n"); + else + fprintf(stderr, "both code and variables.\n"); + } if(protect_vars) scramble_vars(); if(protect_code) breakcode(); } else { |