
                                   File Patch

  This program patches binary files using patch files created by Make Patch.



  1. Usage

  The parameter syntax is the following:

  PATCH <original-file> [<patch-file>]

  <original-file>:
  This is the full name of the file containing the original data. Changes  are
written back to this file. You can patch only one file at a time, you may  not
use wildcards.

  <patch-file>:
  The full name of the patch file. When omitted, it defaults to 'PATCH.DAT' in
the current directory.

  The first four bytes in the patch file hold the length of the original file.
The remaining part contains patches. A patch has the following structure:

  +-------------+---------------------------------------+
  | POSITION    | DESCRIPTION                           |
  +-------------+---------------------------------------+
  | 0 - 3       | Offset of patch in the file (4 bytes) |
  | 4 - 5       | Length of patch (LEN) (2 bytes)       |
  | 6 - (LEN+5) | Patch data (LEN bytes)                |
  +-------------+---------------------------------------+



  2. Error messages

  - FILENAME.EXT not found
    The specified file does not exist.
  - FILENAME.EXT has an invalid size
    You can only patch a file of the same size as  the  value  stored  in  the
    patch. It is likely that you tried to patch the wrong file.
  - Out of memory
    The program could not allocate buffers for the patching.  Try  freeing  up
    memory by uninstalling some resident programs.



  3. Copyright and legal issues

  The source of this program is public domain and provided here "as  is"  -  I
don't feel like commenting it but if you have problems then feel free  to  ask
me. If you derive your own program from the source or put a part of the source
into your own program, please, give me a credit and send a copy to me.



  4. The author

  If you're interested in some similarly useful utilities you can  contact  me
at sta@c64.org or visit my homepage at http://sta.c64.org.

  Joe Forster/STA
  5th November, 2000
