[Skip top navbar]

Andrew Gregory's Web Pages

View of Perth city from Kings Park, 31°57'19"S 115°51'2"E

-

OPA Cloak 3a 3c 3mx Siena Workabout mx


History

OPA Cloak Version History
VersionDateDescription
1.042002-06-21
  • Improved speed - up to eight times faster!
1.032000-11-01
  • Fixed problem of not removing all redundant procedures
  • Exclusion files now support #include
  • Added dialog to set cloaking options
  • Options are saved in an INI file
  • Added a statistics display
  • Messages are in a resource file
1.022000-07-03
  • Fixed problem renaming temporary files
1.012000-06-27
  • Fixed problem with excluding arrays
1.002000-06-26
  • Initial release

Description

A freeware program that obsfucates procedure and GLOBAL variable names and removes redundant procedures. It does not do variable name compaction - that would require re-writing the internal q-code of the program.

There are no explicit limits to the size of program that can be processed, other than available system memory and storage space.

On my Series 3mx OPA Cloak took 1 minute 48 seconds to process a 591 procedure, 188k file. 74 redundant procedures were removed, saving about 8k.


Instructions

OPA Cloak understands both OPA and OPO files. It will rename all procedure and GLOBAL variable names in the file. Since some procedures may get called indirectly (via the @-operator) or you might LOADM/UNLOADM some modules that call procedures or refer to GLOBAL variables, OPA Cloak will read an exclusion file that lists procedure and GLOBAL variable names that are not to be altered. This file must be in the same directory and have the same base name as the source code file for the OPA / OPO file, but have the extension EXC. For an example, here is the exclusion file that OPA Cloak uses:

PROC init%:
PROC hdlcmd%:
PROC go1%:
PROC go2%:

If OPA Cloak were to have any GLOBAL variables that needed excluding they would be listed like:

GLOBAL myvar1%()
GLOBAL myvar2&

OPA Cloak will rename the original file to somename.~1, or if that exists, somename.~2, etc, before writing out the new compacted somename.OPA. If the original source code for somename.OPA was B:\OPL\somename.OPL, then the exclusion file OPA Cloak will look for is B:\OPL\somename.EXC.

The OPA Cloak program is developed using my Programmer's Toolbox library. Before I ran OPA Cloak on itself, it was 28k long. Removal of redundant procedures saved 10k, bringing it to its present 18k, a saving of 36%.


Usage with the Programmer's Toolbox

If you are using my Programmer's Toolbox library, add the following to your program's exclusion file:

#include "\opl\lib\opllib.exc"

Alter as necessary depending on where you have your copy of the library.


Download

opacloak.zip (10133) OPA Cloak program


-