diff options
author | B. Watson <urchlay@slackware.uk> | 2024-05-19 05:11:11 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2024-05-19 05:11:11 -0400 |
commit | ffeba14c10e1cf7f2936cd9249a352474c0e9526 (patch) | |
tree | 6a2e70e91f458ce758a397223140f35448bf36a7 /unprotbas.rst | |
parent | 8ea53b7cae9fedf9432e9c83008597dbdb34f8d3 (diff) | |
download | bw-atari8-tools-ffeba14c10e1cf7f2936cd9249a352474c0e9526.tar.gz |
unprotbas: exit status 2 for unprotected program; add -c (check only).
Diffstat (limited to 'unprotbas.rst')
-rw-r--r-- | unprotbas.rst | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/unprotbas.rst b/unprotbas.rst index 557d27d..b3a9926 100644 --- a/unprotbas.rst +++ b/unprotbas.rst @@ -33,7 +33,7 @@ OPTIONS ======= **-v** - Verbose operation. + Verbose operation. TODO: it's always verbose right now... **-f** Force the variable name table to be rebuilt, even if it looks OK. @@ -46,10 +46,22 @@ OPTIONS Remove any "garbage" data from the end of the file. By default, it's left as-is, in case it's actually data used by the program. +**-c** + Check only. Does a dry run. Loads the program, unprotects it in + memory, but doesn't write the result anywhere. In this mode, there + is no **output-file**. + EXIT STATUS =========== -Exit status is zero for success, non-zero for failure. +0 + **input-file** was protected, unprotection was successful. + +1 + I/O error, or **input-file** isn't a valid BASIC program. + +2 + **input-file** is already an unprotected BASIC program. DETAILS ======= @@ -99,10 +111,13 @@ Variable name table scrambling require human intelligence to figure out what each variable is for, since the names are meaningless. - The **output-file** may be larger than the **input-file** was, since - some types of variable-name scrambling shrink the variable name - table to the minimum size (one byte per name); the rebuilt table - will be larger. + The **output-file** may not be the exact size that the + **input-file** was. Some types of variable-name scrambling shrink + the variable name table to the minimum size (one byte per name), so + the rebuilt table will be larger. Other types of scrambling leave + the variable name table at its original size, but **unprotbas** + generates only one- and two-character variable names, so the rebuilt + table might be smaller. Bad next-line pointer Generally, this is done with line number 32768. Yes, this line |