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 >
Wrap
Text File
|
1992-06-13
|
2KB
|
63 lines
IPatch
Syntax: IPatch patchfile oldfile newfile [-v]
Function:
Creates newfile from oldfile using the changes in patchfile.
See the description of "MakPatch" for more details.
Parameters:
"patchfile" the pathname of the file containing the changes.
"oldfile" the pathname of the file to patch.
"newfile" the pathname of the new version of "oldfile".
Options:
-v for verbose display of installation
Notes:
This utility will operate correctly on OS9 Level I version
2.00.00 for the Color Computer 1/2 and on OS9 Level II version
2.00.01 for the Color Computer 3.
The access permissions "e" and/or "pe" are NOT turned on. Use
the "attr" utility to allow execute access.
The "patchfile" contains a header, followed by a series of
"patch entries". The header contains the two 16 bit unsigned
values of the "oldfile" size and the "newfile" size in bytes
respectively. IPatch compares the oldfile size with the
"oldfile" size entry. If they do not match, IPatch displays
the message "... size is incorrect" and stops.
Each entry contains an 8 bit type: 0 for a deletion, 1 for an
addition, 2 for a same size change, 3 for a disparate size
change, and 4 for done.
Following the type byte, are three 16 bit unsigned values
representing the offset in the oldfile where the patch applies,
the size of the old area to patch, and the size of the new area
respectively.
Following the patch entry are the actual data bytes of the old
file and the new file areas respectively. IPatch actually
compares the oldfile area with the bytes in the patch entry and
will fail with the message: "Old file data mismatch at $xxxx is
$xx, should be $xx" and stop if they are not the same. IPatch
does NOT have a way of knowing if there are other differences
(i.e. previous patches) in the file outside of the range of the
entries. WARNING: If other differences exist, the resulting
program may not run!
"newfile" is overwritten silently, if it exists, UNIX style.
Examples:
IPatch Patch.Printerr Printerr Printerr.L2
Patch Patch.Printerr complete