home *** CD-ROM | disk | FTP | other *** search
- ---------------------------------------------------------------------
- Brian Carroll, December 1988.
-
- ---------------------------------------------------------------------
- This program allows you to remove any or all of: redundant leading
- spaces and colons, REMs, and empty lines, in that order. The
- stripped program has a line added: '0REM>new-path/file-name' so
- the system can refer to it properly (this is not done if you choose
- not to change anything). If the old program already had a line 0 you
- may find another in the new program, but you can easily re-number it.
-
- You have the option to enter a range of line numbers which will not
- be processed at all, whatever the other options set. This is useful
- if you want to preserve a group of explanatory lines like these.
- You will see these lines flagged '[Skip]' during processing.
-
- The program deals with assembler remarks (introduced by ';' or '\')
- but unfortunately detection of entry to and exit from the assembler is
- made difficult by the use of '[' and ']' within the assembler syntax;
- this slows processing. Lines are flagged '[Assembler]'. The algorithm
- will NOT deal correctly with EMBEDDED remarks; it assumes that they
- are always at the ends of lines, or on separate ones, like REMs.
-
- The program will not allow you to attempt to compress a directory or
- a file whose 'type' is not BASIC, or to save to an existing locked
- file. It will warn you of overwriting an existing UNLOCKED file or
- if there is no disc in the nominated drive. In each case you can
- correct the error.
-
- Note that BASIC lines BEGIN with &D, but here the &D's are used as
- line TERMINATORS. The new file is overlayed on top of the original
- in the byte array 'filespace', line by line. The original file is
- loaded into 'filespace' offset by sufficient space for the title
- line (up to one screen line long) to be inserted into the new file.
- The % compression and time taken are reported at the end.
-
- -----------------------------------------------------------------------
- RISC-OS Version 1.01 by Paul Hobbs 17-Jul-89
- -----------------------------------------------------------------------
-
- This version multitasks under RISC-OS and provides all of the features
- (I think!) of the original Slash program. The use of the program should
- be fairly obvious, just drag a BASIC file into the Slash window or onto
- the icon on the icon bar and set the required options. A future version
- may be forthcoming in which more compression (by joining lines and
- changing variable names) may appear when I get round to it.
-
- The !Run file is set to give a minimum of 100k and a maximum of 4meg to
- the WimpSlot - this is because trying to compact a large file may cause
- !Slash to run out of space and hang. Not very elegant I am afraid! To
- avoid this possiblity it attempts to grab all the memory it can find so
- install !Slash last if you want to run alarms etc at the same time.
-
- The !RunImage file is a compacted version of BasSource produced by !Slash
- itself, so if you want to make any changes edit BasSource and use !Slash
- to crunch it down again.