This causes the file in the application directory to be deleted. Its
contents are provided to allow patch removal.
eg:
DeleteFile:!PCEm.!Boot
OldContents:Patch:Files.Acorn.PCEm.Old.!Boot &FEB
Transforms file format.
-----------------------
The transforms files are processed using MessageTrans. The tokens looked up
for a given transform are <transform>_Prepare and <transform>_Finish to get
the actual *commands, and <transform>_PrepareSlot and <transform>_FinishSlot to get the Wimp slot size (in K) that each command gets to start with. The
documentation for the transforms is here rather than in the Transforms
file as MessageTrans reads the entire of the Transforms file into memory,
comments and all.
For <transform>_Prepare, %0 is the initial file and %1 is the file that
will actually be patched.
For <transform>_Finish, %0 is the patched file and %1 is the final file.
In both cases, %2 is a filename that printed output from the transforming
program should be redirected to. For a program that does not print anything
(eg. UnSqueeze) it need not be specified. After the transformation
program has been run, if the error file exists and is of non zero size its
contents will be displayed in an error box. !Patch will then attempt to
continue ie. it is not assumed that the presence of output means an error
occured. In fact in the case of squeeze, if there is any output there
was an error, and !Patch will get a "File not found" error when it attempts
to continue.
After SWI MessageTrans_GSLookup has been called, the results should be
a valid *command which will perform the job, which is passed to SWI
Wimp_StartTask. This may of course be an Obey file. Application space
may be used however you like, as the *command is running as a new wimp
task with its own application space.
The Prepare transformation is exercised a lot. Not only is it used while
performing the actual patching but it is also used while scanning
directories and after patching has been performed to work out whether
the patches for a file can be applied, removed, or neither. Therefore
the prepare transformation should ideally be fast, small and memory
resident eg. UnSqueeze is performed by a small module loaded by !Patch.!Run.
The benefit of being memory resident is that you have to swap floppy disks
much less often. The benefit of being small is that you can afford to be
memory resident. Squeeze takes a lot of memory to run, so you should not
rmload huge modules just so you can have memory resident prepare transforms
as this may then mean there is insufficient memory for Squeeze to run
when a particularly large file is patched eg. !DTP.!RunImage.
'Copy' is the standard "transform" used for files which need no
transforming. This is because we patch in <Wimp$Scrap> and the transform
performs the copying operations.
'Squeeze' is the transform used for programs which have been run through
the squeeze program supplied with the Acorn C and Assembler packages.
eg:
Copy_PrepareSlot/Copy_FinishSlot:8
Copy_Prepare/Copy_Finish:Copy %0 %1 ~A ~C ~D F ~L ~N ~P Q ~R S ~T ~V