home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OS9_6X09 / SYSMODS / BLOB_Stop.lzh / ipatch.doc < prev    next >
Text File  |  1992-06-13  |  2KB  |  63 lines

  1. IPatch
  2.  
  3. Syntax: IPatch patchfile oldfile newfile [-v]
  4.  
  5. Function:
  6.  
  7.   Creates  newfile  from oldfile using the changes in  patchfile.
  8.   See the description of "MakPatch" for more details.
  9.  
  10. Parameters:
  11.  
  12.   "patchfile" the pathname of the file containing the changes.
  13.   "oldfile" the pathname of the file to patch.
  14.   "newfile" the pathname of the new version of "oldfile".
  15.  
  16. Options:
  17.  
  18.   -v for verbose display of installation
  19.  
  20. Notes:
  21.  
  22.   This  utility  will operate  correctly on OS9 Level  I  version
  23.   2.00.00  for the Color Computer 1/2 and on OS9 Level II version
  24.   2.00.01 for the Color Computer 3.
  25.  
  26.   The  access permissions "e" and/or "pe" are NOT turned on.  Use
  27.   the "attr" utility to allow execute access.
  28.  
  29.   The  "patchfile"  contains  a header, followed by a  series  of
  30.   "patch  entries".  The header contains the two 16 bit  unsigned
  31.   values  of  the "oldfile" size and the "newfile" size in  bytes
  32.   respectively.   IPatch  compares  the  oldfile  size  with  the
  33.   "oldfile"  size  entry.  If they do not match, IPatch  displays
  34.   the message "... size is incorrect" and stops.
  35.  
  36.   Each  entry contains an 8 bit type: 0 for a deletion, 1 for  an
  37.   addition,  2  for  a same size change, 3 for a  disparate  size
  38.   change, and 4 for done.
  39.  
  40.   Following  the  type  byte, are three  16 bit  unsigned  values
  41.   representing the offset in the oldfile where the patch applies,
  42.   the size of the old area to patch, and the size of the new area
  43.   respectively.
  44.  
  45.   Following  the patch entry are the actual data bytes of the old
  46.   file  and  the  new file areas respectively.   IPatch  actually
  47.   compares the oldfile area with the bytes in the patch entry and
  48.   will fail with the message: "Old file data mismatch at $xxxx is
  49.   $xx,  should be $xx" and stop if they are not the same.  IPatch
  50.   does NOT  have a way of knowing if  there are other differences
  51.   (i.e. previous patches) in the file outside of the range of the
  52.   entries.    WARNING:  If other differences exist, the resulting 
  53.   program may not run!
  54.  
  55.   "newfile" is overwritten silently, if it exists, UNIX style.
  56.  
  57. Examples:
  58.  
  59.   IPatch Patch.Printerr Printerr Printerr.L2
  60.   Patch Patch.Printerr complete
  61.  
  62.  
  63.